From e0d7367f1fba0e31a86e31ac8fff765760209d61 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 22 Dec 2016 10:35:24 +0100 Subject: [PATCH] Fix adding images to new identity signatures It already worked only on edits, because the image data for new identity was stored in the wrong session item. --- CHANGELOG | 1 + program/steps/settings/save_identity.inc | 2 +- program/steps/settings/upload.inc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 370ce7cac..48b7382a8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ CHANGELOG Roundcube Webmail - Managesieve: Fix handling of scripts with nested rules (#5540) - Fix variable substitution in ldap host for some use-cases, e.g. new_user_identity (#5544) - Enigma: Fix PHP fatal error when decrypting a message with invalid signature (#5555) +- Fix adding images to new identity signatures RELEASE 1.2.3 ------------- diff --git a/program/steps/settings/save_identity.inc b/program/steps/settings/save_identity.inc index 8ffe39e6b..312930b12 100644 --- a/program/steps/settings/save_identity.inc +++ b/program/steps/settings/save_identity.inc @@ -96,7 +96,7 @@ if (!empty($save_data['signature']) && !empty($save_data['html_signature'])) { unset($_POST['_signature']); } -// update an existing contact +// update an existing identity if ($_POST['_iid']) { $iid = rcube_utils::get_input_value('_iid', rcube_utils::INPUT_POST); diff --git a/program/steps/settings/upload.inc b/program/steps/settings/upload.inc index 99b398d3c..0cf7ae60c 100644 --- a/program/steps/settings/upload.inc +++ b/program/steps/settings/upload.inc @@ -25,7 +25,7 @@ if (!empty($_GET['_progress'])) { } $from = rcube_utils::get_input_value('_from', rcube_utils::INPUT_GET); -$type = str_replace('edit-', '', $from); +$type = preg_replace('/(add|edit)-/', '', $from); if ($RCMAIL->action == 'upload-display') { $id = 'undefined';