diff options
author | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-28 13:00:23 +0000 |
---|---|---|
committer | Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org> | 2006-04-28 13:00:23 +0000 |
commit | 0269a7893615b05a9323cde6b70d3a0c31c4d6ff (patch) | |
tree | 40622998d7292123fe53e8084933c0417776267b /database | |
parent | d04b65967327b770cf9b9eb7a4e8bbfb502cd1a5 (diff) | |
download | brdo-0269a7893615b05a9323cde6b70d3a0c31c4d6ff.tar.gz brdo-0269a7893615b05a9323cde6b70d3a0c31c4d6ff.tar.bz2 |
#41594, make upgrade more robust for 4.6 phptemplate users, patch by tenrapid
Diffstat (limited to 'database')
-rw-r--r-- | database/updates.inc | 13 |
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; |