mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
Replace x() by !empty() or defaults()
- Remove extraneous parentheses around !empty()
This commit is contained in:
parent
074493a29e
commit
d836593a3b
42 changed files with 80 additions and 80 deletions
|
@ -105,7 +105,7 @@ function ljpost_settings(&$a,&$s) {
|
|||
|
||||
function ljpost_settings_post(&$a,&$b) {
|
||||
|
||||
if(x($_POST,'ljpost-submit')) {
|
||||
if(!empty($_POST['ljpost-submit'])) {
|
||||
|
||||
PConfig::set(local_user(),'ljpost','post',intval($_POST['ljpost']));
|
||||
PConfig::set(local_user(),'ljpost','post_by_default',intval($_POST['lj_bydefault']));
|
||||
|
@ -131,7 +131,7 @@ function ljpost_post_local(&$a,&$b) {
|
|||
|
||||
$lj_post = intval(PConfig::get(local_user(),'ljpost','post'));
|
||||
|
||||
$lj_enable = (($lj_post && x($_REQUEST,'ljpost_enable')) ? intval($_REQUEST['ljpost_enable']) : 0);
|
||||
$lj_enable = (($lj_post && !empty($_REQUEST['ljpost_enable'])) ? intval($_REQUEST['ljpost_enable']) : 0);
|
||||
|
||||
if($b['api_source'] && intval(PConfig::get(local_user(),'ljpost','post_by_default')))
|
||||
$lj_enable = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue