Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-03-26 07:35:10 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-03-26 07:35:10 +0400
commitc2b6c25713d7e5c1037075af288447a275dc22b1 (patch)
tree97d137f9b6ffb6266f544036e14d389c14389908 /console
parent2af200d173464c18d393a9f7b0e562873f54664b (diff)
refs #4903 forward archive.php to new console command
Diffstat (limited to 'console')
-rwxr-xr-xconsole20
1 files changed, 13 insertions, 7 deletions
diff --git a/console b/console
index 47912e1508..0e3dc3ff8a 100755
--- a/console
+++ b/console
@@ -1,9 +1,14 @@
#!/usr/bin/env php
<?php
-namespace Piwik;
-define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__));
-define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);
-define('PIWIK_USER_PATH', PIWIK_DOCUMENT_ROOT);
+if (!defined('PIWIK_DOCUMENT_ROOT')) {
+ define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__) == '/' ? '' : dirname(__FILE__));
+}
+if (!defined('PIWIK_INCLUDE_PATH')) {
+ define('PIWIK_INCLUDE_PATH', PIWIK_DOCUMENT_ROOT);
+}
+if (!defined('PIWIK_USER_PATH')) {
+ define('PIWIK_USER_PATH', PIWIK_DOCUMENT_ROOT);
+}
require_once PIWIK_INCLUDE_PATH . '/core/testMinimumPhpVersion.php';
require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')
@@ -12,11 +17,12 @@ require_once file_exists(PIWIK_INCLUDE_PATH . '/vendor/autoload.php')
require_once PIWIK_INCLUDE_PATH . '/core/Loader.php';
require_once PIWIK_INCLUDE_PATH . '/libs/upgradephp/upgrade.php';
-Translate::loadEnglishTranslation();
+Piwik\Translate::loadEnglishTranslation();
-if (!Common::isPhpCliMode()) {
+if (!Piwik\Common::isPhpCliMode()) {
exit;
}
-$console = new Console();
+
+$console = new Piwik\Console();
$console->init();
$console->run(); \ No newline at end of file