Index: branches/wmf/1.17wmf1/extensions/MobileFrontend/MobileFrontend.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | $wgMFRemovableClasses = array(); |
57 | 57 | |
58 | 58 | class ExtMobileFrontend { |
59 | | - const VERSION = '0.5.33'; |
| 59 | + const VERSION = '0.5.34'; |
60 | 60 | |
61 | 61 | /** |
62 | 62 | * @var DOMDocument |
— | — | @@ -357,7 +357,7 @@ |
358 | 358 | |
359 | 359 | private function getBaseDomain() { |
360 | 360 | //Validates value as IP address |
361 | | - if( !filter_var( $_SERVER['HTTP_HOST'], FILTER_VALIDATE_IP ) ) { |
| 361 | + if( !IP::isValid( $_SERVER['HTTP_HOST'] ) ) { |
362 | 362 | $domainParts = explode( '.', $_SERVER['HTTP_HOST'] ); |
363 | 363 | $domainParts = array_reverse( $domainParts ); |
364 | 364 | //Although some browsers will accept cookies without the initial ., » RFC 2109 requires it to be included. |