summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-08 14:15:30 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-08 14:15:30 +0200
commit8799df8ccdb09114b14742e0493a8ba401688fdf (patch)
tree409a1ab486023d2c23807a1b37be11ed809a3ff7 /program/js
parentbc94e296e74ab4a3313a3f807b0a5cc40f264879 (diff)
Fix redundant SQL query on contact photo request after photo upload.
The query was also invalid in case of uploading photo in contact create form. Move contact photo handling from show.inc into a separate file.
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 45a17d640..6f5bfbced 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -4995,7 +4995,7 @@ function rcube_webmail()
this.replace_contact_photo = function(id)
{
var img_src = id == '-del-' ? this.env.photo_placeholder :
- this.env.comm_path + '&_action=photo&_source=' + this.env.source + '&_cid=' + this.env.cid + '&_photo=' + id;
+ this.env.comm_path + '&_action=photo&_source=' + this.env.source + '&_cid=' + (this.env.cid || 0) + '&_photo=' + id;
this.set_photo_actions(id);
$(this.gui_objects.contactphoto).children('img').attr('src', img_src);