mirror of
https://github.com/humhub/humhub.git
synced 2025-03-14 20:19:47 +01:00
Exclude content highlighting on console request (#7000)
This commit is contained in:
parent
3e1245ebed
commit
d216e221ae
@ -29,10 +29,12 @@ class ContentHighlightAsset extends AssetBundle
|
||||
*/
|
||||
public static function register($view)
|
||||
{
|
||||
$highlight = Yii::$app->session->get('contentHighlight');
|
||||
if ($highlight !== null && $highlight !== '') {
|
||||
Yii::$app->session->remove('contentHighlight');
|
||||
$view->registerJsConfig('content.highlight', ['keyword' => $highlight]);
|
||||
if (!Yii::$app->request->isConsoleRequest) {
|
||||
$highlight = Yii::$app->session->get('contentHighlight');
|
||||
if ($highlight !== null && $highlight !== '') {
|
||||
Yii::$app->session->remove('contentHighlight');
|
||||
$view->registerJsConfig('content.highlight', ['keyword' => $highlight]);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::register($view);
|
||||
|
Loading…
x
Reference in New Issue
Block a user