Skip to content

Commit

Permalink
sort locations by label
Browse files Browse the repository at this point in the history
The sorting happens between the BEFORE and the AFTER event. Templates
should generally use the BEFORE event to get their stuff properly
sorted, but they could use the AFTER event to add something to the start
or end.
  • Loading branch information
splitbrain committed Mar 28, 2017
1 parent 88d0825 commit 7194012
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helper.php
Expand Up @@ -126,6 +126,7 @@ public function getLocations() {
$data = array('' => $this->getLang('unknown'));
$event = new Doku_Event('PLUGIN_TPLINC_LOCATIONS_SET', $data);
$event->advise_before(false);
asort($data);
$event->advise_after();

return $data;
Expand Down

0 comments on commit 7194012

Please sign in to comment.