$title: Title object that is being checked
$result: Boolean; whether MediaWiki currently thinks this is a CSS/JS page. Hooks may change this value to override the return value of Title::isCssOrJsPage()
-'TitleIsMovable': Called when determining if it is possible to move a page
+'TitleIsMovable': Called when determining if it is possible to move a page.
+Note that this hook is not called for interwiki pages or pages in immovable namespaces: for these, isMovable() always returns false.
$title: Title object that is being checked
$result: Boolean; whether MediaWiki currently thinks this page is movable. Hooks may change this value to override the return value of Title::isMovable()
* @return Bool TRUE or FALSE
*/
public function isMovable() {
- $result = MWNamespace::isMovable( $this->getNamespace() ) && $this->getInterwiki() == '';
+ if ( !MWNamespace::isMovable( $this->getNamespace() ) || $this->getInterwiki() != '' ) {
+ // Interwiki title or immovable namespace. Hooks don't get to override here
+ return false;
+ }
+
+ $result = true;
wfRunHooks( 'TitleIsMovable', array( $this, &$result ) );
return $result;
}