phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.123.2.9.2.4


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.123.2.9.2.4,1.123.2.9.2.5
Date: Sat, 03 May 2003 17:50:28 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv11147

Modified Files:
      Tag: Version-0_9_16-branch
        class.common.inc.php 
Log Message:
account-display is now configurable via the prefs:
- Firstname Lastname (default)
- Lastname, Firstname
- username
- <username> Lastname, Firstname


Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.123.2.9.2.4
retrieving revision 1.123.2.9.2.5
diff -C2 -r1.123.2.9.2.4 -r1.123.2.9.2.5
*** class.common.inc.php        3 May 2003 10:43:46 -0000       1.123.2.9.2.4
--- class.common.inc.php        3 May 2003 21:50:25 -0000       1.123.2.9.2.5
***************
*** 391,394 ****
--- 391,400 ----
                        }
  
+                       $display = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['account_display'];
+ 
+                       if (!$firstname && !$lastname || $display == 'username')
+                       {
+                               return $lid;
+                       }
                        if ($lastname)
                        {
***************
*** 401,423 ****
                        }
  
!                       if(isset($a))
                        {
!                               switch(count($a))
!                               {
!                                       case 0:
!                                               return $lid;
!                                               break;
!                                       case 1:
!                                               return '&lt;' . $lid . '&gt; ' 
. $a[0];
!                                               break;
!                                       case 2:
!                                               return '&lt;' . $lid . '&gt; ' 
. implode(', ',$a);
!                                               break;
!                               }
!                       }
!                       else
!                       {
!                               return $lid;
                        }
                }
  
--- 407,424 ----
                        }
  
!                       switch($display)
                        {
!                               case 'all':
!                                       $name = "&lt;$lid&gt; ";
!                                       // fall-through
!                               case 'lastname':
!                                       $name .= implode(', ',$a);
!                                       break;
!                               case 'firstname':
!                               default:
!                                       $name = $firstname . ' ' . $lastname;
!                                       break;
                        }
+                       return $name;
                }
  





reply via email to

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