diff --git a/Editor/Options.php b/Editor/Options.php index 3f304cf..9c7a37d 100644 --- a/Editor/Options.php +++ b/Editor/Options.php @@ -375,6 +375,9 @@ public function exec($db, $refresh, $search = null) } $q->order($this->_order); + } else if ($this->_order === true) { + // Attempt to do a database order, needed for "limit()"ed results + $q->order($this->_label[0]); } $rows = $q @@ -426,7 +429,7 @@ public function exec($db, $refresh, $search = null) return is_numeric($aLabel) && is_numeric($bLabel) ? ($aLabel * 1) - ($bLabel * 1) : - strcmp($aLabel, $bLabel); + strcmp($aLabel, $bLabel); }); }