self::$selectedTab = Session::get('network-tab', DI::pConfig()->get(local_user(), 'network.view', 'selected_tab', ''));
- self::$order = 'commented';
-
if (!empty($get['star'])) {
self::$selectedTab = 'star';
self::$star = true;
self::$order = $get['order'];
self::$star = false;
self::$mention = false;
- } elseif (in_array(self::$selectedTab, ['received', 'star', 'mention'])) {
+ } elseif (self::$selectedTab == 'received') {
self::$order = 'received';
- } elseif (in_array(self::$selectedTab, ['created'])) {
+ } elseif (self::$selectedTab == 'created') {
self::$order = 'created';
+ } else {
+ self::$order = 'commented';
}
self::$selectedTab = self::$selectedTab ?? self::$order;