diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-05-11 07:19:42 +0000 |
|---|---|---|
| committer | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-05-11 07:19:42 +0000 |
| commit | 20240b2aacb15ab3264afbfbbc9dae952db4bb63 (patch) | |
| tree | 597cae73c5ae7ab9eda6d066d45430c3f17a4560 /app/controllers/news.php | |
| parent | c054faf90288a75fc3680480434ba93b7f5b287b (diff) | |
convert old core plugins to new model, re #814
Merge request studip/studip!440
Diffstat (limited to 'app/controllers/news.php')
| -rw-r--r-- | app/controllers/news.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/news.php b/app/controllers/news.php index 4244b88..acb4399 100644 --- a/app/controllers/news.php +++ b/app/controllers/news.php @@ -165,6 +165,20 @@ class NewsController extends StudipController $this->render_nothing(); } + public function visit_all_action() + { + $global_news = StudipNews::GetNewsByRange('studip', true); + + if ($GLOBALS['user']->id && $GLOBALS['user']->id !== 'nobody') { + foreach ($global_news as $news) { + object_add_view($news['news_id']); + object_set_visit($news['news_id'], 'news'); + } + } + + $this->render_nothing(); + } + /** * Builds news dialog for editing / adding news * |
