Merge "Don't purge thumbs for old versions of an image during ?action=purge"
[lhc/web/wiklou.git] / includes / Pager.php
index c2bd364..89930e2 100644 (file)
@@ -872,9 +872,10 @@ abstract class ReverseChronologicalPager extends IndexPager {
                        $year = $this->mYear;
                } else {
                        // If no year given, assume the current one
-                       $year = gmdate( 'Y' );
+                       $timestamp = MWTimestamp::getInstance();
+                       $year = $timestamp->format( 'Y' );
                        // If this month hasn't happened yet this year, go back to last year's month
-                       if ( $this->mMonth > gmdate( 'n' ) ) {
+                       if ( $this->mMonth > $timestamp->format( 'n' ) ) {
                                $year--;
                        }
                }
@@ -1172,11 +1173,15 @@ abstract class TablePager extends IndexPager {
        /**
         * Get a "<select>" element which has options for each of the allowed limits
         *
+        * @param $attribs String: Extra attributes to set
         * @return String: HTML fragment
         */
-       public function getLimitSelect() {
+       public function getLimitSelect( $attribs = array() ) {
                $select = new XmlSelect( 'limit', false, $this->mLimit );
                $select->addOptions( $this->getLimitSelectList() );
+               foreach ( $attribs as $name => $value ) {
+                       $select->setAttribute( $name, $value );
+               }
                return $select->getHTML();
        }