phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] [19090] fix formatting and sorting of people's names


From: Dave Hall
Subject: [Phpgroupware-cvs] [19090] fix formatting and sorting of people's names
Date: Fri, 20 Feb 2009 12:19:44 +0000

Revision: 19090
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19090
Author:   skwashd
Date:     2009-02-20 12:19:44 +0000 (Fri, 20 Feb 2009)

Log Message:
-----------
fix formatting and sorting of people's names

Modified Paths:
--------------
    branches/Version-0_9_16-branch/addressbook/inc/class.uiaddressbook.inc.php
    
branches/Version-0_9_16-branch/addressbook/inc/class.uicategorize_contacts.inc.php
    branches/Version-0_9_16-branch/phpgwapi/inc/class.contact_person.inc.php

Modified: 
branches/Version-0_9_16-branch/addressbook/inc/class.uiaddressbook.inc.php
===================================================================
--- branches/Version-0_9_16-branch/addressbook/inc/class.uiaddressbook.inc.php  
2009-02-20 12:16:18 UTC (rev 19089)
+++ branches/Version-0_9_16-branch/addressbook/inc/class.uiaddressbook.inc.php  
2009-02-20 12:19:44 UTC (rev 19090)
@@ -221,9 +221,9 @@
                        }
                        
                        if(!isset($this->cat_id))
-                       {               
-                                $this->cat_id = 
$this->prefs['default_category'];
-                        }
+                       {
+                               $this->cat_id = 
$this->prefs['default_category'];
+                       }
                        
                        if($this->cat_id && $this->cat_id!=0)
                        {
@@ -3078,7 +3078,7 @@
                function get_persons($fields_to_search, $current_person)
                {
                        $criteria = 
$this->bo->criteria_contacts(PHPGW_CONTACTS_ALL,PHPGW_CONTACTS_CATEGORIES_ALL,array(),'',$fields_to_search);
-                       $persons = 
$this->bo->get_persons($fields_to_search,'','','first_name','','',$criteria);
+                       $persons = 
$this->bo->get_persons($fields_to_search,'','','last_name','','',$criteria);
 
                        if ($persons)
                        {

Modified: 
branches/Version-0_9_16-branch/addressbook/inc/class.uicategorize_contacts.inc.php
===================================================================
--- 
branches/Version-0_9_16-branch/addressbook/inc/class.uicategorize_contacts.inc.php
  2009-02-20 12:16:18 UTC (rev 19089)
+++ 
branches/Version-0_9_16-branch/addressbook/inc/class.uicategorize_contacts.inc.php
  2009-02-20 12:19:44 UTC (rev 19090)
@@ -141,7 +141,7 @@
                                $GLOBALS['phpgw_info']['user']['account_id'], 
$access, $cat_id);
                        $persons = $this->contacts->get_persons(
                                array('person_id', 'per_full_name'),
-                               '','','','','',$criteria);
+                               '', '', 'last_name','ASC','',$criteria);
                        
                        if(is_array($persons))
                        {

Modified: 
branches/Version-0_9_16-branch/phpgwapi/inc/class.contact_person.inc.php
===================================================================
--- branches/Version-0_9_16-branch/phpgwapi/inc/class.contact_person.inc.php    
2009-02-20 12:16:18 UTC (rev 19089)
+++ branches/Version-0_9_16-branch/phpgwapi/inc/class.contact_person.inc.php    
2009-02-20 12:19:44 UTC (rev 19090)
@@ -321,9 +321,11 @@
                function full_name()
                {
 
-                       $this->add_field('per_full_name', 
sql::concat_null(array($this->real_field('per_first_name'), sql::string(' '),
+                       $this->add_field('per_full_name', 
sql::concat_null(array($this->real_field('per_prefix'), sql::string(' '),
+                                                                               
 $this->real_field('per_first_name'), sql::string(' '),
                                                                                
 $this->real_field('per_middle_name'), sql::string(' '),
-                                                                               
 $this->real_field('per_last_name'))));
+                                                                               
 $this->real_field('per_last_name'), sql::string(' '),
+                                                                               
 $this->real_field('per_suffix'))));
                }
 
        }






reply via email to

[Prev in Thread] Current Thread [Next in Thread]