function trigger_update_7002
Renames nodeapi to node.
Related topics
File
-
modules/
trigger/ trigger.install, line 101
Code
function trigger_update_7002() {
$result = db_query("SELECT hook, aid FROM {trigger_assignments}");
foreach ($result as $record) {
$new_hook = str_replace('nodeapi', 'node', $record->hook);
db_update('trigger_assignments')->fields(array(
'hook' => $new_hook,
))
->condition('hook', $record->hook)
->condition('aid', $record->aid)
->execute();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.