summaryrefslogtreecommitdiffstats
path: root/modules-available/news/page.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2022-05-04 15:01:59 +0200
committerSimon Rettberg2022-05-04 15:01:59 +0200
commit1426f2722871cb1c08084ee43f6edaeb7028578c (patch)
tree4ac9d657c6839d53393400673bc53a16f3d8105d /modules-available/news/page.inc.php
parent[locations/news] Add per-location news/help/loginscreentext (diff)
downloadslx-admin-1426f2722871cb1c08084ee43f6edaeb7028578c.tar.gz
slx-admin-1426f2722871cb1c08084ee43f6edaeb7028578c.tar.xz
slx-admin-1426f2722871cb1c08084ee43f6edaeb7028578c.zip
[news] List locations with overrides when editing global
Diffstat (limited to 'modules-available/news/page.inc.php')
-rw-r--r--modules-available/news/page.inc.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules-available/news/page.inc.php b/modules-available/news/page.inc.php
index ceffd028..3b58e9a2 100644
--- a/modules-available/news/page.inc.php
+++ b/modules-available/news/page.inc.php
@@ -180,6 +180,11 @@ class Page_News extends Page
$data['locationid'] = $this->locationId;
if ($this->locationId > 0) {
$data['location_name'] = Location::getName($this->locationId);
+ } else {
+ // Superadmin can see all overridden locations
+ $data['overridden'] = Database::queryAll("SELECT l.locationid, l.locationname FROM vmchooser_pages
+ INNER JOIN location l USING (locationid)
+ WHERE expires > UNIX_TIMESTAMP() ORDER BY locationname ASC");
}
Render::addTemplate('page-news', $data);
}