Merge "Soft deprecate Title::getUserCaseDBKey()"
[lhc/web/wiklou.git] / includes / Title.php
index f480c30..55c5cd9 100644 (file)
@@ -979,6 +979,8 @@ class Title implements LinkTarget {
        /**
         * Get the page's content model id, see the CONTENT_MODEL_XXX constants.
         *
+        * @todo Deprecate this in favor of SlotRecord::getModel()
+        *
         * @param int $flags A bit field; may be Title::GAID_FOR_UPDATE to select for update
         * @return string Content model id
         */
@@ -1660,7 +1662,7 @@ class Title implements LinkTarget {
                        $p = $this->mInterwiki . ':';
                }
 
-               if ( 0 != $this->mNamespace ) {
+               if ( $this->mNamespace != 0 ) {
                        $nsText = $this->getNsText();
 
                        if ( $nsText === false ) {
@@ -2688,9 +2690,9 @@ class Title implements LinkTarget {
                        $errors[] = [ 'confirmedittext' ];
                }
 
-               $useSlave = ( $rigor !== 'secure' );
+               $useReplica = ( $rigor !== 'secure' );
                if ( ( $action == 'edit' || $action == 'create' )
-                       && !$user->isBlockedFrom( $this, $useSlave )
+                       && !$user->isBlockedFrom( $this, $useReplica )
                ) {
                        // Don't block the user from editing their own talk page unless they've been
                        // explicitly blocked from that too.
@@ -3572,7 +3574,7 @@ class Title implements LinkTarget {
                        $this->mArticleID = $linkCache->addLinkObj( $this );
                        $linkCache->forUpdate( $oldUpdate );
                } else {
-                       if ( -1 == $this->mArticleID ) {
+                       if ( $this->mArticleID == -1 ) {
                                $this->mArticleID = $linkCache->addLinkObj( $this );
                        }
                }