r84243 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84242‎ | r84243 | r84244 >
Date:14:00, 18 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix another daft way of doing version checking
Modified paths:
  • /trunk/extensions/TableMod/TableMod.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TableMod/TableMod.body.php
@@ -176,11 +176,8 @@
177177
178178 public function doParse($input) {
179179 global $wgVersion;
180 - $matches = array();
181180
182 - if (preg_match ('/([0-9]*)\.([0-9]*).*/', $wgVersion, $matches) == 1 &&
183 - $matches[1] == 1 &&
184 - $matches[2] > 15) {
 181+ if ( version_compare( $wgVersion, '1.15', '>' ) ) {
185182 return $this->parser->recursiveTagParse($input, $this->frame);
186183 } else {
187184 return $this->parser->recursiveTagParse($input);

Status & tagging log