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:
authorsgiehl <stefan@piwik.org>2013-10-26 22:51:20 +0400
committersgiehl <stefan@piwik.org>2013-10-27 15:08:47 +0400
commit97e82d3999e16eaae8229b0e8fffff1255cee2be (patch)
tree3e7ccfa2bfe31076d2b7259a831ba86db2592638 /core/Period.php
parentdd7012ba06ed77fb4449e24e883da415d2f217f4 (diff)
no need to double check that every time
Diffstat (limited to 'core/Period.php')
-rw-r--r--core/Period.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/core/Period.php b/core/Period.php
index f56d7df24e..47103a232c 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -184,9 +184,7 @@ abstract class Period
*/
public function getDateStart()
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
if (count($this->subperiods) == 0) {
return $this->getDate();
}
@@ -207,9 +205,7 @@ abstract class Period
*/
public function getDateEnd()
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
if (count($this->subperiods) == 0) {
return $this->getDate();
}
@@ -263,9 +259,7 @@ abstract class Period
*/
public function getNumberOfSubperiods()
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
return count($this->subperiods);
}
@@ -277,9 +271,7 @@ abstract class Period
*/
public function getSubperiods()
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
return $this->subperiods;
}
@@ -303,9 +295,7 @@ abstract class Period
*/
public function toString($format = "Y-m-d")
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
$dateString = array();
foreach ($this->subperiods as $period) {
$dateString[] = $period->toString($format);
@@ -325,9 +315,7 @@ abstract class Period
public function get($part = null)
{
- if (!$this->subperiodsProcessed) {
- $this->generate();
- }
+ $this->generate();
return $this->date->toString($part);
}