function coder_upgrade_upgrade_call_drupal_system_listing_alter in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/conversions/call.inc \coder_upgrade_upgrade_call_drupal_system_listing_alter()
Implements hook_upgrade_call_drupal_system_listing_alter().
File
- coder_upgrade/
conversions/ call.inc, line 1343 - Provides conversion routines applied to function calls.
Code
function coder_upgrade_upgrade_call_drupal_system_listing_alter(&$node, &$reader) {
// DONE (Revise like file_scan_directory)
// Create helper objects.
$editor = PGPEditor::getInstance();
// Get the function call object.
$item =& $node->data;
// Process function call.
$name =& $item->name;
$temp = $item
->printParameter(0);
// Check for type == T_CONSTANT_ENCAPSED_STRING
// Check for a '/' in the mask and use a different mask or delimit the '/' with '\/'.
if ($temp[0] == "'") {
$editor
->setParameter($item, 0, "'/" . substr($temp, 1, -1) . "/'");
}
elseif ($temp[0] == '"') {
$editor
->setParameter($item, 0, '"/' . substr($temp, 1, -1) . '/"');
}
// else if type == T_VARIABLE, find the $mask used in the call and examine its value.
}