diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-12-14 05:40:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-14 05:40:54 +0300 |
commit | 9bf10dc5a659152704aea7ec532197a12ef6a194 (patch) | |
tree | ebb024bad37471195feae44ad7e2c8e9c1661e2c | |
parent | abf347525a6ce7de1c8bfb3b088c131b14c6fdd5 (diff) |
Remove provider lookup from core (#16756)
* remove Provider dimension from core
this should be handled in Provider plugin now
* Do not skip provider plugin in tracker while testing
* [TEMP] update provider plugin submodule to geoiplookup branch
* update submodule
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
-rw-r--r-- | core/Tracker.php | 5 | ||||
m--------- | plugins/Provider | 0 | ||||
-rw-r--r-- | plugins/UserCountry/Columns/Provider.php | 58 |
3 files changed, 0 insertions, 63 deletions
diff --git a/core/Tracker.php b/core/Tracker.php index a1d0695fd3..20d83eb5d2 100644 --- a/core/Tracker.php +++ b/core/Tracker.php @@ -308,11 +308,6 @@ class Tracker \Piwik\Tracker\Cache::deleteTrackerCache(); Filesystem::clearPhpCaches(); } - - $pluginsDisabled = array('Provider'); - - // Disable provider plugin, because it is so slow to do many reverse ip lookups - PluginManager::getInstance()->setTrackerPluginsNotToLoad($pluginsDisabled); } protected function loadTrackerPlugins() diff --git a/plugins/Provider b/plugins/Provider -Subproject 6eff8bb2c4708b66a03082fa5fa49ae48c7c398 +Subproject e63e23b165034205a1acc35ea70d70e314bb8af diff --git a/plugins/UserCountry/Columns/Provider.php b/plugins/UserCountry/Columns/Provider.php deleted file mode 100644 index fb50378d8d..0000000000 --- a/plugins/UserCountry/Columns/Provider.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php -/** - * Matomo - free/libre analytics platform - * - * @link https://matomo.org - * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - * - */ -namespace Piwik\Plugins\UserCountry\Columns; - -use Piwik\Plugin\Manager; -use Piwik\Plugins\UserCountry\LocationProvider; -use Piwik\Tracker\Visitor; -use Piwik\Tracker\Action; -use Piwik\Tracker\Request; - -class Provider extends Base -{ - protected $columnName = 'location_provider'; - protected $type = self::TYPE_TEXT; - protected $category = 'UserCountry_VisitLocation'; - - /** - * @param Request $request - * @param Visitor $visitor - * @param Action|null $action - * @return mixed - */ - public function onNewVisit(Request $request, Visitor $visitor, $action) - { - if (!Manager::getInstance()->isPluginInstalled('Provider')) { - return false; - } - - $userInfo = $this->getUserInfo($request, $visitor); - - $isp = $this->getLocationDetail($userInfo, LocationProvider::ISP_KEY); - $org = $this->getLocationDetail($userInfo, LocationProvider::ORG_KEY); - - // if the location has provider/organization info, set it - if (!empty($isp)) { - $providerValue = $isp; - - // if the org is set and not the same as the isp, add it to the provider value - if (!empty($org) && $org != $providerValue) { - $providerValue .= ' - ' . $org; - } - - return $providerValue; - } - - if (!empty($org)) { - return $org; - } - - return false; - } -}
\ No newline at end of file |