r28260 - /trunk/addressbook/inc/class.addressbook_bo.inc.php

View: New views
1 Messages — Rating Filter:   Alert me  

r28260 - /trunk/addressbook/inc/class.addressbook_bo.inc.php

by jaytraxx-2 :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Author: jaytraxx
Date: Wed Nov  4 16:09:24 2009
New Revision: 28260

URL: http://www.egroupware.org/viewvc/egroupware?rev=28260&view=rev
Log:
avoid setting fullname to empty string by first checking the strlen of it

Modified:
    trunk/addressbook/inc/class.addressbook_bo.inc.php

Modified: trunk/addressbook/inc/class.addressbook_bo.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/addressbook/inc/class.addressbook_bo.inc.php?rev=28260&r1=28259&r2=28260&view=diff
==============================================================================
--- trunk/addressbook/inc/class.addressbook_bo.inc.php (original)
+++ trunk/addressbook/inc/class.addressbook_bo.inc.php Wed Nov  4 16:09:24 2009
@@ -618,10 +618,11 @@
  $contact['modifier'] = $this->user;
  $contact['modified'] = $this->now_su;
  // set full name and fileas from the content
- if (!isset($contact['n_fn']) || $contact['n_fn'] != $this->fullname($contact)) {
- $contact['n_fn'] = $this->fullname($contact);
+ if (strlen($fullname = $this->fullname($contact)) > 0 && (!isset($contact['n_fn']) || $contact['n_fn'] != $fullname)) {
+ $contact['n_fn'] = $fullname;
  if (isset($contact['org_name'])) $contact['n_fileas'] = $this->fileas($contact);
  }
+ unset($fullname);
  $to_write = $contact;
  // (non-admin) user editing his own account, make sure he does not change fields he is not allowed to (eg. via SyncML or xmlrpc)
  if (!$ignore_acl && !$contact['owner'] && !$this->is_admin($contact))


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@...
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs