diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-11-26 04:34:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-11-26 04:34:35 +0400 |
commit | 47c6dd71a650123f21e08dbe4e308a325ce50269 (patch) | |
tree | a3824e274f4e0d2e54efe148b60fb59e6d99633c /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php | |
parent | 1abfba021710b8fd0bcf7145942c4f548e591d37 (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.php | 11 |
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); |