# HG changeset patch # User Dan # Date 1208224952 14400 # Node ID a43f9d646dc7621a174b1ba7000f69d19b640e19 # Parent 547b7ba6d535729be042e064f2467882feeb8b22# Parent b31eb2b6c13793d7d512e2d9ff16e8ff10151ae4 Merging changes from nighthawk diff -r 547b7ba6d535 -r a43f9d646dc7 includes/clientside/static/acl.js --- a/includes/clientside/static/acl.js Mon Apr 14 22:02:04 2008 -0400 +++ b/includes/clientside/static/acl.js Mon Apr 14 22:02:32 2008 -0400 @@ -774,7 +774,7 @@ if(do_scopesel) { - scope = getRadioState(thefrm, 'scope', ['page', 'global']); + scope = getRadioState(thefrm, 'scope', ['page', 'group', 'global']); if(scope == 'page') { pageid = strToPageID(title); diff -r 547b7ba6d535 -r a43f9d646dc7 includes/template.php --- a/includes/template.php Mon Apr 14 22:02:04 2008 -0400 +++ b/includes/template.php Mon Apr 14 22:02:32 2008 -0400 @@ -1933,15 +1933,12 @@ $keywords = implode('|', $keywords); // Matches - // 1 2 3 4 56 7 8 - $regexp = '/()(.*)(()(.*))?()/isU'; + // 1 2 3 4 56 7 8 9 + $regexp = '/()(.*)(()(.*))?()/isU'; /* The way this works is: match all blocks using the standard form with a different keyword in the block each time, and replace them with appropriate PHP logic. Plugin-extensible now. :-) - - The while-loop is to bypass what is apparently a PCRE bug. It's hackish but it works. Properly written plugins should only need - to compile templates (using this method) once for each time the template file is changed. */ profiler_log("[template] compiler matchout start"); @@ -2018,6 +2015,16 @@ // System messages $text = preg_replace('//is', '\' . $template->tplWikiFormat($paths->sysMsg(\'\\1\')) . \'', $text); + // only do this if the plugins API is loaded + if ( is_object(@$plugins) ) + { + $code = $plugins->setHook('template_compile_subst'); + foreach ( $code as $cmd ) + { + eval($cmd); + } + } + // Template variables $text = preg_replace('/\{([A-z0-9_-]+?)\}/is', '\' . $this->tpl_strings[\'\\1\'] . \'', $text);