Merge "Add language Doteli (dty)"
[lhc/web/wiklou.git] / includes / specialpage / QueryPage.php
index bd3b55b..69e1d8c 100644 (file)
@@ -470,6 +470,18 @@ abstract class QueryPage extends SpecialPage {
                return $this->cachedTimestamp;
        }
 
+       /**
+        * Returns limit and offset, as returned by $this->getRequest()->getLimitOffset().
+        * Subclasses may override this to further restrict or modify limit and offset.
+        *
+        * @since 1.26
+        *
+        * @return int[] list( $limit, $offset )
+        */
+       protected function getLimitOffset() {
+               return $this->getRequest()->getLimitOffset();
+       }
+
        /**
         * This is the actual workhorse. It does everything needed to make a
         * real, honest-to-gosh query page.
@@ -495,7 +507,7 @@ abstract class QueryPage extends SpecialPage {
                $out->setSyndicated( $this->isSyndicated() );
 
                if ( $this->limit == 0 && $this->offset == 0 ) {
-                       list( $this->limit, $this->offset ) = $this->getRequest()->getLimitOffset();
+                       list( $this->limit, $this->offset ) = $this->getLimitOffset();
                }
 
                // @todo Use doQuery()