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/compose.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 86e33fc..934b862 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1826,8 +1826,8 @@
         $form_start .= $hiddenfields->show();
     }
 
-    $form_end = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : '';
-    $form_name = !empty($attrib['form']) ? $attrib['form'] : 'form';
+    $form_end  = ($MESSAGE_FORM && !strlen($attrib['form'])) ? '</form>' : '';
+    $form_name = $attrib['form'] ?: 'form';
 
     if (!$MESSAGE_FORM)
         $RCMAIL->output->add_gui_object('messageform', $form_name);
@@ -1864,7 +1864,7 @@
             rcube_utils::html_identifier($id,true),
             $class_name,
             $source['id'],
-            $js_id, (!empty($source['name']) ? $source['name'] : $id));
+            $js_id, ($source['name'] ?: $id));
     }
 
     $OUTPUT->add_gui_object('addressbookslist', $attrib['id']);

--
Gitblit v1.9.1