diff options
author | Fabian Becker <fabian.becker@uni-tuebingen.de> | 2013-07-18 13:25:08 +0400 |
---|---|---|
committer | Fabian Becker <fabian.becker@uni-tuebingen.de> | 2013-07-18 13:25:08 +0400 |
commit | 879d0e094824bd6d46ca1ecbba1cda945394bb05 (patch) | |
tree | 038ad7cbfe1e6441ada4e5a979ec54331d910f42 /misc | |
parent | df0fd261c9172926a8a2a9a05fd4b30bd840d5f7 (diff) |
Refactor Piwik_Config to \Piwik\Core\Config
2 steps required:
1. Refactor > Move > \Piwik\Core\Config (uncheck "Create new File")
2. Refactor > Rename > Piwik_Config to Config
Diffstat (limited to 'misc')
-rw-r--r-- | misc/cron/archive.php | 10 | ||||
-rwxr-xr-x | misc/others/geoipUpdateRows.php | 4 | ||||
-rw-r--r-- | misc/others/test_generateLotsVisitsWebsites.php | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php index d8b9a96362..20b5c908c4 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -1,4 +1,6 @@ <?php +use Piwik\Core\Config; + $USAGE = " Usage: /path/to/cli/php \"" . @$_SERVER['argv'][0] . "\" --url=http://your-website.org/path/to/piwik/ [arguments] @@ -602,7 +604,7 @@ class Archiving private function initLog() { - $config = Piwik_Config::getInstance(); + $config = Config::getInstance(); $config->log['log_only_when_debug_parameter'] = 0; $config->log['logger_message'] = array("logger_message" => "screen"); Piwik::createLogObject(); @@ -770,8 +772,8 @@ class Archiving private function initTokenAuth() { - $login = Piwik_Config::getInstance()->superuser['login']; - $md5Password = Piwik_Config::getInstance()->superuser['password']; + $login = Config::getInstance()->superuser['login']; + $md5Password = Config::getInstance()->superuser['password']; $this->token_auth = md5($login . $md5Password); $this->login = $login; } @@ -797,7 +799,7 @@ class Archiving $piwikUrl .= '/'; } } - if (Piwik_Config::getInstance()->General['force_ssl'] == 1) { + if (Config::getInstance()->General['force_ssl'] == 1) { $piwikUrl = str_replace('http://', 'https://', $piwikUrl); } $this->piwikUrl = $piwikUrl . "index.php"; diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php index 37c841947b..9d5a6454c2 100755 --- a/misc/others/geoipUpdateRows.php +++ b/misc/others/geoipUpdateRows.php @@ -1,4 +1,6 @@ <?php +use Piwik\Core\Config; + ini_set("memory_limit", "512M"); error_reporting(E_ALL | E_NOTICE); @@ -24,7 +26,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Loader.php'; $GLOBALS['PIWIK_TRACKER_DEBUG'] = false; define('PIWIK_ENABLE_DISPATCH', false); -Piwik_Config::getInstance()->log['logger_message'][] = 'screen'; +Config::getInstance()->log['logger_message'][] = 'screen'; Piwik_FrontController::getInstance()->init(); $query = "SELECT count(*) FROM " . Piwik_Common::prefixTable('log_visit'); diff --git a/misc/others/test_generateLotsVisitsWebsites.php b/misc/others/test_generateLotsVisitsWebsites.php index eeb5b22e5a..30ca703d68 100644 --- a/misc/others/test_generateLotsVisitsWebsites.php +++ b/misc/others/test_generateLotsVisitsWebsites.php @@ -1,4 +1,6 @@ <?php +use Piwik\Core\Config; + define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../..")); define('PIWIK_ENABLE_DISPATCH', false); define('PIWIK_ENABLE_ERROR_HANDLER', false); @@ -23,7 +25,7 @@ class Piwik_StressTests_CopyLogs { function init() { - $config = Piwik_Config::getInstance(); + $config = Config::getInstance(); $config->log['log_only_when_debug_parameter'] = 0; $config->log['logger_message'] = array("logger_message" => "screen"); Piwik::createLogObject(); |