]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return standard thumbnail even if contact couldn't be found as it could be because...
authorThomas Tanghus <thomas@tanghus.net>
Mon, 9 Jan 2012 22:16:07 +0000 (23:16 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 9 Jan 2012 22:16:07 +0000 (23:16 +0100)
apps/contacts/thumbnail.php

index 622718d65c636fd9cff59eb2d7c829b788ac1688..e49098ce8209b82953e9bf333e2b146c0571cd52 100644 (file)
@@ -46,8 +46,8 @@ $l10n = new OC_L10N('contacts');
 
 $card = OC_Contacts_VCard::find( $id );
 if( $card === false ){
-       OC_Log::write('contacts','thumbnail.php. Contact could not be found.',OC_Log::ERROR);
-       //echo $l10n->t('Contact could not be found.');
+       OC_Log::write('contacts','thumbnail.php. Contact could not be found: '.$id,OC_Log::ERROR);
+       getStandardImage();
        exit();
 }
 
@@ -55,7 +55,6 @@ if( $card === false ){
 $addressbook = OC_Contacts_Addressbook::find( $card['addressbookid'] );
 if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){
        OC_Log::write('contacts','thumbnail.php. Wrong contact/addressbook - WTF?',OC_Log::ERROR);
-       //echo $l10n->t('This is not your contact.'); // This is a weird error, why would it come up? (Better feedback for users?)
        exit();
 }