Skip to content

Commit

Permalink
Piwik\Network\IP instead of Piwik\IP
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaDafinser committed Jan 28, 2015
1 parent ab1f405 commit b54077d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions IntranetGeoIP.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Piwik\Plugins\IntranetGeoIP;

use Piwik\Plugin;
use Piwik\IP;
use Piwik\Network;
use Piwik\Log;
use Piwik\Notification;

Expand Down Expand Up @@ -105,7 +105,9 @@ public function logIntranetSubNetworkInfo(&$visitorInfo)
}

foreach ($data as $value) {
if (isset($value['networks']) && IP::isIpInRange($visitorInfo['location_ip'], $value['networks'])) {
$ip = Network\IP::fromBinaryIP($visitorInfo['location_ip']);

if (isset($value['networks']) && $ip->isInRanges($value['networks']) === true) {
// values with the same key are not overwritten by right!
// http://www.php.net/manual/en/language.operators.array.php
if (isset($value['visitorInfo'])) {
Expand Down

0 comments on commit b54077d

Please sign in to comment.