[opw-web] Always order organizations alphabetically
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [opw-web] Always order organizations alphabetically
- Date: Mon, 10 Mar 2014 16:10:47 +0000 (UTC)
commit 78c3f9798814d800708ba0ba424c9f75cd5ac481
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 10 11:29:08 2014 -0400
Always order organizations alphabetically
modules/mod_manage_organizations.php | 3 ++-
utils.php | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/modules/mod_manage_organizations.php b/modules/mod_manage_organizations.php
index 90e7d46..7028974 100644
--- a/modules/mod_manage_organizations.php
+++ b/modules/mod_manage_organizations.php
@@ -29,7 +29,8 @@ if ($action == 'list')
// Get all organizations
$sql = "SELECT * FROM {$db->prefix}organizations " .
- " WHERE program_id = :program_id ".
+ " WHERE program_id = :program_id " .
+ "ORDER BY title " .
"LIMIT :start, :count";
$organization_data = $db->query($sql, array('program_id' => $program_id,
'i:start' => $limit_start,
diff --git a/utils.php b/utils.php
index 3428a94..35bf4f6 100644
--- a/utils.php
+++ b/utils.php
@@ -4,7 +4,8 @@ function build_organization_select($program_id, $current, $include_other, $name=
global $db, $lang;
$sql = "SELECT * FROM {$db->prefix}organizations " .
- "WHERE program_id = ?";
+ "WHERE program_id = ? " .
+ "ORDER by title";
$list_data = $db->query($sql, $program_id);
$option_name = $lang->get('select_organization');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]