Skip to content

Commit

Permalink
Refactor query variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 12, 2024
1 parent fddfa2f commit e0795d7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1596,25 +1596,25 @@ private function _ssp_query($query, $http)
$this->_ssp_filter($query, $http);

// Get the number of rows in the result set
$ssp_set_count = $this->_db
$ssp_set_count_query = $this->_db
->query('count')
->table($this->_read_table())
->get($this->_pkey[0]);
$this->_get_where($ssp_set_count);
$this->_ssp_filter($ssp_set_count, $http);
$ssp_set_count->left_join($this->_leftJoin);
$ssp_set_count = $ssp_set_count->exec()->fetch();
$this->_get_where($ssp_set_count_query);
$this->_ssp_filter($ssp_set_count_query, $http);
$ssp_set_count_query->left_join($this->_leftJoin);
$ssp_set_count = $ssp_set_count_query->exec()->fetch();

// Get the number of rows in the full set
$ssp_full_count = $this->_db
$ssp_full_count_query = $this->_db
->query('count')
->table($this->_read_table())
->get($this->_pkey[0]);
$this->_get_where($ssp_full_count);
$this->_get_where($ssp_full_count_query);
if (count($this->_where)) { // only needed if there is a where condition
$ssp_full_count->left_join($this->_leftJoin);
$ssp_full_count_query->left_join($this->_leftJoin);
}
$ssp_full_count = $ssp_full_count->exec()->fetch();
$ssp_full_count = $ssp_full_count_query->exec()->fetch();

return [
'draw' => (int) $http['draw'],
Expand Down

0 comments on commit e0795d7

Please sign in to comment.