- $theme = !empty($request['theme']) ? trim($request['theme']) : $user['theme'];
- $mobile_theme = !empty($request['mobile_theme']) ? trim($request['mobile_theme']) : '';
- $enable_smile = !empty($request['enable_smile']) ? intval($request['enable_smile']) : 0;
- $enable = !empty($request['enable']) ? $request['enable'] : [];
- $bookmark = !empty($request['bookmark']) ? $request['bookmark'] : [];
- $channel_languages = !empty($request['channel_languages']) ? $request['channel_languages'] : [];
- $first_day_of_week = !empty($request['first_day_of_week']) ? intval($request['first_day_of_week']) : 0;
- $calendar_default_view = !empty($request['calendar_default_view']) ? trim($request['calendar_default_view']) : 'month';
- $infinite_scroll = !empty($request['infinite_scroll']) ? intval($request['infinite_scroll']) : 0;
- $enable_smart_threading = !empty($request['enable_smart_threading']) ? intval($request['enable_smart_threading']) : 0;
- $enable_dislike = !empty($request['enable_dislike']) ? intval($request['enable_dislike']) : 0;
- $display_resharer = !empty($request['display_resharer']) ? intval($request['display_resharer']) : 0;
- $stay_local = !empty($request['stay_local']) ? intval($request['stay_local']) : 0;
- $preview_mode = !empty($request['preview_mode']) ? intval($request['preview_mode']) : 0;
- $browser_update = !empty($request['browser_update']) ? intval($request['browser_update']) : 0;
+ $theme = trim($request['theme']);
+ $mobile_theme = trim($request['mobile_theme']);
+ $enable_smile = (bool)$request['enable_smile'];
+ $enable = (array)$request['enable'];
+ $bookmark = (array)$request['bookmark'];
+ $channel_languages = (array)$request['channel_languages'];
+ $first_day_of_week = (bool)$request['first_day_of_week'];
+ $calendar_default_view = trim($request['calendar_default_view']);
+ $infinite_scroll = (bool)$request['infinite_scroll'];
+ $enable_smart_threading = (bool)$request['enable_smart_threading'];
+ $enable_dislike = (bool)$request['enable_dislike'];
+ $display_resharer = (bool)$request['display_resharer'];
+ $stay_local = (bool)$request['stay_local'];
+ $show_page_drop = (bool)$request['show_page_drop'];
+ $preview_mode = (bool)$request['preview_mode'];
+ $browser_update = (bool)$request['browser_update'];