r57948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57947‎ | r57948 | r57949 >
Date:17:38, 20 October 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Maps/Maps_Mapper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps_Mapper.php
@@ -270,7 +270,7 @@
271271 */
272272 public static function getValidTypes(array $types, array &$defaults, &$defaultsAreValid, $validationFunction) {
273273 $validTypes = array();
274 - $phpAtLeast523 = MapsMapper::phpVersionIsEqualOrBigger('5.2.3');
 274+ $phpAtLeast523 = MapsUtils::phpVersionIsEqualOrBigger('5.2.3');
275275
276276 // Ensure every type is valid and uses the relevant map API's name.
277277 for($i = 0 ; $i < count($types); $i++) {
@@ -278,7 +278,7 @@
279279 if ($type) $validTypes[] = $type;
280280 }
281281
282 - $types = $validTypes;
 282+ $types = $validTypes;
283283
284284 // If there are no valid types, add the default ones.
285285 if (count($types) < 1) {
@@ -302,25 +302,5 @@
303303 return $types;
304304 }
305305
306 - /**
307 - * Returns if the current php version is equal of bigger then the provided one.
308 - *
309 - * @param string $requiredVersion
310 - * @return boolean
311 - */
312 - private static function phpVersionIsEqualOrBigger($requiredVersion) {
313 - // TODO: Ensure this works, and does not cause errors for some versions.
314 - $currentVersion = phpversion();
315306
316 - for($i = 0; $i < 3; $i++) {
317 - if ($currentVersion[$i] < $requiredVersion[$i]) {
318 - return false;
319 - }
320 - else if($currentVersion[$i] > $requiredVersion[$i]) {
321 - return true;
322 - }
323 - }
324 -
325 - return true;
326 - }
327307 }

Status & tagging log