Author: vickery.matthew
Description:
The hooks SpecialPageExecuteBeforePage and SpecialPageExecuteAfterPage are broken broken for extensions and anything else that subclasses SpecialPage.
There is a note in includes/SpecialPage.php where these hooks are called stating that it is broken for extensions, see below:
FIXME: these hooks are broken for extensions and anything else that subclasses SpecialPage.
I am attempting to modify the Special:Preferences page via an extension rather than directly within the core code. See my code below which is not working as expected:
$wgHooks['SpecialPageExecuteBeforePage'][] = 'CustomUserPreferencesPage';
function CustomUserPreferencesPage($specialpage, $par, $func) {
// Check if this hook has been called from the correct page if ($specialpage->mName == 'Preferences') { global $IP ; $specialpage->file($IP . "/extensions/CustomUserPreferencesPage/templates/CustomSpecialPreferences.php") ; } return true ;
}
Version: 1.10.x
Severity: blocker
URL: http://www.mediawiki.org/wiki/Manual:MediaWiki_hooks/SpecialPageExecuteBeforePage