summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--database/updates.inc13
1 files changed, 5 insertions, 8 deletions
diff --git a/database/updates.inc b/database/updates.inc
index 5d65503cd..df676513c 100644
--- a/database/updates.inc
+++ b/database/updates.inc
@@ -946,12 +946,8 @@ 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 (empty($phptemplate_links)) {
+ $phptemplate_links = array('text' => array(), 'link' => array());
}
if (isset($ts) && is_array($ts)) {
if (is_array($ts[$menus[$loop]['links_var']])) {
@@ -965,9 +961,10 @@ function system_update_151() {
}
}
else {
- $theme_links = array();
+ $theme_links = array('text' => array(), 'link' => array());
}
- $links = array_merge($phptemplate_links, $phptemplate_links_more, $theme_links);
+ $links['text'] = array_merge($phptemplate_links['text'], $theme_links['text']);
+ $links['link'] = array_merge($phptemplate_links['link'], $theme_links['link']);
// insert all entries from theme links into new menus
$num_inserted = 0;