function hosting_package_update in Hosting 6.2
Same name and namespace in other branches
- 5 package/hosting_package.module \hosting_package_update()
- 7.4 package/hosting_package.module \hosting_package_update()
- 7.3 package/hosting_package.module \hosting_package_update()
Implementation of hook_update().
As an existing node is being updated in the database, we need to do our own database updates.
File
- package/
hosting_package.module, line 227
Code
function hosting_package_update($node) {
// if this is a new node or we're adding a new revision,
if (!empty($node->revision)) {
hosting_package_insert($node);
}
else {
db_query("UPDATE {hosting_package} SET package_type = '%s', short_name = '%s', old_short_name = '%s', description = '%s' WHERE nid=%d", $node->package_type, $node->short_name, $node->old_short_name, $node->description, $node->nid);
}
}