diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-18 05:05:49 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-18 05:05:49 +0400 |
commit | 884e22d596b4b5be15fc6e33bb2403f021bfeb58 (patch) | |
tree | 9ad43b6828765571366f27a8e65114db643fa311 /plugins/Actions | |
parent | ba372fe35080bc758c43a0ffdf83cb5d5dec16ce (diff) |
Refactor const to highlight their coupling #4278
Diffstat (limited to 'plugins/Actions')
-rw-r--r-- | plugins/Actions/API.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php index 0bd3aa66d6..0ed86ca251 100644 --- a/plugins/Actions/API.php +++ b/plugins/Actions/API.php @@ -351,11 +351,11 @@ class API extends \Piwik\Plugin\API foreach ($customVariableDatatables as $key => $customVariableTableForDate) { // we do not enter the IF, in the case idSite=1,3 AND period=day&date=datefrom,dateto, if ($customVariableTableForDate instanceof DataTable - && $customVariableTableForDate->getMetadata('period') + && $customVariableTableForDate->getMetadata(Archive\DataTableFactory::TABLE_METADATA_PERIOD_INDEX) ) { $row = $customVariableTableForDate->getRowFromLabel($customVarNameToLookFor); if ($row) { - $dateRewrite = $customVariableTableForDate->getMetadata('period')->getDateStart()->toString(); + $dateRewrite = $customVariableTableForDate->getMetadata(Archive\DataTableFactory::TABLE_METADATA_PERIOD_INDEX)->getDateStart()->toString(); $idSubtable = $row->getIdSubDataTable(); $categories = APICustomVariables::getInstance()->getCustomVariablesValuesFromNameId($idSite, $period, $dateRewrite, $idSubtable, $segment); $dataTable->addTable($categories, $key); |