*Fix bug with year 9999
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 23 Jun 2007 20:00:49 +0000 (20:00 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 23 Jun 2007 20:00:49 +0000 (20:00 +0000)
includes/SpecialContributions.php

index 124188b..eeed985 100644 (file)
@@ -94,7 +94,9 @@ class ContribsPager extends IndexPager {
                        $ts_end = str_pad($year_end . $month_end, 14, '0' );
                        
                        $condition[] = "rev_timestamp >= $ts_start";
-                       $condition[] = "rev_timestamp < $ts_end";
+                       # If just given the year 9999, we need not enforce an upper bound
+                       if( strlen($year_end) <= 4 )
+                               $condition[] = "rev_timestamp < $ts_end";
                }
                
                return $condition;