some more notices and some code beautification

This commit is contained in:
Michael 2018-08-08 06:24:47 +00:00
parent cd2d98f39e
commit 7a29893ecb
6 changed files with 105 additions and 107 deletions

View file

@ -101,7 +101,7 @@ function nsfw_addon_settings_post(&$a, &$b)
return;
}
if ($_POST['nsfw-submit']) {
if (!empty($_POST['nsfw-submit'])) {
PConfig::set(local_user(), 'nsfw', 'words', trim($_POST['nsfw-words']));
$enable = (x($_POST, 'nsfw-enable') ? intval($_POST['nsfw-enable']) : 0);
$disable = 1 - $enable;