Fix variable name in doc comment added in r78192
[lhc/web/wiklou.git] / includes / Title.php
index 599b808..9adc9a8 100644 (file)
@@ -2645,7 +2645,9 @@ class Title {
                                        $this->mInterwiki = $wgContLang->lc( $p );
 
                                        # Redundant interwiki prefix to the local wiki
-                                       if ( 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) {
+                                       if ( $wgLocalInterwiki !== false
+                                               && 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) 
+                                       {
                                                if ( $dbkey == '' ) {
                                                        # Can't have an empty self-link
                                                        return false;
@@ -3746,11 +3748,11 @@ class Title {
         */
        public function countRevisionsBetween( $old, $new ) {
                $dbr = wfGetDB( DB_SLAVE );
-               return (int)$dbr->selectField( 'revision', 'count(*)',
-                       'rev_page = ' . intval( $this->getArticleId() ) .
-                       ' AND rev_id > ' . intval( $old ) .
-                       ' AND rev_id < ' . intval( $new ),
-                       __METHOD__
+               return (int)$dbr->selectField( 'revision', 'count(*)', array(
+                               'rev_page' => intval( $this->getArticleId() ),
+                               'rev_id > ' . intval( $old ),
+                               'rev_id < ' . intval( $new )
+                       ), __METHOD__
                );
        }
 
@@ -3768,7 +3770,7 @@ class Title {
                $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE );
                $res = $db->select( 'revision', 'DISTINCT rev_user_text',
                        array(
-                               'rev_page = ' . $this->getArticleID(),
+                               'rev_page' => $this->getArticleID(),
                                'rev_id > ' . (int)$fromRevId,
                                'rev_id < ' . (int)$toRevId
                        ), __METHOD__,