1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 05:11:42 +02:00

Code optimization and cleanup.

This commit is contained in:
Cameron
2020-12-10 15:52:48 -08:00
parent bd3a181e27
commit f605ddc552
39 changed files with 364 additions and 371 deletions

View File

@@ -3571,7 +3571,7 @@ class e_tree_model extends e_front_model
*/
protected function countResults($sql)
{
$this->_total = is_integer($sql->total_results) ? $sql->total_results : false; //requires SQL_CALC_FOUND_ROWS in query - see db handler
$this->_total = is_int($sql->total_results) ? $sql->total_results : false; //requires SQL_CALC_FOUND_ROWS in query - see db handler
if(false === $this->_total && $this->getModelTable() && !$this->getParam('nocount'))
{
//SQL_CALC_FOUND_ROWS not found in the query, do one more query