FU r100286: Added sanity check to fetchFromConds() join conds
authorAaron Schulz <aaron@users.mediawiki.org>
Wed, 19 Oct 2011 23:56:48 +0000 (23:56 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Wed, 19 Oct 2011 23:56:48 +0000 (23:56 +0000)
includes/Revision.php

index 8009b81..065d7f9 100644 (file)
@@ -277,7 +277,7 @@ class Revision {
                        __METHOD__,
                        array( 'LIMIT' => 1 ),
                        array( 'page' => array( 'INNER JOIN', 'page_id = rev_page' ),
-                               'user' => array( 'LEFT JOIN', 'user_id = rev_user' ) )
+                               'user' => array( 'LEFT JOIN', 'rev_user != 0 AND user_id = rev_user' ) )
                );
        }