From 8799df8ccdb09114b14742e0493a8ba401688fdf Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 8 Aug 2013 14:15:30 +0200 Subject: 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. --- program/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program/js/app.js') 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); -- cgit v1.2.3