summaryrefslogtreecommitdiffstats
path: root/apps/contacts
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-03-12 21:56:28 +0100
committerThomas Tanghus <thomas@tanghus.net>2012-03-12 21:56:28 +0100
commit551b4443e13df2ef935a225afb7f29767ac5475b (patch)
tree5051b8391a9d8c38ff1579698027c859d2302abb /apps/contacts
parent60fe9dda5de9acc7de1120fe4edb2ac300695bb2 (diff)
downloadnextcloud-server-551b4443e13df2ef935a225afb7f29767ac5475b.tar.gz
nextcloud-server-551b4443e13df2ef935a225afb7f29767ac5475b.zip
Force load profile pic after edit hack.
Diffstat (limited to 'apps/contacts')
-rw-r--r--apps/contacts/ajax/savecrop.php1
-rw-r--r--apps/contacts/templates/part.contactphoto.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php
index ffbfaeb6e38..0df4e1998cb 100644
--- a/apps/contacts/ajax/savecrop.php
+++ b/apps/contacts/ajax/savecrop.php
@@ -104,6 +104,7 @@ if(file_exists($tmp_path)) {
$tmpl->assign('tmp_path', $tmpfname);
$tmpl->assign('mime', $image->mimeType());
$tmpl->assign('id', $id);
+ $tmpl->assign('refresh', true);
$tmpl->assign('width', $image->width());
$tmpl->assign('height', $image->height());
$page = $tmpl->fetchPage();
diff --git a/apps/contacts/templates/part.contactphoto.php b/apps/contacts/templates/part.contactphoto.php
index 8107650d161..bcb2f75815c 100644
--- a/apps/contacts/templates/part.contactphoto.php
+++ b/apps/contacts/templates/part.contactphoto.php
@@ -2,8 +2,9 @@
$id = $_['id'];
$wattr = isset($_['width'])?'width="'.$_['width'].'"':'';
$hattr = isset($_['height'])?'height="'.$_['height'].'"':'';
+$rand = isset($_['refresh'])?'&'.rand().'='.rand():'';
?>
-<img class="loading" id="contacts_details_photo" <?php echo $wattr; ?> <?php echo $hattr; ?> src="<?php echo OC_Helper::linkToAbsolute('contacts', 'photo.php'); ?>?id=<?php echo $id; ?>" />
+<img class="loading" id="contacts_details_photo" <?php echo $wattr; ?> <?php echo $hattr; ?> src="<?php echo OC_Helper::linkToAbsolute('contacts', 'photo.php'); ?>?id=<?php echo $id.$rand; ?>" />
<progress id="contacts_details_photo_progress" style="display:none;" value="0" max="100">0 %</progress>