Added SpecialPageAfterExecute and SpecialPageBeforeExecute hooks
Danwe apparently needs them :) Change-Id: Ic74c7ba7f4168d2b0cfbd3c4e551218f6cb2693a
This commit is contained in:
parent
ea3c298777
commit
c8c50eb1ef
3 changed files with 30 additions and 0 deletions
|
|
@ -28,6 +28,8 @@ upgrade PHP if you have not done so prior to upgrading MediaWiki.
|
|||
* Added TitleIsAlwaysKnown hook which gets called when determining if a page exists.
|
||||
* Added NamespaceIsMovable hook which gets called when determining if pages in a
|
||||
certain namespace can be moved.
|
||||
* Added SpecialPageBeforeExecute hook which gets called before SpecialPage::execute.
|
||||
* Added SpecialPageAfterExecute hook which gets called after SpecialPage::execute.
|
||||
* (bug 32341) Add upload by URL domain limitation.
|
||||
* &useskin=default will now always display the default skin. Useful for users with a
|
||||
preference for the non-default skin to look at something using the default skin.
|
||||
|
|
|
|||
|
|
@ -1852,6 +1852,14 @@ Each key maps to an associative array with a 'msg' (message key) and a 'default'
|
|||
hook to remove a core special page
|
||||
$list: list (array) of core special pages
|
||||
|
||||
'SpecialPageAfterExecute': called after SpecialPage::execute
|
||||
$special: the SpecialPage object
|
||||
$subPage: the subpage string or null if no subpage was specified
|
||||
|
||||
'SpecialPageBeforeExecute': called before SpecialPage::execute
|
||||
$special: the SpecialPage object
|
||||
$subPage: the subpage string or null if no subpage was specified
|
||||
|
||||
'SpecialPasswordResetOnSubmit': when executing a form submission on Special:PasswordReset
|
||||
$users: array of User objects
|
||||
$data: array of data submitted by the user
|
||||
|
|
|
|||
|
|
@ -597,9 +597,29 @@ class SpecialPage {
|
|||
* @param $subPage string|null
|
||||
*/
|
||||
public final function run( $subPage ) {
|
||||
/**
|
||||
* Gets called before @see SpecialPage::execute.
|
||||
*
|
||||
* @since 1.20
|
||||
*
|
||||
* @param $special SpecialPage
|
||||
* @param $subPage string|null
|
||||
*/
|
||||
wfRunHooks( 'SpecialPageBeforeExecute', array( &$this, $subPage ) );
|
||||
|
||||
$this->beforeExecute( $subPage );
|
||||
$this->execute( $subPage );
|
||||
$this->afterExecute( $subPage );
|
||||
|
||||
/**
|
||||
* Gets called after @see SpecialPage::execute.
|
||||
*
|
||||
* @since 1.20
|
||||
*
|
||||
* @param $special SpecialPage
|
||||
* @param $subPage string|null
|
||||
*/
|
||||
wfRunHooks( 'SpecialPageAfterExecute', array( &$this, $subPage ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue