X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=083a725d98376af9418a31192d896fbce2670d38;hb=6fd5e71ef9bfe940ae666dbd300c301b5299fab1;hp=c9f09f79e20b16068888ff3ea352cf552fd1672d;hpb=bf1d5b2ab367c9723300ec0fedaf565bb8eed8e5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index c9f09f79e2..083a725d98 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1020,12 +1020,25 @@ class Title implements LinkTarget { } /** - * Could this title have a corresponding talk page? + * Can this title have a corresponding talk page? * - * @return bool + * @deprecated since 1.30, use canHaveTalkPage() instead. + * + * @return bool True if this title either is a talk page or can have a talk page associated. */ public function canTalk() { - return MWNamespace::canTalk( $this->mNamespace ); + return $this->canHaveTalkPage(); + } + + /** + * Can this title have a corresponding talk page? + * + * @see MWNamespace::hasTalkNamespace + * + * @return bool True if this title either is a talk page or can have a talk page associated. + */ + public function canHaveTalkPage() { + return MWNamespace::hasTalkNamespace( $this->mNamespace ); } /** @@ -3722,8 +3735,8 @@ class Title implements LinkTarget { * @return array|bool True on success, getUserPermissionsErrors()-like array on failure */ public function moveTo( &$nt, $auth = true, $reason = '', $createRedirect = true, - array $changeTags = [] ) { - + array $changeTags = [] + ) { global $wgUser; $err = $this->isValidMoveOperation( $nt, $auth, $reason ); if ( is_array( $err ) ) { @@ -3760,8 +3773,8 @@ class Title implements LinkTarget { * no pages were moved */ public function moveSubpages( $nt, $auth = true, $reason = '', $createRedirect = true, - array $changeTags = [] ) { - + array $changeTags = [] + ) { global $wgMaximumMovedPages; // Check permissions if ( !$this->userCan( 'move-subpages' ) ) {