* (bug 15717) Set $separatorTransformTable for language 'eu'
* (bug 15605) Enabled $datePreferences for language 'hr'. Added standard date
preferences.
+* (bug 13701) {{NUMBEROFVIEWS}} magic word to show number of total views.
=== API changes in 1.14 ===
'contentlanguage',
'pagesinnamespace',
'numberofadmins',
+ 'numberofviews',
'defaultsort',
'pagesincategory',
'index',
'localtimestamp' => 3600,
'pagesinnamespace' => 3600,
'numberofadmins' => 3600,
+ 'numberofviews' => 3600,
'numberingroup' => 3600,
);
static function numberofedits( $parser, $raw = null ) {
return self::formatRaw( SiteStats::edits(), $raw );
}
+ static function numberofviews( $parser, $raw = null ) {
+ return self::formatRaw( SiteStats::views(), $raw );
+ }
static function pagesinnamespace( $parser, $namespace = 0, $raw = null ) {
return self::formatRaw( SiteStats::pagesInNs( intval( $namespace ) ), $raw );
}
return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::numberingroup('sysop') );
case 'numberofedits':
return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::edits() );
+ case 'numberofviews':
+ return $this->mVarCache[$index] = $wgContLang->formatNum( SiteStats::views() );
case 'currenttimestamp':
return $this->mVarCache[$index] = wfTimestamp( TS_MW, $ts );
case 'localtimestamp':
$this->setFunctionHook( 'numberoffiles', array( 'CoreParserFunctions', 'numberoffiles' ), SFH_NO_HASH );
$this->setFunctionHook( 'numberofadmins', array( 'CoreParserFunctions', 'numberofadmins' ), SFH_NO_HASH );
$this->setFunctionHook( 'numberofedits', array( 'CoreParserFunctions', 'numberofedits' ), SFH_NO_HASH );
+ $this->setFunctionHook( 'numberofviews', array( 'CoreParserFunctions', 'numberofviews' ), SFH_NO_HASH );
$this->setFunctionHook( 'language', array( 'CoreParserFunctions', 'language' ), SFH_NO_HASH );
$this->setFunctionHook( 'padleft', array( 'CoreParserFunctions', 'padleft' ), SFH_NO_HASH );
$this->setFunctionHook( 'padright', array( 'CoreParserFunctions', 'padright' ), SFH_NO_HASH );
return $varCache[$index] = $wgContLang->formatNum( SiteStats::numberingroup('sysop') );
case 'numberofedits':
return $varCache[$index] = $wgContLang->formatNum( SiteStats::edits() );
+ case 'numberofviews':
+ return $varCache[$index] = $wgContLang->formatNum( SiteStats::views() );
case 'currenttimestamp':
return $varCache[$index] = wfTimestampNow();
case 'localtimestamp':
function formatResult( $skin, $result ) {
global $wgContLang;
- $title = Title::newFromId( $result->value );
+ $title = Title::newFromID( $result->value );
$dp = Title::makeTitle( $result->namespace, $result->title );
$from = $skin->link( $title );
'numberoffiles' => array( 1, 'NUMBEROFFILES' ),
'numberofusers' => array( 1, 'NUMBEROFUSERS' ),
'numberofedits' => array( 1, 'NUMBEROFEDITS' ),
+ 'numberofviews' => array( 1, 'NUMBEROFVIEWS' ),
'pagename' => array( 1, 'PAGENAME' ),
'pagenamee' => array( 1, 'PAGENAMEE' ),
'namespace' => array( 1, 'NAMESPACE' ),