diff options
author | zotlabs <mike@macgirvin.com> | 2016-11-26 14:28:36 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-11-26 14:28:36 -0800 |
commit | 7de4f1d96f5f1fe4dccd56c1456df1d82aa5c30b (patch) | |
tree | a94de02640e13abc0e6fbc618fbdee680bbfc612 /Zotlabs/Module | |
parent | 08a4bbb7d0b9c63ec97bb4f74e5842cc3ea8ee77 (diff) | |
download | volse-hubzilla-7de4f1d96f5f1fe4dccd56c1456df1d82aa5c30b.tar.gz volse-hubzilla-7de4f1d96f5f1fe4dccd56c1456df1d82aa5c30b.tar.bz2 volse-hubzilla-7de4f1d96f5f1fe4dccd56c1456df1d82aa5c30b.zip |
connedit prev/next: sort in the db.
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Connedit.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php index 9dfa871f7..47e1ce167 100644 --- a/Zotlabs/Module/Connedit.php +++ b/Zotlabs/Module/Connedit.php @@ -48,9 +48,6 @@ class Connedit extends \Zotlabs\Web\Controller { } - static public function xchan_name_sort($a,$b) { - return strcasecmp($a['xchan_name'],$b['xchan_name']); - } /* @brief Evaluate posted values and set changes * @@ -557,12 +554,11 @@ class Connedit extends \Zotlabs\Web\Controller { $contact_id = \App::$poi['abook_id']; $contact = \App::$poi; - $cn = q("SELECT abook_id, xchan_name from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_self = 0", + $cn = q("SELECT abook_id, xchan_name from abook left join xchan on abook_xchan = xchan_hash where abook_channel = %d and abook_self = 0 order by xchan_name", intval(local_channel()) ); - if($cn) { - usort($cn, '\\Zotlabs\\Module\\Connedit::xchan_name_sort'); + if($cn) { $pntotal = count($cn); for($x = 0; $x < $pntotal; $x ++) { |