]> git.mxchange.org Git - friendica.git/commitdiff
Timelines are now an object instead of an array
authorMichael <heluecht@pirati.ca>
Sat, 30 Sep 2023 18:51:35 +0000 (18:51 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 30 Sep 2023 18:51:35 +0000 (18:51 +0000)
src/Module/Settings/Display.php

index bbae7d599069e47fb4a97af9ab64685f78038dd7..4c8688ba2063a4a36dd972daec9b90fc8337ced3 100644 (file)
@@ -249,8 +249,8 @@ class Display extends BaseSettings
                $timelines = [];
                foreach ($this->getAvailableTimelines($uid) as $code => $timeline) {
                        $timelines[] = [
-                               'label'        => $timeline['label'],
-                               'description'  => $timeline['description'],
+                               'label'        => $timeline->label,
+                               'description'  => $timeline->description,
                                'enable'       => ["enable[$code]", '', in_array($code, $enabled_timelines)],
                                'bookmark'     => ["bookmark[$code]", '', in_array($code, $bookmarked_timelines)],
                        ];
@@ -330,7 +330,7 @@ class Display extends BaseSettings
                $timelines = [];
 
                foreach ($this->timeline->getNetworkFeeds('') as $channel) {
-                       $timelines[$channel->code] = ['label' => $channel->label, 'description' => $channel->description];
+                       $timelines[$channel->code] = $channel;
                }
 
                if ($only_network) {
@@ -338,11 +338,11 @@ class Display extends BaseSettings
                }
 
                foreach ($this->timeline->getChannelsForUser($uid) as $channel) {
-                       $timelines[$channel->code] = ['label' => $channel->label, 'description' => $channel->description];
+                       $timelines[$channel->code] = $channel;
                }
 
                foreach ($this->timeline->getCommunities(true) as $community) {
-                       $timelines[$community->code] = ['label' => $community->label, 'description' => $community->description];
+                       $timelines[$community->code] = $community;
                }
 
                return $timelines;