Index: trunk/extensions/Maps/Maps_Mapper.php |
— | — | @@ -270,7 +270,7 @@ |
271 | 271 | */ |
272 | 272 | public static function getValidTypes(array $types, array &$defaults, &$defaultsAreValid, $validationFunction) { |
273 | 273 | $validTypes = array(); |
274 | | - $phpAtLeast523 = MapsMapper::phpVersionIsEqualOrBigger('5.2.3'); |
| 274 | + $phpAtLeast523 = MapsUtils::phpVersionIsEqualOrBigger('5.2.3'); |
275 | 275 | |
276 | 276 | // Ensure every type is valid and uses the relevant map API's name. |
277 | 277 | for($i = 0 ; $i < count($types); $i++) { |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | if ($type) $validTypes[] = $type; |
280 | 280 | } |
281 | 281 | |
282 | | - $types = $validTypes; |
| 282 | + $types = $validTypes; |
283 | 283 | |
284 | 284 | // If there are no valid types, add the default ones. |
285 | 285 | if (count($types) < 1) { |
— | — | @@ -302,25 +302,5 @@ |
303 | 303 | return $types; |
304 | 304 | } |
305 | 305 | |
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(); |
315 | 306 | |
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 | | - } |
327 | 307 | } |