From: Jack Phoenix Date: Sat, 26 Jul 2008 21:38:51 +0000 (+0000) Subject: SpecialMovepageBeforeMove hook from Wikia codebase - allows extensions, such as spamR... X-Git-Tag: 1.31.0-rc.0~46357 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=dfb8cf2d03d407032b39e3a66cc428cd9654c94c;p=lhc%2Fweb%2Fwiklou.git SpecialMovepageBeforeMove hook from Wikia codebase - allows extensions, such as spamRegex, to interfere with page moving --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a390a1c6a4..dcfb640441 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -32,6 +32,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN search engine indexing on a per-article basis. * Added ConfirmEmailComplete hook to allow extensions to perform actions depending on if the user's email is confirmed or not +* Added SpecialMovepageBeforeMove hook to allow extensions to interfere with + page moves (useful for blacklist-type extensions, for example) === Bug fixes in 1.14 === diff --git a/docs/hooks.txt b/docs/hooks.txt index 8623599b70..8d60b0cde9 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -1134,6 +1134,9 @@ $movePage: MovePageForm object $oldTitle: old title (object) $newTitle: new title (object) +'SpecialMovepageBeforeMove': Called before moving a page +&$this: the submitted form object + 'SpecialPageExecuteAfterPage': called after executing a special page Warning: Not all the special pages call this hook $specialPage: SpecialPage object diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 9f8bd3e89b..5cda361fb9 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -264,6 +264,10 @@ class MovePageForm { return; } + if( ! wfRunHooks( 'SpecialMovepageBeforeMove', array(&$this) ) ) { + return; + } + $ot = $this->oldTitle; $nt = $this->newTitle;