-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
update.php
26 lines (18 loc) · 883 Bytes
/
update.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$addon = rex_addon::get('statistics');
// create tables
$addon->includeFile(__DIR__ . '/install.php');
// version 3 migrations
// copy old config settings
if (rex_config::has("statistics/api", "statistics_api_enable")) {
rex_config::set("statistics", "statistics_api_enable", rex_config::get("statistics/api", "statistics_api_enable"));
}
if (rex_config::has("statistics/media", "statistics_media_log_all")) {
rex_config::set("statistics", "statistics_media_log_all", rex_config::get("statistics/media", "statistics_media_log_all"));
}
if (rex_config::has("statistics/media", "statistics_media_log_mm")) {
rex_config::set("statistics", "statistics_media_log_mm", rex_config::get("statistics/media", "statistics_media_log_mm"));
}
// remove plugins
rex_dir::delete(rex_path::addon('statistics', 'plugins'));
rex_package_manager::synchronizeWithFileSystem();