Continued rewriting:

- use dba::is_result() everywhere (where I found the old, bad way)
- converted some spaces -> tabs for code
- converted some CRLF -> LF as mixures of both is not good

Signed-off-by: Roland Haeder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-05-01 14:24:44 +02:00
commit 3e701b90ac
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
93 changed files with 451 additions and 450 deletions

View file

@ -254,7 +254,7 @@ function settings_post(&$a) {
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval(local_user())
);
if(count($r)) {
if(dba::is_result($r)) {
$eacct = $r[0];
require_once('include/email.php');
$mb = construct_mailbox_name($eacct);
@ -842,15 +842,15 @@ function settings_content(&$a) {
$r = null;
}
$mail_server = ((count($r)) ? $r[0]['server'] : '');
$mail_port = ((count($r) && intval($r[0]['port'])) ? intval($r[0]['port']) : '');
$mail_ssl = ((count($r)) ? $r[0]['ssltype'] : '');
$mail_user = ((count($r)) ? $r[0]['user'] : '');
$mail_replyto = ((count($r)) ? $r[0]['reply_to'] : '');
$mail_pubmail = ((count($r)) ? $r[0]['pubmail'] : 0);
$mail_action = ((count($r)) ? $r[0]['action'] : 0);
$mail_movetofolder = ((count($r)) ? $r[0]['movetofolder'] : '');
$mail_chk = ((count($r)) ? $r[0]['last_check'] : '0000-00-00 00:00:00');
$mail_server = ((dba::is_result($r)) ? $r[0]['server'] : '');
$mail_port = ((dba::is_result($r) && intval($r[0]['port'])) ? intval($r[0]['port']) : '');
$mail_ssl = ((dba::is_result($r)) ? $r[0]['ssltype'] : '');
$mail_user = ((dba::is_result($r)) ? $r[0]['user'] : '');
$mail_replyto = ((dba::is_result($r)) ? $r[0]['reply_to'] : '');
$mail_pubmail = ((dba::is_result($r)) ? $r[0]['pubmail'] : 0);
$mail_action = ((dba::is_result($r)) ? $r[0]['action'] : 0);
$mail_movetofolder = ((dba::is_result($r)) ? $r[0]['movetofolder'] : '');
$mail_chk = ((dba::is_result($r)) ? $r[0]['last_check'] : '0000-00-00 00:00:00');
$tpl = get_markup_template("settings_connectors.tpl");