$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();
if ( $wgContLang->linkPrefixExtension() ) {
$linkPrefixCharset = $wgContLang->linkPrefixCharset();
$data['linkprefixcharset'] = $linkPrefixCharset;
- // For backwards compatability
+ // For backwards compatibility
$data['linkprefix'] = "/^((?>.*[^$linkPrefixCharset]|))(.+)$/sDu";
} else {
$data['linkprefixcharset'] = '';
$data['articlepath'] = $config->get( 'ArticlePath' );
$data['scriptpath'] = $config->get( 'ScriptPath' );
$data['script'] = $config->get( 'Script' );
- $data['variantarticlepath'] = $config->get( 'VariantArticlePath' );
+ $data['variantarticlepath'] = $config->get( 'VariantArticlePath' );
$data['server'] = $config->get( 'Server' );
$data['servername'] = $config->get( 'ServerName' );
$data['wikiid'] = wfWikiID();
$data['imagelimits'][$k] = array( 'width' => $limit[0], 'height' => $limit[1] );
}
- $favicon = $config->get( 'Favicon' );
- if ( !empty( $favicon ) ) {
+ $favicon = $config->get( 'Favicon' );
+ if ( !empty( $favicon ) ) {
// wgFavicon can either be a relative or an absolute path
// make sure we always return an absolute path
$data['favicon'] = wfExpandUrl( $favicon, PROTO_RELATIVE );
protected function appendNamespaceAliases( $property ) {
global $wgContLang;
- $aliases = array_merge( $this->getConfig()->get( 'NamespaceAliases' ), $wgContLang->getNamespaceAliases() );
+ $aliases = array_merge( $this->getConfig()->get( 'NamespaceAliases' ),
+ $wgContLang->getNamespaceAliases() );
$namespaces = $wgContLang->getNamespaces();
$data = array();
foreach ( $aliases as $title => $ns ) {
$prefix = $row['iw_prefix'];
$val = array();
$val['prefix'] = $prefix;
- if ( $row['iw_local'] == '1' ) {
+ if ( isset( $row['iw_local'] ) && $row['iw_local'] == '1' ) {
$val['local'] = '';
}
if ( $row['iw_trans'] == '1' ) {
}
$val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT );
- if (substr( $row['iw_url'], 0, 2) == '//') {
+ if ( substr( $row['iw_url'], 0, 2 ) == '//' ) {
$val['protorel'] = '';
}
if ( isset( $row['iw_wikiid'] ) ) {
return 'Return general information about the site.';
}
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array( array(
- 'code' => 'includeAllDenied',
- 'info' => 'Cannot view all servers info unless $wgShowHostnames is true'
- ), ) );
- }
-
public function getExamples() {
return array(
'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',