(bug 9575) Accept upload description from GET parameters
[lhc/web/wiklou.git] / includes / SpecialMostimages.php
index 45ab147..beb42fc 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
  *
  * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
  * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason
@@ -9,18 +8,18 @@
  */
 
 /**
- * @package MediaWiki
- * @subpackage SpecialPage
+ * implements Special:Mostimages
+ * @addtogroup 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 );
-               extract( $dbr->tableNames( 'imagelinks' ) );
+               $dbr = wfGetDB( DB_SLAVE );
+               $imagelinks = $dbr->tableName( 'imagelinks' );
                return
                        "
                        SELECT
@@ -34,20 +33,12 @@ class MostimagesPage extends QueryPage {
                        ";
        }
 
-       function formatResult( $result ) {
-               global $wgLang, $wgContLang;
-
-               $nt = Title::makeTitle( $result->namespace, $result->title );
-               $text = $wgContLang->convert( $nt->getPrefixedText() );
-
-               $plink = Linker::makeKnownLink( $nt->getPrefixedText(), $text );
-
-               $nl = wfMsgExt( 'nlinks', array( 'parsemag', 'escape'),
-                       $wgLang->formatNum ( $result->value ) );
-               $nlink = Linker::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 />';
        }
+
 }
 
 /**
@@ -61,4 +52,4 @@ function wfSpecialMostimages() {
        $wpp->doQuery( $offset, $limit );
 }
 
-?>
+