]> git.mjollnir.org Git - moodle.git/commitdiff
PHP generated code must use $result instead of $status. MDL-7533
authorstronk7 <stronk7>
Sat, 18 Nov 2006 19:08:10 +0000 (19:08 +0000)
committerstronk7 <stronk7>
Sat, 18 Nov 2006 19:08:10 +0000 (19:08 +0000)
Merged from MOODLE_17_STABLE

admin/xmldb/actions/view_structure_php/view_structure_php.class.php
admin/xmldb/actions/view_table_php/view_table_php.class.php
lib/xmldb/classes/XMLDBConstants.php

index b23fa6dfbc8fa60673d6090393cae2031904b62f..49b1f1009466dde13eed291ef75a1e39c8f1ab8e 100644 (file)
@@ -211,7 +211,7 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch create table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && create_table($table);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && create_table($table);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -249,7 +249,7 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch drop table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && drop_table($table);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && drop_table($table);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -287,7 +287,7 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch rename table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
index a3b7ca4584c5c790b20dd09de6acfeb95d13cfc9..b31676176b25e828ca4f7d0f27c01fc854f8ada4 100644 (file)
@@ -336,7 +336,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch add field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && add_field($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && add_field($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -379,7 +379,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch drop field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && drop_field($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && drop_field($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -422,7 +422,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch rename field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && rename_field($table, $field, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && rename_field($table, $field, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -475,7 +475,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of type for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_type($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_type($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -525,7 +525,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of precision for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_precision($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_precision($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -571,7 +571,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of sign for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_unsigned($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -617,7 +617,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of nullability for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_notnull($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_notnull($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -664,7 +664,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of list of values for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_enum($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_enum($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -710,7 +710,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch change of default for field ' . $field->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && change_field_default($table, $field);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && change_field_default($table, $field);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -754,7 +754,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch add key ' . $key->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && add_key($table, $key);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && add_key($table, $key);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -798,7 +798,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch drop key ' . $key->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && drop_key($table, $key);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && drop_key($table, $key);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -845,7 +845,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch rename key ' . $key->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && rename_key($table, $key, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && rename_key($table, $key, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -889,7 +889,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch add index ' . $index->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && add_index($table, $index);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && add_index($table, $index);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -933,7 +933,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch drop index ' . $index->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && drop_index($table, $index);' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && drop_index($table, $index);' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
@@ -980,7 +980,7 @@ class view_table_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch rename index ' . $index->getName() . XMLDB_LINEFEED;
-        $result .= '        $status = $status && rename_index($table, $index, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && rename_index($table, $index, ' . "'" . 'NEWNAMEGOESHERE' . "'" . ');' . XMLDB_LINEFEED;
 
     /// Add standard PHP footer
         $result .= XMLDB_PHP_FOOTER;
index 85ac444a7db73f832d87a3ddba5c582996db8eb1..a6e8debb3ef7b1c69244cf12f3dbadc836629e5c 100644 (file)
@@ -69,6 +69,6 @@
 
 /// Some strings used widely
     define ('XMLDB_LINEFEED', "\n");
-    define ('XMLDB_PHP_HEADER', '    if ($status && $oldversion < XXXXXXXXXX) {' . XMLDB_LINEFEED);
+    define ('XMLDB_PHP_HEADER', '    if ($result && $oldversion < XXXXXXXXXX) {' . XMLDB_LINEFEED);
     define ('XMLDB_PHP_FOOTER', '    }' . XMLDB_LINEFEED);
 ?>