summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--coder_upgrade/CHANGELOG.txt10
-rw-r--r--coder_upgrade/conversions/coder_upgrade.other.inc11
2 files changed, 14 insertions, 7 deletions
diff --git a/coder_upgrade/CHANGELOG.txt b/coder_upgrade/CHANGELOG.txt
index 02a80e3..ea0b6e2 100644
--- a/coder_upgrade/CHANGELOG.txt
+++ b/coder_upgrade/CHANGELOG.txt
@@ -2,6 +2,12 @@
coder_upgrade 7.x-1.x, 2009-xx-xx (development version)
---------------------------------
+- Changes (2010-01-01):
+ * coder_upgrade.other.inc
+ * - conform upgrade routines to Grammar Parser changes
+ * - T_RETURN statements changed from array to PGPExpression
+ * - body statements changed from PGPList to PGPBody
+
- Changes (2009-12-26):
* coder_upgrade.main.inc
* - move coder_upgrade_log_path and coder_upgrade_debug_path to this file
@@ -35,8 +41,8 @@ coder_upgrade 7.x-1.x, 2009-xx-xx (development version)
- Changes (2009-12-04):
* Turn off debug output:
- * - Comment out the echo statements
- * - Turn off coder_upgrade_debug_echo
+ * - comment out the echo statements
+ * - turn off coder_upgrade_debug_echo
* Add statement to load the other.inc file.
* Fix coder_upgrade_module_name function.
* Wrap patch file contents with check_plain.
diff --git a/coder_upgrade/conversions/coder_upgrade.other.inc b/coder_upgrade/conversions/coder_upgrade.other.inc
index 852d42f..4d0129c 100644
--- a/coder_upgrade/conversions/coder_upgrade.other.inc
+++ b/coder_upgrade/conversions/coder_upgrade.other.inc
@@ -768,7 +768,7 @@ function coder_upgrade_callback_function_calls(&$item, &$reader) {
clp("ERROR: return statement not found in hook_perm");
return;
}
- $value = &$return['value'];
+ $value = &$return->value;
$array = $value->getElement(0);
if (get_class($array) == 'PGPArray') {
if (!($theme = $array->findValue($item->getParameter(0)->toString()))) {
@@ -1213,7 +1213,7 @@ function coder_upgrade_convert_perm(&$node) {
return;
}
// cdp("Printing return item");
- $value = &$return['value'];
+ $value = &$return->value;
cdp($value->print_r());
cdp($value->toString());
// cdp("Printing return item DONE");
@@ -1233,7 +1233,8 @@ function coder_upgrade_convert_perm(&$node) {
// If the permission is other than a string (e.g. T_VARIABLE expression),
// then do not enclose in quotes.
$expression = &$current->data->first()->data;
- $type = is_object($expression) ? $expression->type : $expression['type'];
+ // TODO Fix next line when condition is TRUE
+ $type = is_object($expression) ? '$expression->type' : $expression['type']; // Operand object does not have a type parameter // $type = is_object($expression) ? $expression->type : $expression['type'];
$add_quotes = $type == T_CONSTANT_ENCAPSED_STRING;
$permission = &$current->data->toString();
@@ -1279,7 +1280,7 @@ function coder_upgrade_convert_schema(&$node) {
// cdp("Printing return item");
cdp($item->print_r(0, $return));
// cdp("Printing return item DONE");
- $variable = $return['value']->first();
+ $variable = $return->value->first();
/*
* Traverse the body statements looking for:
@@ -1424,7 +1425,7 @@ function coder_upgrade_convert_op(&$node, $callback, $op_index) {
// Change a T_ELSEIF to a T_IF in the new hook function.
$statement->type = T_IF; // If it isn't already.
$block = new stdClass();
- $block->body = new PGPList();
+ $block->body = new PGPBody();
$block->body->insertLast($statement);
$case_node = new PGPNode($block, $current->container); // TODO What is the correct container???
$callback($node, $case_node, $operation);