summaryrefslogtreecommitdiff
path: root/modules/system/system.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/system/system.install')
-rw-r--r--modules/system/system.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index 58a4f8e98..4f85dc928 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -3053,6 +3053,28 @@ function system_update_7075() {
}
/**
+ * Convert menu_links query strings into arrays.
+ */
+function system_update_7076() {
+ $query = db_select('menu_links', 'ml', array('fetch' => PDO::FETCH_ASSOC))
+ ->fields('ml', array('mlid', 'options'));
+ foreach ($query->execute() as $menu_link) {
+ if (strpos($menu_link['options'], 'query') !== FALSE) {
+ $menu_link['options'] = unserialize($menu_link['options']);
+ if (isset($menu_link['options']['query']) && is_string($menu_link['options']['query'])) {
+ $menu_link['options']['query'] = drupal_get_query_array($menu_link['options']['query']);
+ db_update('menu_links')
+ ->fields(array(
+ 'options' => serialize($menu_link['options']),
+ ))
+ ->condition('mlid', $menu_link['mlid'], '=')
+ ->execute();
+ }
+ }
+ }
+}
+
+/**
* @} End of "defgroup updates-7.x-extra".
* The next series of updates should start at 8000.
*/