summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-10-09 16:01:11 +0200
committerSimon Rettberg2014-10-09 16:01:11 +0200
commite1dc0d3c99217504de2ac8467156274786efc0bd (patch)
tree130d7fed1fff8aaaffe5942cf2a3d6bb1dad03c8 /index.php
parentMinor fixes and improvements (diff)
downloadslx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.tar.gz
slx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.tar.xz
slx-admin-e1dc0d3c99217504de2ac8467156274786efc0bd.zip
Big load of changes
- Added callback functionality for taskmanager tasks. You can launch a task and define a callback function to be run when the task finished. This requires activating the cronjob - Added cron functionality: Add cronjob that calls the cron api every 5 minutes to use it. (See cron.inc.php) - Added eventlog - Added missing translations - Merged main-menu-login and main-menu-logout
Diffstat (limited to 'index.php')
-rw-r--r--index.php22
1 files changed, 7 insertions, 15 deletions
diff --git a/index.php b/index.php
index 919c4620..2f507e2c 100644
--- a/index.php
+++ b/index.php
@@ -114,21 +114,13 @@ if (AJAX) {
Page::preprocess();
// Generate Main menu
-//$menu = new Menu;// TODO: Merge both templates again - having 99% copy&paste sucks...
-if (User::getName() === false) {
- Render::addTemplate('main-menu-login', array(
- 'url' => urlencode($_SERVER['REQUEST_URI']),
- 'langs' => Dictionary::getLanguages(true),
- 'dbupdate' => Database::needSchemaUpdate()
- ));
-} else {
- Render::addTemplate('main-menu-logout', array(
- 'url' => urlencode($_SERVER['REQUEST_URI']),
- 'langs' => Dictionary::getLanguages(true),
- 'dbupdate' => Database::needSchemaUpdate(),
- 'user' => User::getName()
- ));
-}
+Render::addTemplate('main-menu', array(
+ 'url' => urlencode($_SERVER['REQUEST_URI']),
+ 'langs' => Dictionary::getLanguages(true),
+ 'dbupdate' => Database::needSchemaUpdate(),
+ 'user' => User::getName(),
+ 'warning' => User::getName() && User::getLastSeenEvent() < Property::getLastWarningId()
+));
Message::renderList();