From 1e4c645282fc84d5ee2fc0b27af11ba360ce71d2 Mon Sep 17 00:00:00 2001 From: webchick Date: Sat, 7 Jul 2012 13:12:22 -0700 Subject: Issue #1613554 by drumm, BTMash: Fixed Update menu link queries from 6's strings. --- modules/system/system.install | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'modules/system/system.install') diff --git a/modules/system/system.install b/modules/system/system.install index ad158510a..676d27259 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -3015,6 +3015,23 @@ function system_update_7073() { )); } +/** + * Convert menu_links query strings to arrays. + */ +function system_update_7074() { + $mlids = db_select('menu_links', 'ml') + ->fields('ml', array('mlid')) + ->condition('options', '%query%', 'LIKE') + ->execute()->fetchCol(); + foreach ($mlids as $mlid) { + $menu_link = menu_link_load($mlid); + if (is_string($menu_link['options']['query'])) { + $menu_link['options']['query'] = drupal_get_query_array($menu_link['options']['query']); + menu_link_save($menu_link); + } + } +} + /** * @} End of "defgroup updates-7.x-extra". * The next series of updates should start at 8000. -- cgit v1.2.3