diff options
Diffstat (limited to 'core/DataTable.php')
-rw-r--r-- | core/DataTable.php | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/core/DataTable.php b/core/DataTable.php index a5590e1cbb..13f7f1e3ff 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -588,14 +588,13 @@ class Piwik_DataTable */ public function getRowsCount() { - $count = count($this->rows); if(is_null($this->summaryRow)) { - return $count; + return count($this->rows); } else { - return $count + 1; + return count($this->rows) + 1; } } @@ -820,10 +819,7 @@ class Piwik_DataTable $table1->rebuildIndex(); $table2->rebuildIndex(); - $countrows1 = $table1->getRowsCount(); - $countrows2 = $table2->getRowsCount(); - - if($countrows1 != $countrows2) + if($table1->getRowsCount() != $table2->getRowsCount()) { return false; } @@ -831,11 +827,8 @@ class Piwik_DataTable foreach($rows1 as $row1) { $row2 = $table2->getRowFromLabel($row1->getColumn('label')); - if($row2 === false) - { - return false; - } - if( !Piwik_DataTable_Row::isEqual($row1,$row2) ) + if($row2 === false + || !Piwik_DataTable_Row::isEqual($row1,$row2)) { return false; } |