Merge "Removed READ_LATEST default from Revision::newFromTitle()."
authorDemon <chadh@wikimedia.org>
Mon, 15 Oct 2012 14:57:02 +0000 (14:57 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 15 Oct 2012 14:57:02 +0000 (14:57 +0000)
includes/Revision.php

index 2bc98c6..c39183b 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 );
        }