Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: occupynet/sandy
base: 102dd3c50d
...
head fork: occupynet/sandy
compare: 98f633ac2e
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 11 additions and 5 deletions.
  1. +11 −5 page-show-cards.php
View
16 page-show-cards.php
@@ -137,16 +137,22 @@ function options_filter_ul ($filters, $axis) {
// Here is a way to clean up label text that you do not like.
$filterMap['type']['text'] = array('unknown' => 'Other');
-// Force the unknown / other settings to bottom.
+// Sort these by # of cards, with blanks sorted down to the end.
if (isset($filters['state']['values'][''])) :
$filters['state']['values'][''] = 0;
endif;
-$filters['type']['values']['unknown'] = 0;
-$filters['region']['values']['Other/region-other'] = 0;
-
arsort($filters['state']['values']);
+
+$filters['type']['values']['unknown'] = 0;
arsort($filters['type']['values']);
-arsort($filters['region']['values']);
+
+// Sort A-Z, with "Other" forced down to the end.
+uksort($filters['region']['values'], function ($left, $right) {
+ // Force "Other" to end of alpha order
+ $a = (('region-other'==$left) ? '{|}' : $left);
+ $b = (('region-other'==$right) ? '{|}' : $right);
+ return strcmp($a, $b);
+});
//////////////////////////////////////////////////////
// HEADER: This kind of page requires some scripts. //

No commit comments for this range

Something went wrong with that request. Please try again.