aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/news.php
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-05-11 07:19:42 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-05-11 07:19:42 +0000
commit20240b2aacb15ab3264afbfbbc9dae952db4bb63 (patch)
tree597cae73c5ae7ab9eda6d066d45430c3f17a4560 /app/controllers/news.php
parentc054faf90288a75fc3680480434ba93b7f5b287b (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.php14
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
*