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:
authormattab <matthieu.aubry@gmail.com>2013-11-26 04:34:35 +0400
committermattab <matthieu.aubry@gmail.com>2013-11-26 04:34:35 +0400
commit47c6dd71a650123f21e08dbe4e308a325ce50269 (patch)
treea3824e274f4e0d2e54efe148b60fb59e6d99633c /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
parent1abfba021710b8fd0bcf7145942c4f548e591d37 (diff)
trying to fix the build, let's see if this breaks something else
Diffstat (limited to 'core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php')
-rw-r--r--core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
index 84816d47f0..1e56bf4e7a 100644
--- a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
+++ b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
@@ -75,16 +75,17 @@ class ColumnCallbackAddColumnQuotient extends Filter
public function filter($table)
{
foreach ($table->getRows() as $key => $row) {
- $existingValue = $row->getColumn($this->columnNameToAdd);
- if ($existingValue !== false) {
- continue;
- }
-
$value = $this->getDividend($row);
if ($value === false && $this->shouldSkipRows) {
continue;
}
+ // Delete existing column if it exists
+ $existingValue = $row->getColumn($this->columnNameToAdd);
+ if ($existingValue !== false) {
+ $row->deleteColumn($this->columnNameToAdd);
+ }
+
$divisor = $this->getDivisor($row);
$formattedValue = $this->formatValue($value, $divisor);