Merge "jquery.makeCollapsible: fix jQuery memory leak"
[lhc/web/wiklou.git] / includes / Pager.php
index 696c11b..c7f51a3 100644 (file)
@@ -593,7 +593,7 @@ abstract class IndexPager extends ContextSource implements Pager {
                        $this->doQuery();
                }
                // Hide navigation by default if there is nothing to page
-               return !($this->mIsFirst && $this->mIsLast);
+               return !( $this->mIsFirst && $this->mIsLast );
        }
 
        /**
@@ -1172,11 +1172,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();
        }