$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval(local_user())
);
- if(! count($r)) {
+ if(! dbm::is_result($r)) {
q("INSERT INTO `mailacct` (`uid`) VALUES (%d)",
intval(local_user())
);
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval(local_user())
);
- if(count($r)) {
+ if(dbm::is_result($r)) {
$eacct = $r[0];
require_once('include/email.php');
$mb = construct_mailbox_name($eacct);
$infinite_scroll = x($_POST, 'infinite_scroll') ? intval($_POST['infinite_scroll']) : 0;
$no_auto_update = x($_POST, 'no_auto_update') ? intval($_POST['no_auto_update']) : 0;
$bandwidth_saver = x($_POST, 'bandwidth_saver') ? intval($_POST['bandwidth_saver']) : 0;
+ $nowarn_insecure = x($_POST, 'nowarn_insecure') ? intval($_POST['nowarn_insecure']) : 0;
$browser_update = x($_POST, 'browser_update') ? intval($_POST['browser_update']) : 0;
if ($browser_update != -1) {
$browser_update = $browser_update * 1000;
set_pconfig(local_user(),'system','mobile_theme',$mobile_theme);
}
+ set_pconfig(local_user(), 'system', 'nowarn_insecure' , $nowarn_insecure);
set_pconfig(local_user(), 'system', 'update_interval' , $browser_update);
set_pconfig(local_user(), 'system', 'itemspage_network' , $itemspage_network);
set_pconfig(local_user(), 'system', 'itemspage_mobile_network', $itemspage_mobile_network);
dbesc($a->argv[3]),
local_user());
- if (!count($r)){
+ if (!dbm::is_result($r)){
notice(t("You can't edit this application."));
return;
}
$settings_addons = "";
$r = q("SELECT * FROM `hook` WHERE `hook` = 'plugin_settings' ");
- if(! count($r))
+ if(! dbm::is_result($r))
$settings_addons = t('No Plugin settings configured');
call_hooks('plugin_settings', $settings_addons);
$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 = ((dbm::is_result($r)) ? $r[0]['server'] : '');
+ $mail_port = ((dbm::is_result($r) && intval($r[0]['port'])) ? intval($r[0]['port']) : '');
+ $mail_ssl = ((dbm::is_result($r)) ? $r[0]['ssltype'] : '');
+ $mail_user = ((dbm::is_result($r)) ? $r[0]['user'] : '');
+ $mail_replyto = ((dbm::is_result($r)) ? $r[0]['reply_to'] : '');
+ $mail_pubmail = ((dbm::is_result($r)) ? $r[0]['pubmail'] : 0);
+ $mail_action = ((dbm::is_result($r)) ? $r[0]['action'] : 0);
+ $mail_movetofolder = ((dbm::is_result($r)) ? $r[0]['movetofolder'] : '');
+ $mail_chk = ((dbm::is_result($r)) ? $r[0]['last_check'] : '0000-00-00 00:00:00');
$tpl = get_markup_template("settings_connectors.tpl");
$theme_selected = (!x($_SESSION,'theme')? $default_theme : $_SESSION['theme']);
$mobile_theme_selected = (!x($_SESSION,'mobile-theme')? $default_mobile_theme : $_SESSION['mobile-theme']);
+ $nowarn_insecure = intval(get_pconfig(local_user(), 'system', 'nowarn_insecure'));
+
$browser_update = intval(get_pconfig(local_user(), 'system','update_interval'));
if (intval($browser_update) != -1)
$browser_update = (($browser_update == 0) ? 40 : $browser_update / 1000); // default if not set: 40 seconds
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes, true),
'$mobile_theme' => array('mobile_theme', t('Mobile Theme:'), $mobile_theme_selected, '', $mobile_themes, false),
+ '$nowarn_insecure' => array('nowarn_insecure', t('Suppress warning of insecure networks'), $nowarn_insecure, t("Should the system suppress the warning that the current group contains members of networks that can't receive non public postings.")),
'$ajaxint' => array('browser_update', t("Update browser every xx seconds"), $browser_update, t('Minimum of 10 seconds. Enter -1 to disable it.')),
'$itemspage_network' => array('itemspage_network', t("Number of items to display per page:"), $itemspage_network, t('Maximum of 100 items')),
'$itemspage_mobile_network' => array('itemspage_mobile_network', t("Number of items to display per page when viewed from mobile device:"), $itemspage_mobile_network, t('Maximum of 100 items')),