WARNING: HUGE COMMIT
[lhc/web/wiklou.git] / includes / SpecialMostimages.php
index e65e9e8..2fed0bd 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 /**
- * @addtogroup SpecialPage
+ * @file
+ * @ingroup SpecialPage
  *
  * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
@@ -8,16 +9,17 @@
  */
 
 /**
- * @addtogroup SpecialPage
+ * implements Special:Mostimages
+ * @ingroup SpecialPage
  */
-class MostimagesPage extends QueryPage {
+class MostimagesPage extends ImageQueryPage {
 
        function getName() { return 'Mostimages'; }
        function isExpensive() { return true; }
        function isSyndicated() { return false; }
 
        function getSQL() {
-               $dbr =& wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_SLAVE );
                $imagelinks = $dbr->tableName( 'imagelinks' );
                return
                        "
@@ -32,20 +34,12 @@ class MostimagesPage extends QueryPage {
                        ";
        }
 
-       function formatResult( $skin, $result ) {
-               global $wgLang, $wgContLang;
-
-               $nt = Title::makeTitle( $result->namespace, $result->title );
-               $text = $wgContLang->convert( $nt->getPrefixedText() );
-
-               $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
-
-               $nl = wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
-                       $wgLang->formatNum ( $result->value ) );
-               $nlink = $skin->makeKnownLink( $nt->getPrefixedText() . '#filelinks', $nl );
-
-               return wfSpecialList($plink, $nlink);
+       function getCellHtml( $row ) {
+               global $wgLang;
+               return wfMsgExt( 'nlinks',  array( 'parsemag', 'escape' ),
+                       $wgLang->formatNum( $row->value ) ) . '<br />';
        }
+
 }
 
 /**
@@ -58,5 +52,3 @@ function wfSpecialMostimages() {
 
        $wpp->doQuery( $offset, $limit );
 }
-
-?>