Revert 30130, completely breaks editing with fatal PHP error.
[lhc/web/wiklou.git] / includes / SpecialLongpages.php
index 44fa88a..a8a1e19 100644 (file)
@@ -1,37 +1,33 @@
-<?
-
-include_once( "QueryPage.php" );
-
-class LongPagesPage extends QueryPage {
-    
-    function getName() {
-       return "Longpages";
-    }
-    
-    function isExpensive() {
-       return 1;
-    }
-    
-    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 " .
-         "LENGTH(cur_text) DESC LIMIT {$offset}, {$limit}";
-    }
-
-    function formatResult( $skin, $result ) {
-       $nb = wfMsg( "nbytes", $result->len );
-       $link = $skin->makeKnownLink( $result->cur_title, "" );
-       return "{$link} ({$nb})";
-    }
+<?php
+/**
+ *
+ * @addtogroup SpecialPage
+ */
+
+/**
+ *
+ * @addtogroup SpecialPage
+ */
+class LongPagesPage extends ShortPagesPage {
+
+       function getName() {
+               return "Longpages";
+       }
+
+       function sortDescending() {
+               return true;
+       }
 }
 
-function wfSpecialLongpages()
-{
-    list( $limit, $offset ) = wfCheckLimits();
+/**
+ * constructor
+ */
+function wfSpecialLongpages() {
+       list( $limit, $offset ) = wfCheckLimits();
 
-    $lpp = new LongPagesPage( );
-    
-    $lpp->doQuery( $offset, $limit );
+       $lpp = new LongPagesPage();
+
+       $lpp->doQuery( $offset, $limit );
 }
 
-?>
+