Skip to content
Snippets Groups Projects
Commit 0269a789 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#41594, make upgrade more robust for 4.6 phptemplate users, patch by tenrapid

parent d04b6596
No related branches found
No related tags found
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
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment