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:
authorPeter Zhang <peter@innocraft.com>2021-11-13 02:49:08 +0300
committerGitHub <noreply@github.com>2021-11-13 02:49:08 +0300
commitbf341b7c0ba46691bf3e475ebaa58391363cd7ec (patch)
tree232d4a0ec7aa3b8c801592872eb2d2523dc66f0e /core/Date.php
parent9c58f4e71db9133b2c83d51cf700e818ec5ff7e4 (diff)
add feedback question, remove other related. (#18262)
* remove feedback links remove feedback links * update screen shot update screen shot * add feedback question add feedback question * update close to icon update close to icon * built vue files * remove in line css remove in line css, change to less file * move translation key to plugin move translation key to plugin * remove feedback popup remove feedback popup * update remove some test and feedback related update remove some test and feedback related * add draft tests add draft tests * update feedback add php and UI tests update feedback add php and UI tests * update test screen shots update test screen shots * Update demo.twig add heart to demo page * add feedback back in extend the modal add feedback back in extend the modal * update coreHome update coreHome * update screen shots update screen shots * Update FeedbackQuestion_spec.js update js tests * update test update test * built vue files * update screenshot and js tests update screenshot and js tests * Update FeedbackQuestion_spec.js test success * update screenshot update screenshot * update tests update tests * fix test error fix test error * Removing the refer us popup * Readding accidentally removed language files * update test * update test * remove refer us * update feedback umd js update feedback umd js * merge Andy branch merge Andy branch and update screen shots * revert language changes revert language changes * revert language changes revert language changes * revert language file revert language file * revert unrelated lang change revert unrelated lang change * revert lang change revert lang change * revert lang change revert lang change * Delete ControllerTest.php remove controller test not in used * Update core/Piwik.php Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> * Update plugins/Morpheus/javascripts/piwikHelper.js Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> * update a big that cancel and reopen it again update a bug that cancel and reopen it again * update compare error update compare error * Update plugins/Feedback/FeedbackReminder.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update feedback show logic update feedback show logic * Update FeedbackQuestion_spec.js update tests * Update Feedback.php remove comments * Update .gitignore * update vue build file update vue build file * built vue files * update vue build file update vue build file * add close button add close button * add close button add close button * update screenshot update screenshot * remove umd remove umd * git add corehome git add corehome * revert all the umd file revert all the umd file * built vue files * built vue files * Update plugins/Feedback/lang/en.json Co-authored-by: Stefan Giehl <stefan@matomo.org> * update per review update per review * built vue files * set auto focus on modal open set auto focus on modal open * built vue files * Update FeedbackQuestion.vue add please write in english * built vue files * remove please write in English remove please write in English * built vue files * update tests and question tests update tests and question tests * set cookie in the test set cookie in the test * Update page-renderer.js add setCookie to tests * update test only load 1 update test only load 1 * built vue files * Update FeedbackQuestion_feedback_popup.png update screen shot * Update piwikHelper.js update button css * update screen shot update screen shot * Update plugins/Feedback/Feedback.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/vue/src/FeedbackQuestion/FeedbackQuestion.vue Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update plugins/Feedback/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * Update core/Plugin/API.php Co-authored-by: Stefan Giehl <stefan@matomo.org> * update cookie and tests update cookie and tests * built vue files * test setcookie in tests test setcookie in tests * update tests update tests * update tests update tests * Update FeedbackQuestion_spec.js update cookie test * extend setCookie in test extend setCookie in test * update elints format update elints format * built vue files * test set cookie test set cookie * built vue files * Update FeedbackQuestion_spec.js set cookie after goto URL * Update FeedbackQuestion_spec.js int to string * update set cookie update set cookie * update test URL update test URL Co-authored-by: peterhashair <peterhashair@users.noreply.github.com> Co-authored-by: Andrew Davis <andrew.affinity@gmail.com> Co-authored-by: Ben Burgess <88810029+bx80@users.noreply.github.com> Co-authored-by: Stefan Giehl <stefan@matomo.org>
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php20
1 files changed, 17 insertions, 3 deletions
diff --git a/core/Date.php b/core/Date.php
index 82a3df42a6..a214751b8e 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -41,7 +41,7 @@ class Date
/** The default date time string format. */
const DATE_TIME_FORMAT = 'Y-m-d H:i:s';
-
+
/** Timestamp when first website came online - Tue, 06 Aug 1991 00:00:00 GMT. */
const FIRST_WEBSITE_TIMESTAMP = 681436800;
@@ -155,7 +155,7 @@ class Date
$date = new Date($dateString);
}
$timestamp = $date->getTimestamp();
-
+
if ($timestamp < self::FIRST_WEBSITE_TIMESTAMP) {
$dateOfFirstWebsite = new self(self::FIRST_WEBSITE_TIMESTAMP);
$message = Piwik::translate('General_ExceptionInvalidDateBeforeFirstWebsite', array(
@@ -165,7 +165,7 @@ class Date
));
throw new Exception($message . ": $dateString");
}
-
+
if (empty($timezone)) {
return $date;
}
@@ -986,6 +986,20 @@ class Date
}
/**
+ * Adds `$n` Month to `$this` date and returns the result in a new Date.
+ * instance.
+ *
+ * @param int $n Number of days to add, must be > 0.
+ * @return \Piwik\Date
+ */
+
+ public function addMonth($n)
+ {
+ $ts = strtotime("+$n month", $this->timestamp);
+ return new Date($ts, $this->timezone);
+ }
+
+ /**
* Adds `$n` hours to `$this` date and returns the result in a new Date.
*
* @param int $n Number of hours to add. Can be less than 0.