Two new hooks to EditPage.php, EditPage::AfterEdit:Form and EditPage:BeforeDisplaying...
[lhc/web/wiklou.git] / includes / SpecialLongpages.php
index d2ba4ff..be16a02 100644 (file)
@@ -1,57 +1,31 @@
 <?php
 /**
- *
- */
-
-/**
- *
+ * @file
+ * @ingroup SpecialPage
  */
-require_once( "QueryPage.php" );
 
 /**
  *
+ * @ingroup SpecialPage
  */
-class LongPagesPage extends QueryPage {
+class LongPagesPage extends ShortPagesPage {
 
        function getName() {
                return "Longpages";
        }
 
-       function isExpensive() {
+       function sortDescending() {
                return true;
        }
-
-       function getSQL() {
-               $dbr =& wfGetDB( DB_SLAVE );
-               $cur = $dbr->tableName( 'cur' );
-
-               return
-                       "SELECT 'Longpages' 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 formatResult( $skin, $result ) {
-               global $wgLang;
-               $nb = wfMsg( "nbytes", $wgLang->formatNum( $result->value ) );
-               $link = $skin->makeKnownLink( $result->title, "" );
-               return "{$link} ({$nb})";
-       }
 }
 
 /**
  * constructor
  */
-function wfSpecialLongpages()
-{
-    list( $limit, $offset ) = wfCheckLimits();
+function wfSpecialLongpages() {
+       list( $limit, $offset ) = wfCheckLimits();
 
-    $lpp = new LongPagesPage( );
-    
-    $lpp->doQuery( $offset, $limit );
-}
+       $lpp = new LongPagesPage();
 
-?>
+       $lpp->doQuery( $offset, $limit );
+}