MDL-30150 support frankenstyle in page type callbacks

This commit is contained in:
Petr Skoda
2011-11-06 11:32:12 +01:00
parent 735de1c276
commit 2a1ce6a8ed
+4 -1
View File
@@ -1623,7 +1623,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;