From: Brion Vibber Date: Mon, 25 Apr 2005 04:34:46 +0000 (+0000) Subject: * (bug 1970) Don't show move tab for immobile pages X-Git-Tag: 1.5.0alpha1~149 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=b11a6d9e1601290c297f2a10eff25b3da1c44a66;p=lhc%2Fweb%2Fwiklou.git * (bug 1970) Don't show move tab for immobile pages --- 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