X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FSpecialMostrevisions.php;h=9479a5838829c66ad99e445c8a418bade4220b01;hb=772b5eb07e95144ae38fdceb3c1e2afbd588a4b7;hp=46c66ec47ae7e15a746728faba14c1e5b96ba041;hpb=3c9cf267a18fac42f76d8ef7f4a8dc016ad80894;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialMostrevisions.php b/includes/SpecialMostrevisions.php index 46c66ec47a..9479a58388 100644 --- a/includes/SpecialMostrevisions.php +++ b/includes/SpecialMostrevisions.php @@ -2,20 +2,15 @@ /** * A special page to show pages in the * - * @package MediaWiki - * @subpackage SpecialPage + * @addtogroup SpecialPage * * @author Ævar Arnfjörð Bjarmason * @copyright Copyright © 2005, Ævar Arnfjörð Bjarmason * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later */ -/* */ -require_once 'QueryPage.php'; - /** - * @package MediaWiki - * @subpackage SpecialPage + * @addtogroup SpecialPage */ class MostrevisionsPage extends QueryPage { @@ -24,8 +19,8 @@ class MostrevisionsPage extends QueryPage { function isSyndicated() { return false; } function getSQL() { - $dbr =& wfGetDB( DB_SLAVE ); - extract( $dbr->tableNames( 'revision', 'page' ) ); + $dbr = wfGetDB( DB_SLAVE ); + list( $revision, $page ) = $dbr->tableNamesN( 'revision', 'page' ); return " SELECT @@ -34,25 +29,26 @@ class MostrevisionsPage extends QueryPage { page_title as title, COUNT(*) as value FROM $revision - LEFT JOIN $page ON page_id = rev_page + JOIN $page ON page_id = rev_page WHERE page_namespace = " . NS_MAIN . " - GROUP BY rev_page, page_namespace, page_title + GROUP BY 1,2,3 HAVING COUNT(*) > 1 "; } function formatResult( $skin, $result ) { - global $wgContLang; + global $wgLang, $wgContLang; $nt = Title::makeTitle( $result->namespace, $result->title ); $text = $wgContLang->convert( $nt->getPrefixedText() ); $plink = $skin->makeKnownLinkObj( $nt, $text ); - $nl = wfMsg( 'nrevisions', $result->value ); + $nl = wfMsgExt( 'nrevisions', array( 'parsemag', 'escape'), + $wgLang->formatNum( $result->value ) ); $nlink = $skin->makeKnownLinkObj( $nt, $nl, 'action=history' ); - return "$plink ($nlink)"; + return wfSpecialList($plink, $nlink); } } @@ -67,4 +63,4 @@ function wfSpecialMostrevisions() { $wpp->doQuery( $offset, $limit ); } -?> +