From 0344b168276f80189e2254c75a762aff5b517b6b Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 22 May 2016 06:32:57 -0400
Subject: [PATCH] Fix priority icon(s) position

---
 program/steps/settings/func.inc |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 061ba12..087b70b 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -500,11 +500,11 @@
 
                 $field_id = 'rcmfd_mail_pagesize';
                 $input    = new html_inputfield(array('name' => '_mail_pagesize', 'id' => $field_id, 'size' => 5));
-                $size     = intval($config['mail_pagesize'] ? $config['mail_pagesize'] : $config['pagesize']);
+                $size     = intval($config['mail_pagesize'] ?: $config['pagesize']);
 
                 $blocks['main']['options']['pagesize'] = array(
                     'title'   => html::label($field_id, rcube::Q($RCMAIL->gettext('pagesize'))),
-                    'content' => $input->show($size ? $size : 50),
+                    'content' => $input->show($size ?: 50),
                 );
             }
 
@@ -749,7 +749,7 @@
                 );
             }
 
-            if (!isset($no_override['dsn_default'])) {
+            if (!isset($no_override['dsn_default']) && $RCMAIL->config->get('smtp_server')) {
                 if (!$current) {
                     continue 2;
                 }
@@ -1043,11 +1043,11 @@
 
                 $field_id = 'rcmfd_addressbook_pagesize';
                 $input    = new html_inputfield(array('name' => '_addressbook_pagesize', 'id' => $field_id, 'size' => 5));
-                $size     = intval($config['addressbook_pagesize'] ? $config['addressbook_pagesize'] : $config['pagesize']);
+                $size     = intval($config['addressbook_pagesize'] ?: $config['pagesize']);
 
                 $blocks['main']['options']['pagesize'] = array(
                     'title'   => html::label($field_id, rcube::Q($RCMAIL->gettext('pagesize'))),
-                    'content' => $input->show($size ? $size : 50),
+                    'content' => $input->show($size ?: 50),
                 );
             }
 
@@ -1293,9 +1293,9 @@
 
         // allow plugins to add a header to each section
         $data = $RCMAIL->plugins->exec_hook('preferences_section_header',
-                                            array('section' => $sect['id'], 'header' => '', 'current' => $current));
+            array('section' => $sect['id'], 'header' => '', 'current' => $current));
 
-        if(!empty($data['header'])) {
+        if (!empty($data['header'])) {
             $sections[$idx]['header'] = $data['header'];
         }
     }
@@ -1404,8 +1404,8 @@
         $button = $OUTPUT->button($action);
         $attr   = $attrib;
 
-        $cmd = $action['action'] ? $action['action'] : $action['command'];
-        $id  = $action['id'] ? $action['id'] : $cmd;
+        $cmd = $action['action'] ?: $action['command'];
+        $id  = $action['id'] ?: $cmd;
 
         if (!empty($id)) {
             $attr['id'] = preg_replace('/[^a-z0-9]/i', '', $attrib['idprefix'] . $id);

--
Gitblit v1.9.1