Fix compatibility with older PHP versions by not using empty(fn())

pull/5193/head
Aleksander Machniak 9 years ago
parent e03c006d0d
commit 800235f682

@ -175,10 +175,10 @@ class emoticons extends rcube_plugin
$dont_override = $rcube->config->get('dont_override', array());
if ($args['section'] == 'mailview' && !in_array('emoticons_display', $dont_override)) {
$args['prefs']['emoticons_display'] = !empty(rcube_utils::get_input_value('_emoticons_display', rcube_utils::INPUT_POST));
$args['prefs']['emoticons_display'] = rcube_utils::get_input_value('_emoticons_display', rcube_utils::INPUT_POST) ? true : false;
}
else if ($args['section'] == 'compose' && !in_array('emoticons_compose', $dont_override)) {
$args['prefs']['emoticons_compose'] = !empty(rcube_utils::get_input_value('_emoticons_compose', rcube_utils::INPUT_POST));
$args['prefs']['emoticons_compose'] = rcube_utils::get_input_value('_emoticons_compose', rcube_utils::INPUT_POST) ? true : false;
}
return $args;

@ -159,7 +159,7 @@ class newmail_notifier extends rcube_plugin
foreach (array('basic', 'desktop', 'sound') as $type) {
$key = 'newmail_notifier_' . $type;
if (!in_array($key, $dont_override)) {
$args['prefs'][$key] = !empty(rcube_utils::get_input_value('_' . $key, rcube_utils::INPUT_POST));
$args['prefs'][$key] = rcube_utils::get_input_value('_' . $key, rcube_utils::INPUT_POST) ? true : false;
}
}

Loading…
Cancel
Save