diff --git a/core/Archive.php b/core/Archive.php index 431b5e818fd42a8d517d663ad5a79a891110247d..99be7fd5038bbb27f9256432eedc5d059c9cf8f9 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -100,8 +100,7 @@ use Piwik\Period\Factory; * * <a name="footnote-1"></a> * [1]: The archiving process will not be launched if browser archiving is disabled - * and the current request came from a browser (and not the **archive.php** cron - * script). + * and the current request came from a browser. * * * @api diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php index 45250b0d2319a62bf69931cef25205452e0eafe6..fa19fa82beb4fb95fcb2674100026096bdb7ce1b 100644 --- a/core/ArchiveProcessor/Rules.php +++ b/core/ArchiveProcessor/Rules.php @@ -164,7 +164,7 @@ class Rules // We delete more often which is safe, since reports are re-processed on demand $purgeArchivesOlderThan = Date::factory(time() - 2 * $temporaryArchivingTimeout)->getDateTime(); } else { - // If archive.php via Cron is building the reports, we should keep all temporary reports from today + // If cron core:archive command is building the reports, we should keep all temporary reports from today $purgeArchivesOlderThan = Date::factory('today')->getDateTime(); } return $purgeArchivesOlderThan; @@ -234,7 +234,7 @@ class Rules if (!$segment->isEmpty() && $isArchivingDisabled && Config::getInstance()->General['browser_archiving_disabled_enforce'] - && !SettingsServer::isArchivePhpTriggered() // Only applies when we are not running archive.php + && !SettingsServer::isArchivePhpTriggered() // Only applies when we are not running core:archive command ) { Log::debug("Archiving is disabled because of config setting browser_archiving_disabled_enforce=1"); return true; diff --git a/core/CronArchive.php b/core/CronArchive.php index 5003cfc3c612c10864131031a98ee048cdda3e2f..24978f1bab192b8df8f2434c8a8c4280e637015a 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -16,7 +16,7 @@ use Piwik\Plugins\CoreAdminHome\API as APICoreAdminHome; use Piwik\Plugins\SitesManager\API as APISitesManager; /** - * archive.php runs as a cron and is a useful tool for general maintenance, + * ./console core:archive runs as a cron and is a useful tool for general maintenance, * and pre-process reports for a Fast dashboard rendering. */ class CronArchive @@ -88,7 +88,7 @@ class CronArchive public $testmode = false; /** - * Returns the option name of the option that stores the time the archive.php script was last run. + * Returns the option name of the option that stores the time core:archive was last executed. * * @param int $idsite * @param string $period @@ -382,7 +382,7 @@ class CronArchive return false; } - // Fake that the request is already done, so that other archive.php + // Fake that the request is already done, so that other core:archive commands // running do not grab the same website from the queue Option::set($this->lastRunKey($idsite, "day"), time()); @@ -803,7 +803,7 @@ class CronArchive $websiteIds = array_intersect($websiteIds, $this->allWebsites); /** - * Triggered by the **archive.php** cron script so plugins can modify the list of + * Triggered by the **core:archive** console command so plugins can modify the list of * websites that the archiving process will be launched for. * * Plugins can use this hook to add websites to archive, remove websites to archive, or change @@ -849,7 +849,7 @@ class CronArchive private function initPiwikHost() { - // If archive.php run as a web cron, we use the current hostname+path + // If core:archive command run as a web cron, we use the current hostname+path if (!Common::isPhpCliMode()) { if (!empty(self::$url)) { $piwikUrl = self::$url; @@ -858,7 +858,7 @@ class CronArchive $piwikUrl = SettingsPiwik::getPiwikUrl(); } } else { - // If archive.php run as CLI/shell we require the piwik url to be set + // If core:archive command run as CLI/shell we require the piwik url to be set $piwikUrl = $this->getParameterFromCli("url", true); if (!$piwikUrl) { diff --git a/core/FrontController.php b/core/FrontController.php index 5d9ddaf3b312ea3c7febdb4e139aa3ddf5b4b974..9a9927eb030ff741d2b74fddb1475634f61203d0 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -455,7 +455,7 @@ class FrontController extends Singleton private function handleProfiler() { if (!empty($_GET['xhprof'])) { - $mainRun = $_GET['xhprof'] == 1; // archive.php sets xhprof=2 + $mainRun = $_GET['xhprof'] == 1; // core:archive command sets xhprof=2 Profiler::setupProfilerXHProf($mainRun); } } diff --git a/core/Http.php b/core/Http.php index d6e7376999bc85d0640642c0f0107a6fbc1023c7..f131bc44cd5b78a5be036f5d7775eade85c5ceb7 100644 --- a/core/Http.php +++ b/core/Http.php @@ -443,7 +443,7 @@ class Http CURLOPT_HEADER => is_resource($file) ? false : true, CURLOPT_CONNECTTIMEOUT => $timeout, ); - // Case archive.php is triggering archiving on https:// and the certificate is not valid + // Case core:archive command is triggering archiving on https:// and the certificate is not valid if ($acceptInvalidSslCertificate) { $curl_options += array( CURLOPT_SSL_VERIFYHOST => false, diff --git a/core/Log.php b/core/Log.php index 8e090fa4a069d84306216ce2a572c045d71b44a0..e9b9153e176c8b364e38e37d90dad64624d03e74 100644 --- a/core/Log.php +++ b/core/Log.php @@ -43,7 +43,7 @@ use Piwik\Db; * severe than the current log level will be outputted. Others will be * ignored. The default level is **WARN**. * - `log_only_when_cli`: 0 or 1. If 1, logging is only enabled when Piwik is executed - * in the command line (for example, by the archive.php cron + * in the command line (for example, by the core:archive command * script). Default: 0. * - `log_only_when_debug_parameter`: 0 or 1. If 1, logging is only enabled when the * `debug` query parameter is 1. Default: 0. diff --git a/core/Period/Range.php b/core/Period/Range.php index b60cc4ca61c29692941bb140ebe5cb90a823a9a3..b2717b48245d5fed23ff8e1e32ac00d412fe52b0 100644 --- a/core/Period/Range.php +++ b/core/Period/Range.php @@ -23,7 +23,7 @@ use Piwik\Piwik; * date=2007-07-24,2013-11-15). * * The range period differs from other periods mainly in that since it is arbitrary, - * range periods are not pre-archived by the **archive.php** cron script. + * range periods are not pre-archived by the cron core:archive command. * * @api */ diff --git a/core/SettingsPiwik.php b/core/SettingsPiwik.php index 6720853c459fff2c1db4c011e5a812edc7bbc494..3def75d15906e2adc7bdff54d7291769d26b528e 100644 --- a/core/SettingsPiwik.php +++ b/core/SettingsPiwik.php @@ -159,7 +159,7 @@ class SettingsPiwik $isPiwikCoreDispatching = defined('PIWIK_ENABLE_DISPATCH') && PIWIK_ENABLE_DISPATCH; if (Common::isPhpCliMode() - // in case archive.php is triggered with domain localhost + // in case core:archive command is triggered (often with localhost domain) || SettingsServer::isArchivePhpTriggered() // When someone else than core is dispatching this request then we return the URL as it is read only || !$isPiwikCoreDispatching diff --git a/core/SettingsServer.php b/core/SettingsServer.php index ae9f6de4b692a7b281dd2d263e0b6b248b7ee8f9..f50156d7fe3d0261cef823e2bc643b6b804f245f 100644 --- a/core/SettingsServer.php +++ b/core/SettingsServer.php @@ -132,7 +132,7 @@ class SettingsServer $minimumMemoryLimit = Config::getInstance()->General['minimum_memory_limit']; if (self::isArchivePhpTriggered()) { - // archive.php: no time limit, high memory limit + // core:archive command: no time limit, high memory limit self::setMaxExecutionTime(0); $minimumMemoryLimitWhenArchiving = Config::getInstance()->General['minimum_memory_limit_when_archiving']; if ($memoryLimit < $minimumMemoryLimitWhenArchiving) { diff --git a/core/TaskScheduler.php b/core/TaskScheduler.php index dabf4241d24518da90981bff0a619dd0b1643d10..a3eab34c245c674d343aac4554cc17ee55004dcf 100644 --- a/core/TaskScheduler.php +++ b/core/TaskScheduler.php @@ -21,7 +21,7 @@ define('DEBUG_FORCE_SCHEDULED_TASKS', false); * weekly, monthly, etc.). They are registered with **TaskScheduler** through the * {@hook TaskScheduler.getScheduledTasks} event. * - * Tasks are executed when the cron archive.php script is executed. + * Tasks are executed when the cron core:archive command is executed. * * ### Examples * diff --git a/core/Url.php b/core/Url.php index f5814aaeec2361422588821b0e5846430b19102b..df60c388d1c377b6268edfe629cbf688321ba9cb 100644 --- a/core/Url.php +++ b/core/Url.php @@ -305,7 +305,7 @@ class Url } /** - * Sets the host. Useful for CLI scripts, eg. archive.php + * Sets the host. Useful for CLI scripts, eg. core:archive command * * @param $host string */ diff --git a/lang/en.json b/lang/en.json index 0d59b3a7174b79e7f250637179cdd0a033727d8e..dcc12af522e568701cce4311eb8d61864b50d4be 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1548,7 +1548,7 @@ "AddANDorORCondition": "Add %s condition", "AddNewSegment": "Add new segment", "AreYouSureDeleteSegment": "Are you sure you want to delete this segment?", - "AutoArchivePreProcessed": "segmented reports are pre-processed (faster, requires archive.php cron)", + "AutoArchivePreProcessed": "segmented reports are pre-processed (faster, requires cron)", "AutoArchiveRealTime": "segmented reports are processed in real time", "ChooseASegment": "Choose a segment", "DataAvailableAtLaterDate": "Your segmented analytics reports will be available later. We apologize for the inconvenience.", @@ -2051,7 +2051,7 @@ "UnsupportedArchiveType": "Encountered unsupported archive type %1$s.", "UpdaterHasNotBeenRun": "The updater has never been run.", "UpdaterIsNotScheduledToRun": "It is not scheduled to run in the future.", - "UpdaterScheduledForNextRun": "It is scheduled to run during the next archive.php cron execution.", + "UpdaterScheduledForNextRun": "It is scheduled to run during the next cron core:archive command execution.", "UpdaterWasLastRun": "The updater was last run on %s.", "UpdaterWillRunNext": "It is next scheduled to run on %s.", "WidgetLocation": "Visitor Location" diff --git a/plugins/CoreAdminHome/API.php b/plugins/CoreAdminHome/API.php index 94aa0491ca4ded142d1279f30a338f47fba50ce7..a14c74d5e6cbd2c3ea6fa8f84ea7415467aecc82 100644 --- a/plugins/CoreAdminHome/API.php +++ b/plugins/CoreAdminHome/API.php @@ -37,7 +37,7 @@ class API extends \Piwik\Plugin\API } /* - * stores the list of websites IDs to re-reprocess in archive.php + * stores the list of websites IDs to re-reprocess in core:archive command */ const OPTION_INVALIDATED_IDSITES = 'InvalidatedOldReports_WebsiteIds'; @@ -51,7 +51,7 @@ class API extends \Piwik\Plugin\API * to be reprocessed by visiting the script as the Super User: * http://example.net/piwik/misc/cron/archive.php?token_auth=$SUPER_USER_TOKEN_AUTH_HERE * REQUIREMENTS: On large piwik setups, you will need in PHP configuration: max_execution_time = 0 - * We recommend to use an hourly schedule of the script at misc/cron/archive.php + * We recommend to use an hourly schedule of the script. * More information: http://piwik.org/setup-auto-archiving/ * * @param string $idSites Comma separated list of idSite that have had data imported for the specified dates @@ -160,7 +160,7 @@ class API extends \Piwik\Plugin\API } \Piwik\Plugins\SitesManager\API::getInstance()->updateSiteCreatedTime($idSites, $minDate); - // Force to re-process data for these websites in the next archive.php cron run + // Force to re-process data for these websites in the next cron core:archive command run $invalidatedIdSites = self::getWebsiteIdsToInvalidate(); $invalidatedIdSites = array_merge($invalidatedIdSites, $idSites); $invalidatedIdSites = array_unique($invalidatedIdSites); @@ -183,7 +183,7 @@ class API extends \Piwik\Plugin\API } /** - * Returns array of idSites to force re-process next time archive.php runs + * Returns array of idSites to force re-process next time core:archive command runs * * @ignore * @return mixed diff --git a/tests/PHPUnit/Integration/ArchiveCronTest.php b/tests/PHPUnit/Integration/ArchiveCronTest.php index 9d11eb373c413f736ab18bb28872659e1466041e..71c8b259fde90b62cc4f11c685de3f10a23a4424 100644 --- a/tests/PHPUnit/Integration/ArchiveCronTest.php +++ b/tests/PHPUnit/Integration/ArchiveCronTest.php @@ -10,7 +10,7 @@ use Piwik\Date; use Piwik\Plugins\SitesManager\API; /** - * Tests to call the archive.php cron script and check there is no error, + * Tests to call the cron core:archive command script and check there is no error, * Then call the API testing for "Browser archiving is disabled" (see disableArchiving) * This tests that, when archiving is disabled, * then Piwik API will return data that was pre-processed during archive.php run diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI index 8c15feb00dd40880d1872680cb84b330fd56c6ff..aeeec60d996fb1b5f70f1663750c5eefb861f50e 160000 --- a/tests/PHPUnit/UI +++ b/tests/PHPUnit/UI @@ -1 +1 @@ -Subproject commit 8c15feb00dd40880d1872680cb84b330fd56c6ff +Subproject commit aeeec60d996fb1b5f70f1663750c5eefb861f50e diff --git a/tests/PHPUnit/proxy/includes.php b/tests/PHPUnit/proxy/includes.php index a2d80f6e06745ea78dc640af93f61a8bf2ced7ff..0ffce4642b28e0f5a4996b0c03f9f5fbbc7d9057 100644 --- a/tests/PHPUnit/proxy/includes.php +++ b/tests/PHPUnit/proxy/includes.php @@ -17,7 +17,7 @@ require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php'; \Piwik\SettingsServer::setMaxExecutionTime(0); -// Make sure Data processed in archive.php is not being purged instantly (useful for: Integration/ArchiveCronTest) +// Make sure Data processed in cron core:archive command is not being purged instantly (useful for: Integration/ArchiveCronTest) if(\Piwik\SettingsServer::isArchivePhpTriggered()) { \Piwik\ArchiveProcessor\Rules::$purgeDisabledByTests = true; } \ No newline at end of file