[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15617] controller: sort location list
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15617] controller: sort location list |
Date: |
Thu, 8 Sep 2016 07:39:50 +0000 (UTC) |
Revision: 15617
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15617
Author: sigurdne
Date: 2016-09-08 07:39:49 +0000 (Thu, 08 Sep 2016)
Log Message:
-----------
controller: sort location list
Modified Paths:
--------------
trunk/controller/inc/class.uicalendar.inc.php
Modified: trunk/controller/inc/class.uicalendar.inc.php
===================================================================
--- trunk/controller/inc/class.uicalendar.inc.php 2016-09-08 07:28:48 UTC
(rev 15616)
+++ trunk/controller/inc/class.uicalendar.inc.php 2016-09-08 07:39:49 UTC
(rev 15617)
@@ -505,6 +505,19 @@
unset($location);
}
+ // Sort the data with account_lastname ascending,
account_firstname ascending
+ // Add $data as the last parameter, to sort by the
common key
+ if ($locations_list)
+ {
+ $locations_location_code = array();
+ foreach ($locations_list as $key => $row)
+ {
+ $locations_location_code[$key] =
$row['location_code'];
+ }
+ array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+ }
+
+
// Validates year. If year is not set, current year is
chosen
$year = $this->validate_year($year);
@@ -745,6 +758,7 @@
$bookmark_locations[] = $location_code;
}
+ $locations_list = array();
if (is_numeric($control_id) & $control_id > 0)
{
$locations_for_control_array =
$this->so_control->get_locations_for_control($control_id);
@@ -762,6 +776,17 @@
reset($locations_for_control_array);
unset($location);
}
+ // Sort the data with account_lastname ascending,
account_firstname ascending
+ // Add $data as the last parameter, to sort by the
common key
+ if ($locations_list)
+ {
+ $locations_location_code = array();
+ foreach ($locations_list as $key => $row)
+ {
+ $locations_location_code[$key] =
$row['location_code'];
+ }
+ array_multisort($locations_location_code,
SORT_ASC, $locations_list);
+ }
// Validates year. If year is not set, current year is
chosen
$year = $this->validate_year($year);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15617] controller: sort location list,
sigurdne <=