]> source.dussan.org Git - nextcloud-server.git/commitdiff
Force load profile pic after edit hack.
authorThomas Tanghus <thomas@tanghus.net>
Mon, 12 Mar 2012 20:56:28 +0000 (21:56 +0100)
committerThomas Tanghus <thomas@tanghus.net>
Mon, 12 Mar 2012 20:56:28 +0000 (21:56 +0100)
apps/contacts/ajax/savecrop.php
apps/contacts/templates/part.contactphoto.php

index ffbfaeb6e384c1998c8e05b99f6a513e0101eeb0..0df4e1998cba0630765198c0b08745ee76df990f 100644 (file)
@@ -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();
index 8107650d161fd14510049e19456f185cc24d07a1..bcb2f75815c82f100ca3e5040558cc52400e87d9 100644 (file)
@@ -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>