SpecialMovepageBeforeMove hook from Wikia codebase - allows extensions, such as spamR...
authorJack Phoenix <ashley@users.mediawiki.org>
Sat, 26 Jul 2008 21:38:51 +0000 (21:38 +0000)
committerJack Phoenix <ashley@users.mediawiki.org>
Sat, 26 Jul 2008 21:38:51 +0000 (21:38 +0000)
RELEASE-NOTES
docs/hooks.txt
includes/specials/SpecialMovepage.php

index a390a1c..dcfb640 100644 (file)
@@ -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 ===
 
index 8623599..8d60b0c 100644 (file)
@@ -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
index 9f8bd3e..5cda361 100644 (file)
@@ -264,6 +264,10 @@ class MovePageForm {
                        return;
                }
 
+               if( ! wfRunHooks( 'SpecialMovepageBeforeMove', array(&$this) ) ) {
+                       return;
+               }
+
                $ot = $this->oldTitle;
                $nt = $this->newTitle;