function hosting_package_update in Hostmaster (Aegir) 6
Implementation of hook_update().
As an existing node is being updated in the database, we need to do our own database updates.
File
- modules/
hosting/ package/ hosting_package.module, line 268
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);
}
}