Permalink
Browse files

[core:smartyplugin] correction for PHP < 5.2.3

  • Loading branch information...
nao-pon committed May 26, 2014
1 parent e2c9f69 commit 0250fd585e3d6334ac86a7eedc239eec95054981
Showing with 3 additions and 1 deletion.
  1. +3 −1 xoops_trust_path/libs/smarty/plugins/resource.db.php
@@ -20,7 +20,9 @@ function smarty_resource_db_systemTpl($tpl_name)
$root=&XCube_Root::getSingleton();
$systemTemplates = explode(',',$root->getSiteConfig('Legacy_RenderSystem','SystemTemplate',''));
$prefix = $root->getSiteConfig('Legacy_RenderSystem','SystemTemplatePrefix','legacy');
$patterns = preg_replace_callback('/^\s*([^\s]*)\s*$/', 'Legacy_ResourcedbUtils::makeRegexByMatched', $systemTemplates);
// correction for PHP < 5.2.3
$patterns = preg_replace_callback('/^\s*([^\s]*)\s*$/', array('Legacy_ResourcedbUtils', 'makeRegexByMatched'), $systemTemplates); //$patterns = preg_replace_callback('/^\s*([^\s]*)\s*$/', 'Legacy_ResourcedbUtils::makeRegexByMatched', $systemTemplates);
$replacements = preg_replace('/^\s*system_([^\s]*)\s*/', $prefix.'_\1', $systemTemplates);
}
if ($patterns) {

0 comments on commit 0250fd5

Please sign in to comment.