Skip to content

Commit

Permalink
fix: for issue issue 582 & 583
Browse files Browse the repository at this point in the history
  • Loading branch information
David McReynolds committed Aug 10, 2021
1 parent 6164cd7 commit 8670761
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fuel/modules/fuel/models/Base_module_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ public function list_items($limit = NULL, $offset = 0, $col = 'id', $order = 'as
}

$escape_order_by = (property_exists($this, 'escape_order_by')) ? $this->escape_order_by : TRUE;

// Additional cleaning
if ($escape_order_by && strpos($col, ')') !== FALSE)
{
$col = '';
}
if (!empty($col)) $this->db->order_by($col, $order, $escape_order_by);
if (!empty($limit)) $this->db->limit((int) $limit);
$this->db->offset((int)$offset);
Expand Down

0 comments on commit 8670761

Please sign in to comment.