- function getSQL( $offset, $limit ) {
- return "SELECT cur_title, LENGTH(cur_text) AS len FROM cur " .
- "WHERE cur_namespace=0 AND cur_is_redirect=0 ORDER BY len " .
- "LIMIT {$offset}, {$limit}";
+ function getSQL() {
+ $dbr =& wfGetDB( DB_SLAVE );
+ $cur = $dbr->tableName( 'cur' );
+
+ return
+ "SELECT 'Shortpages' as type,
+ cur_namespace as namespace,
+ cur_title as title,
+ LENGTH(cur_text) AS value
+ FROM $cur
+ WHERE cur_namespace=0 AND cur_is_redirect=0";
+ }
+
+ function sortDescending() {
+ return false;