Rev 1005 | Rev 1033 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1005 | Rev 1012 | ||
---|---|---|---|
Line 1205... | Line 1205... | ||
1205 | } |
1205 | } |
1206 | 1206 | ||
1207 | public function getNotifications($user=null): array { |
1207 | public function getNotifications($user=null): array { |
1208 | // Interface 1.3.6.1.4.1.37476.2.5.2.3.8 |
1208 | // Interface 1.3.6.1.4.1.37476.2.5.2.3.8 |
1209 | $notifications = array(); |
1209 | $notifications = array(); |
1210 | $res = OIDplus::db()->query("select id, title from ###objects order by id"); |
1210 | $res = OIDplus::db()->query("select id, title from ###objects order by ".OIDplus::db()->natOrder('id')); |
1211 | if ($res->any()) { |
1211 | if ($res->any()) { |
1212 | $is_admin_logged_in = OIDplus::authUtils()->isAdminLoggedIn(); // run just once, for performance |
1212 | $is_admin_logged_in = OIDplus::authUtils()->isAdminLoggedIn(); // run just once, for performance |
1213 | while ($row = $res->fetch_array()) { |
1213 | while ($row = $res->fetch_array()) { |
1214 | if (empty($row['title'])) { |
1214 | if (empty($row['title'])) { |
1215 | if ($user === 'admin') { |
1215 | if ($user === 'admin') { |