fix problem with retriving fresh LatestRevID when GAID_FOR_UPDATE
authortomek <dymsza@gmail.com>
Tue, 10 Jul 2012 19:11:26 +0000 (15:11 -0400)
committertomek <dymsza@gmail.com>
Wed, 11 Jul 2012 17:12:58 +0000 (13:12 -0400)
Change-Id: Idff009752da3336383a20581d79ffd231332f463

includes/Title.php

index 2b1a513..6ddf6da 100644 (file)
@@ -2859,7 +2859,7 @@ class Title {
         * @return Int or 0 if the page doesn't exist
         */
        public function getLatestRevID( $flags = 0 ) {
-               if ( $this->mLatestID !== false ) {
+               if ( !( $flags & Title::GAID_FOR_UPDATE ) && $this->mLatestID !== false ) {
                        return intval( $this->mLatestID );
                }
                # Calling getArticleID() loads the field from cache as needed