diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-14 10:22:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-14 10:22:26 +0000 |
commit | 1cab1dee606e5c62e3591c062827a8602f39bb72 (patch) | |
tree | 70b99bd89dd9581314fba9b3cf72992dd5453c1e /database | |
parent | baa5c2ff8965023633d15a6d878ebe3757548ab4 (diff) | |
download | brdo-1cab1dee606e5c62e3591c062827a8602f39bb72.tar.gz brdo-1cab1dee606e5c62e3591c062827a8602f39bb72.tar.bz2 |
- Patch #41594 by Richard: more improvements to primary/secondary links upgrade path.
Diffstat (limited to 'database')
-rw-r--r-- | database/updates.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/database/updates.inc b/database/updates.inc index 7b727f60a..a79edcea1 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -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 { |