diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-23 13:03:50 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-23 13:03:50 +0200 |
commit | 1b084cc120deff1d5efd96c842c89367b283b4ce (patch) | |
tree | 319181f656e9c08d6f38b1f20dc183c90a636413 /apps/contacts/photo.php | |
parent | 4c2cf35050032002d01978f53201723330ebfe16 (diff) | |
parent | 82ba2151d176e7e0e1ebcfde8de6db46f651dad4 (diff) | |
download | nextcloud-server-1b084cc120deff1d5efd96c842c89367b283b4ce.tar.gz nextcloud-server-1b084cc120deff1d5efd96c842c89367b283b4ce.zip |
Merge branch 'master' into movable_apps
Diffstat (limited to 'apps/contacts/photo.php')
-rw-r--r-- | apps/contacts/photo.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php index cd0ae350102..c19ccccbc7f 100644 --- a/apps/contacts/photo.php +++ b/apps/contacts/photo.php @@ -19,7 +19,12 @@ function getStandardImage(){ OC_Response::redirect(OC_Helper::imagePath('contacts', 'person_large.png')); } -$id = $_GET['id']; +$id = isset($_GET['id']) ? $_GET['id'] : null; +$caching = isset($_GET['refresh']) ? 0 : null; + +if(is_null($id)) { + getStandardImage(); +} $contact = OC_Contacts_App::getContactVCard($id); $image = new OC_Image(); @@ -30,7 +35,7 @@ if(!$image) { if( is_null($contact)) { OC_Log::write('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OC_Log::ERROR); } else { - OC_Response::enableCaching(); + OC_Response::enableCaching($caching); OC_Contacts_App::setLastModifiedHeader($contact); // Photo :-) |