Skip to content

Commit

Permalink
Fix: Use database order if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Nov 19, 2024
1 parent c80526e commit 31aa0f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Editor/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
});
}

Expand Down

0 comments on commit 31aa0f8

Please sign in to comment.