diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-01-09 06:40:11 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-01-09 06:40:11 +0000 |
commit | bc121d6e03d506cac2eb2614e661d1d1543fd8e6 (patch) | |
tree | 13b8366893a79ff455c20ce95fcab02dd8c698ae /database | |
parent | fb393415bbbb0d943f0716bafa95ba8e7889e33b (diff) | |
download | brdo-bc121d6e03d506cac2eb2614e661d1d1543fd8e6.tar.gz brdo-bc121d6e03d506cac2eb2614e661d1d1543fd8e6.tar.bz2 |
- Patch #42951 by Matt Westgate: bugfix: fixed migration path of primary links when using Xtemplate.
Diffstat (limited to 'database')
-rw-r--r-- | database/updates.inc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/database/updates.inc b/database/updates.inc index e7a1a24be..6511ae991 100644 --- a/database/updates.inc +++ b/database/updates.inc @@ -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(); |