diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-08-26 10:40:05 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-08-26 10:40:05 -0700 |
commit | fe87f404c11f7db18781fa885a77f7c93b90cf2a (patch) | |
tree | ae047419de0d0f272e4c8a625b14ac9dc001a707 /modules/system/system.install | |
parent | 5ddd5d38393ac60f12a418526d8ab53c56a49ba6 (diff) | |
download | brdo-fe87f404c11f7db18781fa885a77f7c93b90cf2a.tar.gz brdo-fe87f404c11f7db18781fa885a77f7c93b90cf2a.tar.bz2 |
Issue #1613554 by drumm, BTMash: Fixed Update menu link queries from 6's strings.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 22 |
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. */ |