diff options
author | webchick <webchick@24967.no-reply.drupal.org> | 2012-07-07 13:12:22 -0700 |
---|---|---|
committer | webchick <webchick@24967.no-reply.drupal.org> | 2012-07-07 13:12:22 -0700 |
commit | 1e4c645282fc84d5ee2fc0b27af11ba360ce71d2 (patch) | |
tree | 37f40bf14d8e66b166ce5a1dc710db65e99e93c4 | |
parent | 2cd91be6330e1678e2d4c61b64da25db28559b8d (diff) | |
download | brdo-1e4c645282fc84d5ee2fc0b27af11ba360ce71d2.tar.gz brdo-1e4c645282fc84d5ee2fc0b27af11ba360ce71d2.tar.bz2 |
Issue #1613554 by drumm, BTMash: Fixed Update menu link queries from 6's strings.
-rw-r--r-- | modules/simpletest/tests/upgrade/drupal-6.menu.database.php | 27 | ||||
-rw-r--r-- | modules/system/system.install | 17 |
2 files changed, 44 insertions, 0 deletions
diff --git a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php index 8962615fb..7fae337aa 100644 --- a/modules/simpletest/tests/upgrade/drupal-6.menu.database.php +++ b/modules/simpletest/tests/upgrade/drupal-6.menu.database.php @@ -126,6 +126,33 @@ db_insert('menu_links')->fields(array( 'p9' => '0', 'updated' => '0', )) +->values(array( + 'menu_name' => 'secondary-links', + 'mlid' => '206', + 'plid' => '0', + 'link_path' => 'node', + 'router_path' => 'node', + 'link_title' => 'node-page-with-query', + 'options' => 'a:2:{s:5:"query";s:14:"page=1&node=10";s:10:"attributes";a:1:{s:5:"title";s:0:"";}}', + 'module' => 'menu', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '0', + 'expanded' => '0', + 'weight' => '2', + 'depth' => '1', + 'customized' => '1', + 'p1' => '206', + 'p2' => '0', + 'p3' => '0', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', +)) ->execute(); db_insert('blocks')->fields(array( 'bid', 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 @@ -3016,6 +3016,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. */ |