Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Sorting change #2

merged 1 commit into from

2 participants

Nick Dunn Rowan Lewis
Nick Dunn

Really small update. Sorting on yes/no didn't make too much sense in this context, so I changed the field to sort on the order column instead. This allows you to get a list of entries back where the box is ticked (e.g. a "Feature on the homepage" checkbox) but also sorted by the order in which they were featured. No need to cobble together a checkbox and order entries to achieve the same spunktionality.

Rowan Lewis psychoticmeow merged commit 47138c9 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 11, 2012
  1. Nick Dunn
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  fields/field.uniquecheckbox.php
2  fields/field.uniquecheckbox.php
@@ -179,7 +179,7 @@ public function buildSortingSQL(&$joins, &$where, &$sort, $order = 'ASC') {
`tbl_entries_data_{$field_id}` AS ed
ON ( = ed.entry_id)
- $sort = 'ORDER BY ' . (strtolower($order) == 'random' ? 'RAND()' : "ed.value {$order}");
+ $sort = 'ORDER BY ' . (strtolower($order) == 'random' ? 'RAND()' : "ed.order {$order}");
public function buildDSRetrivalSQL($data, &$joins, &$where, $andOperation = false) {
Something went wrong with that request. Please try again.