Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the news. We want the film now! #5544

Merged
merged 1 commit into from
Jul 15, 2016
Merged

Disable the news. We want the film now! #5544

merged 1 commit into from
Jul 15, 2016

Conversation

SvanteRichter
Copy link
Contributor

See

/**
* News. Film at 11.
*
* @param Request $request
*
* @return \Bolt\Response\BoltResponse
*/
public function dashboardNews(Request $request)
{
$news = $this->getNews($request->getHost());
// One 'alert' and one 'info' max. Regular info-items can be disabled,
// but Alerts can't.
$context = [
'alert' => empty($news['alert']) ? null : $news['alert'],
'information' => empty($news['information']) ? null : $news['information'],
'error' => empty($news['error']) ? null : $news['error'],
'disable' => $this->getOption('general/backend/news/disable'),
];
$response = $this->render('@bolt/components/panel-news.twig', ['context' => $context]);
$response->setSharedMaxAge(3600)->setPublic();
return $response;
}
for more info

Fixes issue reported in slack where disabling the news via config.yml does not work anymore.

@GwendolenLynch
Copy link
Contributor

WFM 👍

@peterboorsma
Copy link
Contributor

Ow. Sorry.

@GwendolenLynch
Copy link
Contributor

Haha … all good … it was just a competition between @SahAssar and I to see who'd get to the answer first!

…but he's on a train right now with bad Internet, so I beat him.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants