From b11a6d9e1601290c297f2a10eff25b3da1c44a66 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 25 Apr 2005 04:34:46 +0000 Subject: [PATCH] * (bug 1970) Don't show move tab for immobile pages --- includes/Title.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index 756705ea09..fa5c9c6783 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -865,6 +865,12 @@ class Title { return false; } } + + if( $action == 'move' && !$this->isMovable() ) { + wfProfileOut( $fname ); + return false; + } + wfProfileOut( $fname ); return true; } @@ -887,6 +893,17 @@ class Title { return $this->userCan('move'); } + /** + * Would anybody with sufficient privileges be able to mvoe this page? + * Some pages just ain't movable. + * + * @return boolean + * @access public + */ + function isMovable() { + return Namespace::isMovable( $this->getNamespace() ); + } + /** * Can $wgUser read this page? * @return boolean -- 2.20.1