From: <gem...@li...> - 2011-11-22 14:43:11
|
Revision: 267 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=267&view=rev Author: michieltcs Date: 2011-11-22 14:43:01 +0000 (Tue, 22 Nov 2011) Log Message: ----------- Refs #307 - change delimiter to | Modified Paths: -------------- trunk/library/classes/Gems/Util.php trunk/test/classes/Gems/UtilTest.php Modified: trunk/library/classes/Gems/Util.php =================================================================== --- trunk/library/classes/Gems/Util.php 2011-11-22 14:36:11 UTC (rev 266) +++ trunk/library/classes/Gems/Util.php 2011-11-22 14:43:01 UTC (rev 267) @@ -236,7 +236,7 @@ $ipLong = ip2long($ip); - $ranges = explode(':', $ipRanges); + $ranges = explode('|', $ipRanges); foreach ($ranges as $range) { if (($sep = strpos($range, '-')) !== false) { Modified: trunk/test/classes/Gems/UtilTest.php =================================================================== --- trunk/test/classes/Gems/UtilTest.php 2011-11-22 14:36:11 UTC (rev 266) +++ trunk/test/classes/Gems/UtilTest.php 2011-11-22 14:43:01 UTC (rev 267) @@ -64,7 +64,7 @@ } public function testAllowedIP5() { - $this->assertTrue(Gems_Util::isAllowedIP('127.0.0.1', '192.168.0.1:127.0.0.1')); + $this->assertTrue(Gems_Util::isAllowedIP('127.0.0.1', '192.168.0.1|127.0.0.1')); } public function testAllowedIPEmptyRange() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |