修复因变量同名时 进行插件链接伪静态时多次输出问题

This commit is contained in:
Ruing 2017-01-29 18:44:18 +08:00
parent 50ed449e6f
commit 7b8ce575cd
1 changed files with 2 additions and 2 deletions

View File

@ -467,9 +467,9 @@ function build_cache_setting() {
$data['topnavs'][$id]['code'] = preg_replace_callback($value, create_function('$matches', 'return '.$output['preg']['replace'][$key].';'), $nav['code']);
}
}
foreach($data['plugins']['jsmenu'] as $key => $nav) {
foreach($data['plugins']['jsmenu'] as $id => $nav) {
foreach ($output['preg']['search'] as $key => $value) {
$data['plugins']['jsmenu'][$key]['url'] = preg_replace_callback($value, create_function('$matches', 'return '.$output['preg']['replace'][$key].';'), $nav['url']);
$data['plugins']['jsmenu'][$id]['url'] = preg_replace_callback($value, create_function('$matches', 'return '.$output['preg']['replace'][$key].';'), $nav['url']);
}
}
}