X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMediaWikiVersionFetcher.php;h=913ae9a50d64e8672c3d1b0a3a67c05236dcf1d2;hb=12601ff7d2796752404bfb331fccc41083d31f9f;hp=1d59ec30973fa38bd6ad2f72a1518d75a7eefb8e;hpb=4fb0a54404fb7ff45b5d6ed14aa31bc3d6a3ca0c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MediaWikiVersionFetcher.php b/includes/MediaWikiVersionFetcher.php index 1d59ec3097..913ae9a50d 100644 --- a/includes/MediaWikiVersionFetcher.php +++ b/includes/MediaWikiVersionFetcher.php @@ -4,7 +4,6 @@ * Provides access to MediaWiki's version without requiring MediaWiki (or anything else) * being loaded first. * - * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > */ class MediaWikiVersionFetcher { @@ -18,8 +17,8 @@ class MediaWikiVersionFetcher { public function fetchVersion() { $defaultSettings = file_get_contents( __DIR__ . '/DefaultSettings.php' ); - $matches = array(); - preg_match( "/wgVersion = '([0-9a-zA-Z\.]+)';/", $defaultSettings, $matches ); + $matches = []; + preg_match( "/wgVersion = '([0-9a-zA-Z\.\-]+)';/", $defaultSettings, $matches ); if ( count( $matches ) !== 2 ) { throw new RuntimeException( 'Could not extract the MediaWiki version from DefaultSettings.php' ); @@ -28,4 +27,4 @@ class MediaWikiVersionFetcher { return $matches[1]; } -} \ No newline at end of file +}