| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/a/w/e/awebpaca/piwik/core/Updates/ |
Upload File : |
<?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\Updates;
use Piwik\Filesystem;
use Piwik\Notification;
use Piwik\Plugin\Manager;
use Piwik\Updater;
use Piwik\Updates as PiwikUpdates;
class Updates_3_5_1_b1 extends PiwikUpdates
{
public function doUpdate(Updater $updater)
{
// try to deactivate and remove the GeoIP2 plugin from marketplace,
// which causes problems with GeoIp2 plugin included in core
// Skip if new file `isoRegionNames.php` is detected within `GeoIP2` directory, as that means filesystem is case
// insensitive and GeoIP2 plugin has been partially overwritten by GeoIp2 plugin
try {
if (is_dir(PIWIK_INCLUDE_PATH . '/plugins/GeoIP2') && !file_exists(PIWIK_INCLUDE_PATH . '/plugins/GeoIP2/data/isoRegionNames.php')) {
// first remove the plugin files, as trying to deactivate would load the plugin files resulting in a fatal error
Filesystem::unlinkRecursive(PIWIK_INCLUDE_PATH . '/plugins/GeoIP2', true);
// if plugin was activated, trigger deactivation to remove the config entry and set a notification
if (Manager::getInstance()->isPluginActivated('GeoIP2')) {
@Manager::getInstance()->deactivatePlugin('GeoIP2');
$notification = new Notification('GeoIP2 plugin from Marketplace has been removed due to compatibility issues. Please check your geolocation settings.');
$notification->context = Notification::CONTEXT_WARNING;
$notification->type = Notification::TYPE_PERSISTENT;
Notification\Manager::notify('GeoIP2_update_warning', $notification);
}
// uninstall the plugin to remove it from config
@Manager::getInstance()->uninstallPlugin('GeoIP2');
}
} catch (\Exception $e) {
}
}
}