X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FSettings%2FDisplay.php;h=aab8f864b1ac55aaa9d09faee93200afbd62ac5d;hb=3bae52074a644b0ade3808bed9fc1268e1baa4e3;hp=cb7a520df6604590b0e22ec92ab08d83349cf042;hpb=58abaf5c53a4c276d95dbb819f9937eee100386c;p=friendica.git diff --git a/src/Module/Settings/Display.php b/src/Module/Settings/Display.php index cb7a520df6..aab8f864b1 100644 --- a/src/Module/Settings/Display.php +++ b/src/Module/Settings/Display.php @@ -30,14 +30,13 @@ use Friendica\DI; use Friendica\Model\User; use Friendica\Module\BaseSettings; use Friendica\Network\HTTPException; -use Friendica\Util\Strings; /** * Module to update user settings */ class Display extends BaseSettings { - public static function post(array $parameters = []) + public function post() { if (!DI::app()->isLoggedIn()) { throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.')); @@ -47,9 +46,9 @@ class Display extends BaseSettings $user = User::getById(local_user()); - $theme = !empty($_POST['theme']) ? Strings::escapeTags(trim($_POST['theme'])) : $user['theme']; - $mobile_theme = !empty($_POST['mobile_theme']) ? Strings::escapeTags(trim($_POST['mobile_theme'])) : ''; - $enable_smile = !empty($_POST['enable_smile']) ? intval($_POST['enable_smile']) : 0; + $theme = !empty($_POST['theme']) ? trim($_POST['theme']) : $user['theme']; + $mobile_theme = !empty($_POST['mobile_theme']) ? trim($_POST['mobile_theme']) : ''; + $enable_smile = !empty($_POST['enable_smile']) ? intval($_POST['enable_smile']) : 0; $first_day_of_week = !empty($_POST['first_day_of_week']) ? intval($_POST['first_day_of_week']) : 0; $infinite_scroll = !empty($_POST['infinite_scroll']) ? intval($_POST['infinite_scroll']) : 0; $no_auto_update = !empty($_POST['no_auto_update']) ? intval($_POST['no_auto_update']) : 0; @@ -113,9 +112,9 @@ class Display extends BaseSettings DI::baseUrl()->redirect('settings/display'); } - public static function content(array $parameters = []) + public function content(): string { - parent::content($parameters); + parent::content(); if (!local_user()) { throw new HTTPException\ForbiddenException(DI::l10n()->t('Permission denied.'));