MDL-30150 support frankenstyle in page type callbacks

This commit is contained in:
Petr Skoda
2011-11-10 09:43:33 +13:00
committed by Sam Hemelryk
parent 4ca2c772be
commit a3367a1711
+4 -1
View File
@@ -1624,7 +1624,10 @@ function generate_page_type_patterns($pagetype, $parentcontext = null, $currentc
$libfile = $directory.'/lib.php';
if (file_exists($libfile)) {
require_once($libfile);
$function = $pluginname.'_page_type_list';
$function = $possiblecomponent.'_'.$pluginname.'_page_type_list';
if (!function_exists($function)) {
$function = $pluginname.'_page_type_list';
}
if (function_exists($function)) {
if ($patterns = $function($pagetype, $parentcontext, $currentcontext)) {
break;