Skip to content
Snippets Groups Projects
Commit 1cab1dee authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent baa5c2ff
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment