Aleksander Machniak
2014-10-30 968601f1f5e7366ddc8aa72d00d2f727d9eab572
Give higher priority to the 'subject' parameter from request or plugin
1 files modified
6 ■■■■ changed files
program/steps/mail/compose.inc 6 ●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc
@@ -1452,6 +1452,9 @@
    if (isset($_POST['_subject'])) {
        $subject = rcube_utils::get_input_value('_subject', rcube_utils::INPUT_POST, TRUE);
    }
    else if (!empty($COMPOSE['param']['subject'])) {
        $subject = $COMPOSE['param']['subject'];
    }
    // create a reply-subject
    else if ($compose_mode == RCUBE_COMPOSE_REPLY) {
        if (preg_match('/^re:/i', $MESSAGE->subject))
@@ -1472,9 +1475,6 @@
    // creeate a draft-subject
    else if ($compose_mode == RCUBE_COMPOSE_DRAFT || $compose_mode == RCUBE_COMPOSE_EDIT) {
        $subject = $MESSAGE->subject;
    }
    else if (!empty($COMPOSE['param']['subject'])) {
        $subject = $COMPOSE['param']['subject'];
    }
    $out = $form_start ? "$form_start\n" : '';