alecpl
2010-09-08 2aa2b332f6e216ceeabc36ef6b942c40d91bda5a
program/include/rcube_vcard.php
@@ -86,6 +86,13 @@
      $this->email[0] = $this->email[$pref_index];
      $this->email[$pref_index] = $tmp;
    }
    // make sure displayname is not empty (required by RFC2426)
    if (!strlen($this->displayname)) {
      // the same method is used in steps/mail/addcontact.inc
      $this->displayname = ucfirst(preg_replace('/[\.\-]/', ' ',
        substr($this->email[0], 0, strpos($this->email[0], '@'))));
    }
  }