Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Commit

Permalink
Usability: Sort contacts alphabetically by 'name' - usability improve…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
bbs2web committed Feb 25, 2014
1 parent e84d15d commit d294d55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/www/client/ajax/contacts_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
include("../src/prepend.inc.php");


$sql = "SELECT clid from contacts WHERE userid='{$_SESSION['userid']}'";
$sql = "SELECT clid FROM contacts LEFT JOIN contacts_data ON contacts.clid = contacts_data.contactid WHERE userid='{$_SESSION['userid']}' AND contacts_data.field = 'name'";

if ($req_id)
{
Expand Down Expand Up @@ -31,7 +31,7 @@

// $sort = $req_sort ? mysql_escape_string($req_sort) : "module_name";
// $dir = $req_dir ? mysql_escape_string($req_dir) : "ASC";
$sql .= " ORDER BY tld ASC, module_name ASC";
$sql .= " ORDER BY tld ASC, contacts_data.value, module_name ASC";



Expand Down
8 changes: 4 additions & 4 deletions app/www/client/complete_transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@
if ($contact_count < 25)
{
$smarty_contact["exists"] = $db->GetAll("
SELECT clid FROM contacts
WHERE userid=? AND
SELECT clid FROM contacts LEFT JOIN contacts_data ON contacts.clid = contacts_data.contactid
WHERE userid=? AND contacts_data.field = 'name' AND
(TLD = ? OR (module_name=? AND section_name=? AND target_index=?)) AND
groupname=? ORDER BY id ASC
groupname=? ORDER BY contacts_data.value ASC, contacts.clid ASC
", array (
$_SESSION['userid'],
//
Expand Down Expand Up @@ -218,4 +218,4 @@
$display["load_extjs_nocss"] = true;

require_once('src/append.inc.php');
?>
?>

0 comments on commit d294d55

Please sign in to comment.