From 2edc3fecfbb90e38d6400afd67e82a73570ed495 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 6 Jun 2012 11:25:00 +0200 Subject: [PATCH] MDL-32003 fix broken table ordering and cleanup other xmldb ordering --- .../actions/move_updown_field/move_updown_field.class.php | 2 +- .../actions/move_updown_index/move_updown_index.class.php | 2 +- .../xmldb/actions/move_updown_key/move_updown_key.class.php | 2 +- .../actions/move_updown_table/move_updown_table.class.php | 5 ++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php b/admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php index 6b99d2661b8..90188a6007f 100644 --- a/admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php +++ b/admin/tool/xmldb/actions/move_updown_field/move_updown_field.class.php @@ -122,7 +122,7 @@ class move_updown_field extends XMLDBAction { $table->setChanged(true); // Reorder the fields - $table->orderFields($fields); + $table->orderFields(); // Recalculate the hash $structure->calculateHash(true); diff --git a/admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php b/admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php index 6a59135aae0..280adebc2aa 100644 --- a/admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php +++ b/admin/tool/xmldb/actions/move_updown_index/move_updown_index.class.php @@ -122,7 +122,7 @@ class move_updown_index extends XMLDBAction { $table->setChanged(true); // Reorder the indexes - $table->orderIndexes($indexes); + $table->orderIndexes(); // Recalculate the hash $structure->calculateHash(true); diff --git a/admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php b/admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php index 631df1efdfd..821c867b3a8 100644 --- a/admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php +++ b/admin/tool/xmldb/actions/move_updown_key/move_updown_key.class.php @@ -122,7 +122,7 @@ class move_updown_key extends XMLDBAction { $table->setChanged(true); // Reorder the keys - $table->orderKeys($keys); + $table->orderKeys(); // Recalculate the hash $structure->calculateHash(true); diff --git a/admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php b/admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php index df152d5f128..61bec04908b 100644 --- a/admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php +++ b/admin/tool/xmldb/actions/move_updown_table/move_updown_table.class.php @@ -115,9 +115,8 @@ class move_updown_table extends XMLDBAction { $table->setChanged(true); // Reorder the structure - $structure->orderTables($tables); - // Send tables back to structure (the order above break refs) - $structure->setTables($tables); + $structure->orderTables(); + // Recalculate the hash $structure->calculateHash(true);