Removed READ_LATEST default from Revision::newFromTitle().
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 26 Sep 2012 21:48:33 +0000 (14:48 -0700)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 9 Oct 2012 16:35:51 +0000 (16:35 +0000)
Change-Id: I12bc0285147fff8d6f523a38950cf3f3cb51933f

includes/Revision.php

index 4874490..1b2db36 100644 (file)
@@ -87,7 +87,7 @@ class Revision implements IDBAccessObject {
         * @param $flags Integer Bitfield (optional)
         * @return Revision or null
         */
-       public static function newFromTitle( $title, $id = 0, $flags = null ) {
+       public static function newFromTitle( $title, $id = 0, $flags = 0 ) {
                $conds = array(
                        'page_namespace' => $title->getNamespace(),
                        'page_title'     => $title->getDBkey()
@@ -98,8 +98,6 @@ class Revision implements IDBAccessObject {
                } else {
                        // Use a join to get the latest revision
                        $conds[] = 'rev_id=page_latest';
-                       // Callers assume this will be up-to-date
-                       $flags = is_int( $flags ) ? $flags : self::READ_LATEST; // b/c
                }
                return self::newFromConds( $conds, (int)$flags );
        }