From 8271597836eeb9b6f50062c1ce6d685cb61e0e72 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Mon, 16 Nov 2015 03:11:47 -0500 Subject: [PATCH] Use ternary operator where applicable --- program/steps/mail/sendmail.inc | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/program/steps/mail/sendmail.inc b/program/steps/mail/sendmail.inc index f797e2d..dbd6f98 100644 --- a/program/steps/mail/sendmail.inc +++ b/program/steps/mail/sendmail.inc @@ -234,7 +234,7 @@ // sending aborted by plugin if ($data['abort'] && !$savedraft) { - $OUTPUT->show_message($data['message'] ? $data['message'] : 'sendingfailed'); + $OUTPUT->show_message($data['message'] ?: 'sendingfailed'); $OUTPUT->send('iframe'); } else { @@ -455,7 +455,7 @@ } else { $ctype = str_replace('image/pjpeg', 'image/jpeg', $attachment['mimetype']); // #1484914 - $file = $attachment['data'] ? $attachment['data'] : $attachment['path']; + $file = $attachment['data'] ?: $attachment['path']; $folding = (int) $RCMAIL->config->get('mime_param_folding'); $MAIL_MIME->addAttachment($file, @@ -673,7 +673,7 @@ array('msgid' => $message_id, 'uid' => $saved, 'folder' => $store_target)); // display success - $OUTPUT->show_message($plugin['message'] ? $plugin['message'] : 'messagesaved', 'confirmation'); + $OUTPUT->show_message($plugin['message'] ?: 'messagesaved', 'confirmation'); // update "_draft_saveid" and the "cmp_hash" to prevent "Unsaved changes" warning $COMPOSE['param']['draft_uid'] = $plugin['uid']; -- Gitblit v1.9.1