Commit bc121d6e authored by Dries's avatar Dries

- Patch #42951 by Matt Westgate: bugfix: fixed migration path of primary links...

- Patch #42951 by Matt Westgate: bugfix: fixed migration path of primary links when using Xtemplate.
parent fb393415
......@@ -939,8 +939,16 @@ function system_update_151() {
// Gather links from various settings into a single array.
$phptemplate_links = variable_get("phptemplate_". $menus[$loop]['links_var'], array());
$phptemplate_links_more = variable_get("phptemplate_". $menus[$loop]['links_var'] ."_more", array());
if (isset($ts) && is_array($ts) && is_array($ts[$menus[$loop]['links_var']])) {
$theme_links = $ts[$menus[$loop]['links_var']];
if (isset($ts) && is_array($ts)) {
if (is_array($ts[$menus[$loop]['links_var']])) {
$theme_links = $ts[$menus[$loop]['links_var']];
}
else {
// Convert old xtemplate style links.
preg_match_all('/<a\s+.*?href=[\"\'\s]?(.*?)[\"\'\s]?>(.*?)<\/a>/i', $ts[$menus[$loop]['links_var']], $urls);
$theme_links['text'] = $urls[2];
$theme_links['link'] = $urls[1];
}
}
else {
$theme_links = array();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment