diff options
-rw-r--r-- | misc/cron/archive.php | 32 | ||||
-rw-r--r-- | themes/default/ajaxHelper.js | 10 |
2 files changed, 22 insertions, 20 deletions
diff --git a/misc/cron/archive.php b/misc/cron/archive.php index 50cdeefb31..9899e81eca 100644 --- a/misc/cron/archive.php +++ b/misc/cron/archive.php @@ -399,9 +399,15 @@ class Archiving $this->log("done"); } - /** - * @return bool True on success, false if some request failed - */ + /** + * Archive visits and segments. + * + * @param $idsite int + * @param $period + * @param $lastTimestampWebsiteProcessed + * @param Piwik_Timer $timerWebsite + * @return bool True on success, false if some request failed + */ private function archiveVisitsAndSegments($idsite, $period, $lastTimestampWebsiteProcessed, Piwik_Timer $timerWebsite = null) { $timer = new Piwik_Timer; @@ -830,15 +836,17 @@ class Archiving } $this->piwikUrl = $piwikUrl . "index.php"; } - - - /** - * Returns if the requested parameter is defined in the command line arguments. - * If $valuePossible is true, then a value is possibly set for this parameter, - * ie. --force-timeout-for-periods=3600 would return 3600 - * - * @return true or the value (int,string) if set, false otherwise - */ + + + /** + * Returns if the requested parameter is defined in the command line arguments. + * If $valuePossible is true, then a value is possibly set for this parameter, + * ie. --force-timeout-for-periods=3600 would return 3600 + * + * @param $parameter + * @param bool $valuePossible + * @return true or the value (int,string) if set, false otherwise + */ private function isParameterSet($parameter, $valuePossible = false) { if(!Piwik_Common::isPhpCliMode()) diff --git a/themes/default/ajaxHelper.js b/themes/default/ajaxHelper.js index 943590f2c3..d33f7bd841 100644 --- a/themes/default/ajaxHelper.js +++ b/themes/default/ajaxHelper.js @@ -130,8 +130,6 @@ function ajaxHelper() { /** * Gets this helper instance ready to send a bulk request. Each argument to this * function is a single request to use. - * - * @param {object} ... The requests to send simultaneously. */ this.setBulkRequests = function () { var urls = []; @@ -154,7 +152,6 @@ function ajaxHelper() { * @param {function} callback Callback function * @return {void} */ - this.setCallback = function (callback) { this.callback = callback; }; @@ -175,12 +172,9 @@ function ajaxHelper() { var urlToRedirect = piwikHelper.getCurrentQueryStringWithParametersModified(params); var updatedUrl = new RegExp('&updated=([0-9]+)'); var updatedCounter = updatedUrl.exec(urlToRedirect); - if(!updatedCounter) - { + if (!updatedCounter) { urlToRedirect += '&updated=1'; - } - else - { + } else { updatedCounter = 1 + parseInt(updatedCounter[1]); urlToRedirect = urlToRedirect.replace(new RegExp('(&updated=[0-9]+)'), '&updated=' + updatedCounter); } |