$data['phpversion'] = PHP_VERSION;
$data['phpsapi'] = PHP_SAPI;
+ if ( defined( 'HHVM_VERSION' ) ) {
+ $data['hhvmversion'] = HHVM_VERSION;
+ }
$data['dbtype'] = $config->get( 'DBtype' );
$data['dbversion'] = $this->getDB()->getServerVersion();
global $wgContLang;
$data = array();
$aliases = $wgContLang->getSpecialPageAliases();
- foreach ( SpecialPageFactory::getList() as $specialpage => $stuff ) {
+ foreach ( SpecialPageFactory::getNames() as $specialpage ) {
if ( isset( $aliases[$specialpage] ) ) {
$arr = array( 'realname' => $specialpage, 'aliases' => $aliases[$specialpage] );
$this->getResult()->setIndexedTagName( $arr['aliases'], 'alias' );
if ( isset( $row['iw_local'] ) && $row['iw_local'] == '1' ) {
$val['local'] = '';
}
- if ( $row['iw_trans'] == '1' ) {
+ if ( isset( $row['iw_trans'] ) && $row['iw_trans'] == '1' ) {
$val['trans'] = '';
}
$data = array();
$data['pages'] = intval( SiteStats::pages() );
$data['articles'] = intval( SiteStats::articles() );
- if ( !$this->getConfig()->get( 'DisableCounters' ) ) {
- $data['views'] = intval( SiteStats::views() );
- }
$data['edits'] = intval( SiteStats::edits() );
$data['images'] = intval( SiteStats::images() );
$data['users'] = intval( SiteStats::users() );
$data = array();
$result = $this->getResult();
+ $allGroups = User::getAllGroups();
foreach ( $config->get( 'GroupPermissions' ) as $group => $permissions ) {
$arr = array(
'name' => $group,
foreach ( $groupArr as $type => $rights ) {
if ( isset( $rights[$group] ) ) {
- $arr[$type] = $rights[$group];
- $result->setIndexedTagName( $arr[$type], 'group' );
+ $groups = array_intersect( $rights[$group], $allGroups );
+ if ( $groups ) {
+ $arr[$type] = $groups;
+ $result->setIndexedTagName( $arr[$type], 'group' );
+ }
}
}
$allowed = Skin::getAllowedSkins();
$default = Skin::normalizeKey( 'default' );
foreach ( Skin::getSkinNames() as $name => $displayName ) {
+ $msg = $this->msg( "skinname-{$name}" );
+ $code = $this->getParameter( 'inlanguagecode' );
+ if ( $code && Language::isValidCode( $code ) ) {
+ $msg->inLanguage( $code );
+ } else {
+ $msg->inContentLanguage();
+ }
+ if ( $msg->exists() ) {
+ $displayName = $msg->text();
+ }
$skin = array( 'code' => $name );
ApiResult::setContent( $skin, $displayName );
if ( !isset( $allowed[$name] ) ) {
' fileextensions - Returns list of file extensions allowed to be uploaded',
' rightsinfo - Returns wiki rights (license) information if available',
' restrictions - Returns information on available restriction (protection) types',
- ' languages - Returns a list of languages MediaWiki supports' .
+ ' languages - Returns a list of languages MediaWiki supports ' .
"(optionally localised by using {$p}inlanguagecode)",
- ' skins - Returns a list of all enabled skins',
+ ' skins - Returns a list of all enabled skins ' .
+ "(optionally localised by using {$p}inlanguagecode, otherwise in content language)",
' extensiontags - Returns a list of parser extension tags',
' functionhooks - Returns a list of parser function hooks',
' showhooks - Returns a list of all subscribed hooks (contents of $wgHooks)',
'showalldb' => 'List all database servers, not just the one lagging the most',
'numberingroup' => 'Lists the number of users in user groups',
'inlanguagecode' => 'Language code for localised language names ' .
- '(best effort, use CLDR extension)',
+ '(best effort, use CLDR extension) and skin names',
);
}