function coder_upgrade_upgrade_call_update_sql_alter in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_update_sql_alter()
Implements hook_upgrade_call_update_sql_alter().
@todo Move this routine to db.inc.
File
- coder_upgrade/
conversions/ call.inc, line 2578 - Provides conversion routines applied to function calls.
Code
function coder_upgrade_upgrade_call_update_sql_alter(&$node, &$reader) {
cdp(__FUNCTION__);
// Change: update_sql
// Create helper objects.
$editor = PGPEditor::getInstance();
// Get the function call object.
$item =& $node->data;
$item
->insertStatementBefore($editor
->commentToStatement('// TODO update_sql has been removed. Use the database API for any schema or data changes.'));
// Replace function call with array().
// This is an example of deleting a function call reference.
$string = str_replace(array(
'/*',
'*/',
), '', $item
->toString());
$temp = $editor
->expressionToStatement("array() /* {$string} */");
$node->container
->insertListBefore($node, $temp);
$node->container
->delete($node);
}