From 2a1ce6a8ed22f256ad00ae51fffcc8eb7f9d8c07 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 6 Nov 2011 11:32:12 +0100 Subject: [PATCH] MDL-30150 support frankenstyle in page type callbacks --- lib/blocklib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index d91fa512b5c..1725beada61 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -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;