You are here

function hosting_get_package in Hosting 7.3

Same name and namespace in other branches
  1. 5 package/hosting_package.module \hosting_get_package()
  2. 6.2 package/hosting_package.module \hosting_get_package()
  3. 7.4 package/hosting_package.module \hosting_get_package()

@todo document this function

2 calls to hosting_get_package()
hosting_get_default_profile in package/hosting_package.module
@todo document this function
hosting_package_sync in package/hosting_package.module
Sync the package and package release nodes with the information retrieved from the verify task

File

package/hosting_package.module, line 253
Defines package node types

Code

function hosting_get_package($short_name, $type) {
  $result = db_query("SELECT nid\n                      FROM {hosting_package}\n                      WHERE short_name = :short_name\n                      AND package_type = :type\n                     ", array(
    ':short_name' => $short_name,
    ':type' => $type,
  ));
  if ($nid = $result
    ->fetchField()) {
    return node_load($nid);
  }
  return FALSE;
}