Commit 1cab1dee authored by Dries's avatar Dries
Browse files

- Patch #41594 by Richard: more improvements to primary/secondary links upgrade path.

parent baa5c2ff
......@@ -938,7 +938,13 @@ function system_update_151() {
// Gather links from various settings into a single array.
$phptemplate_links = variable_get("phptemplate_". $menus[$loop]['links_var'], array());
if (!is_array($phptemplate_links)) {
$phptemplate_links = array();
}
$phptemplate_links_more = variable_get("phptemplate_". $menus[$loop]['links_var'] ."_more", array());
if (!is_array($phptemplate_links_more)) {
$phptemplate_links_more = array();
}
if (isset($ts) && is_array($ts)) {
if (is_array($ts[$menus[$loop]['links_var']])) {
$theme_links = $ts[$menus[$loop]['links_var']];
......@@ -980,8 +986,10 @@ function system_update_151() {
db_query("DELETE FROM {menu} WHERE mid={$menus[$loop]['pid']}");
}
// set menu_primary_menu variable appropriately
if (!$ts[$menus[$loop]['toggle_var']] || $num_inserted == 0) {
// Set menu_primary_menu and menu_primary_menu variables if links were
// imported. If the user had links but the toggle display was off, they
// will need to disable the new links manually in admins/settings/menu.
if ($num_inserted == 0) {
variable_set($menus[$loop]['menu_var'], 0);
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment