Timelines are now an object instead of an array
This commit is contained in:
parent
e7d65f2d12
commit
afb6913a2f
1 changed files with 5 additions and 5 deletions
|
@ -249,8 +249,8 @@ class Display extends BaseSettings
|
||||||
$timelines = [];
|
$timelines = [];
|
||||||
foreach ($this->getAvailableTimelines($uid) as $code => $timeline) {
|
foreach ($this->getAvailableTimelines($uid) as $code => $timeline) {
|
||||||
$timelines[] = [
|
$timelines[] = [
|
||||||
'label' => $timeline['label'],
|
'label' => $timeline->label,
|
||||||
'description' => $timeline['description'],
|
'description' => $timeline->description,
|
||||||
'enable' => ["enable[$code]", '', in_array($code, $enabled_timelines)],
|
'enable' => ["enable[$code]", '', in_array($code, $enabled_timelines)],
|
||||||
'bookmark' => ["bookmark[$code]", '', in_array($code, $bookmarked_timelines)],
|
'bookmark' => ["bookmark[$code]", '', in_array($code, $bookmarked_timelines)],
|
||||||
];
|
];
|
||||||
|
@ -330,7 +330,7 @@ class Display extends BaseSettings
|
||||||
$timelines = [];
|
$timelines = [];
|
||||||
|
|
||||||
foreach ($this->timeline->getNetworkFeeds('') as $channel) {
|
foreach ($this->timeline->getNetworkFeeds('') as $channel) {
|
||||||
$timelines[$channel->code] = ['label' => $channel->label, 'description' => $channel->description];
|
$timelines[$channel->code] = $channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($only_network) {
|
if ($only_network) {
|
||||||
|
@ -338,11 +338,11 @@ class Display extends BaseSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->timeline->getChannelsForUser($uid) as $channel) {
|
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) {
|
foreach ($this->timeline->getCommunities(true) as $community) {
|
||||||
$timelines[$community->code] = ['label' => $community->label, 'description' => $community->description];
|
$timelines[$community->code] = $community;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $timelines;
|
return $timelines;
|
||||||
|
|
Loading…
Reference in a new issue