MediaWiki  1.23.3
MediaWikiVersionFetcher.php
Go to the documentation of this file.
1 <?php
2 
11 
18  public function fetchVersion() {
19  $defaultSettings = file_get_contents( __DIR__ . '/DefaultSettings.php' );
20 
21  $matches = array();
22  preg_match( "/wgVersion = '([-0-9a-zA-Z\.]+)';/", $defaultSettings, $matches );
23 
24  if ( count( $matches ) !== 2 ) {
25  throw new RuntimeException( 'Could not extract the MediaWiki version from DefaultSettings.php' );
26  }
27 
28  return $matches[1];
29  }
30 
31 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
MediaWikiVersionFetcher\fetchVersion
fetchVersion()
Returns the MediaWiki version, in the format used by MediaWiki's wgVersion global.
Definition: MediaWikiVersionFetcher.php:18
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
$matches
if(!defined( 'MEDIAWIKI')) if(!isset( $wgVersion)) $matches
Definition: NoLocalSettings.php:33
MediaWikiVersionFetcher
Provides access to MediaWiki's version without requiring MediaWiki (or anything else) being loaded fi...
Definition: MediaWikiVersionFetcher.php:10