(bug 20256) Fixed SQL errors on Special:Recentchanges and Special:Recentchangeslinked...
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchanges.php
index 85ace3c..1d38e57 100644 (file)
@@ -306,7 +306,11 @@ class SpecialRecentChanges extends SpecialPage {
                // Is there either one namespace selected or excluded?
                // Tag filtering also has a better index.
                // Also, if this is "all" or main namespace, just use timestamp index.
-               if( is_null($namespace) || $invert || $opts['tagfilter'] ) {
+               if( is_null($namespace)
+                       || $invert
+                       || $opts['tagfilter'] 
+                       || !$dbr->unionSupportsOrderAndLimit() )
+               {
                        $res = $dbr->select( $tables, '*', $conds, __METHOD__,
                                array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
                                $query_options,