diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-03-07 21:29:23 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-03-07 21:46:42 +0100 |
commit | d8cfe77ba5348d29a9e2b046e2c7efc1dd4758cb (patch) | |
tree | 6c4945341381a37b8d2ffb086415664104ebeb86 /apps/contacts | |
parent | 95995482034a607085d2cdc8000e5ea437c0cb1f (diff) | |
download | nextcloud-server-d8cfe77ba5348d29a9e2b046e2c7efc1dd4758cb.tar.gz nextcloud-server-d8cfe77ba5348d29a9e2b046e2c7efc1dd4758cb.zip |
Contacts: small fixes and cleanups
Diffstat (limited to 'apps/contacts')
-rw-r--r-- | apps/contacts/ajax/loadphoto.php | 6 | ||||
-rw-r--r-- | apps/contacts/lib/vcard.php | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/apps/contacts/ajax/loadphoto.php b/apps/contacts/ajax/loadphoto.php index 358e046942b..1f4cde0b535 100644 --- a/apps/contacts/ajax/loadphoto.php +++ b/apps/contacts/ajax/loadphoto.php @@ -18,8 +18,6 @@ * You should have received a copy of the GNU Affero General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. * - * TODO: Translatable strings. - * Remember to delete tmp file at some point. */ // Init owncloud require_once('../../../lib/base.php'); @@ -33,7 +31,7 @@ OC_JSON::checkAppEnabled('contacts'); function bailOut($msg) { OC_JSON::error(array('data' => array('message' => $msg))); - OC_Log::write('contacts','ajax/savecrop.php: '.$msg, OC_Log::DEBUG); + OC_Log::write('contacts','ajax/loadphoto.php: '.$msg, OC_Log::DEBUG); exit(); } @@ -42,7 +40,7 @@ $image = null; $id = isset($_GET['id']) ? $_GET['id'] : ''; if($id == '') { - bailOut('Missing contact id.'); + bailOut(OC_Contacts_App::$l10n->t('Missing contact id.')); } $tmpl = new OC_TEMPLATE("contacts", "part.contactphoto"); diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index 9324f158cc7..eade8859e76 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -174,6 +174,9 @@ class OC_Contacts_VCard{ if($property->name == 'UID'){ $uid = $property->value; } + if($property->name == 'ORG'){ + $org = $property->value; + } if($property->name == 'EMAIL' && is_null($email)){ // only use the first email as substitute for missing N or FN. $email = $property->value; } @@ -184,6 +187,8 @@ class OC_Contacts_VCard{ $fn = join(' ', array_reverse(array_slice(explode(';', $n), 0, 2))); } elseif($email) { $fn = $email; + } elseif($org) { + $fn = $org; } else { $fn = 'Unknown Name'; } |