| Index: trunk/phase3/docs/hooks.txt |
| — | — | @@ -1805,7 +1805,8 @@ |
| 1806 | 1806 | $title: Title object that is being checked |
| 1807 | 1807 | $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() |
| 1808 | 1808 | |
| 1809 | | -'TitleIsMovable': Called when determining if it is possible to move a page |
| | 1809 | +'TitleIsMovable': Called when determining if it is possible to move a page. |
| | 1810 | +Note that this hook is not called for interwiki pages or pages in immovable namespaces: for these, isMovable() always returns false. |
| 1810 | 1811 | $title: Title object that is being checked |
| 1811 | 1812 | $result: Boolean; whether MediaWiki currently thinks this page is movable. Hooks may change this value to override the return value of Title::isMovable() |
| 1812 | 1813 | |
| Index: trunk/phase3/includes/Title.php |
| — | — | @@ -1786,7 +1786,12 @@ |
| 1787 | 1787 | * @return Bool TRUE or FALSE |
| 1788 | 1788 | */ |
| 1789 | 1789 | public function isMovable() { |
| 1790 | | - $result = MWNamespace::isMovable( $this->getNamespace() ) && $this->getInterwiki() == ''; |
| | 1790 | + if ( !MWNamespace::isMovable( $this->getNamespace() ) || $this->getInterwiki() != '' ) { |
| | 1791 | + // Interwiki title or immovable namespace. Hooks don't get to override here |
| | 1792 | + return false; |
| | 1793 | + } |
| | 1794 | + |
| | 1795 | + $result = true; |
| 1791 | 1796 | wfRunHooks( 'TitleIsMovable', array( $this, &$result ) ); |
| 1792 | 1797 | return $result; |
| 1793 | 1798 | } |