From: Alexandre Emsenhuber Date: Fri, 20 Feb 2009 10:29:44 +0000 (+0000) Subject: Per siebrand and Nikerabbit (tweak for r47535): X-Git-Tag: 1.31.0-rc.0~42776 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=3141337d77504b52045406c540a371f3444d40fc;p=lhc%2Fweb%2Fwiklou.git Per siebrand and Nikerabbit (tweak for r47535): * Reworded movesubpagetext to include the number of subpages * Fix spelling error in movesnoubpage * Allow plural in movesubpage --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index d7a8eaa0f0..ea839d528e 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -499,20 +499,23 @@ class MovePageForm { } function showSubpages( $title, $out ) { - global $wgUser; + global $wgUser, $wgLang; if( !MWNamespace::hasSubpages( $title->getNamespace() ) ) return; - $out->wrapWikiMsg( '== $1 ==', 'movesubpage' ); $subpages = $title->getSubpages(); + $count = $subpages instanceof TitleArray ? $subpages->count() : 0; + + $out->wrapWikiMsg( '== $1 ==', array( 'movesubpage', $count ) ); # No subpages. - if ( !( $subpages instanceof TitleArray ) || $subpages->count() == 0 ) { + if ( $count == 0 ) { $out->addWikiMsg( 'movenosubpage' ); return; } + $out->addWikiMsg( 'movesubpagetext', $wgLang->formatnum( $count ) ); $skin = $wgUser->getSkin(); $out->addHTML( "