diff options
author | Simon Rettberg | 2014-08-07 19:20:39 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-08-07 19:20:39 +0200 |
commit | 5472fd01bdb5640f58579fc06b0777e4f52975d7 (patch) | |
tree | 325b21b71f7e74eb19404271f81c9f03cada13ee /index.php | |
parent | Merge branch 'i18n' of https://gitlab.c3sl.ufpr.br/cdn/slx-admin into i18n (diff) | |
download | slx-admin-5472fd01bdb5640f58579fc06b0777e4f52975d7.tar.gz slx-admin-5472fd01bdb5640f58579fc06b0777e4f52975d7.tar.xz slx-admin-5472fd01bdb5640f58579fc06b0777e4f52975d7.zip |
Some sanity checks; start making detection of available languages dynamic; put dictionary class in inc/; make redirection on language change work if browser doesn't send referer information
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -2,10 +2,6 @@ require_once 'config.php'; -require_once 'lang/i18n.php'; - -Dictionary::build(); - require_once('inc/user.inc.php'); /** @@ -119,10 +115,16 @@ Page::preprocess(); // Generate Main menu //$menu = new Menu; -if(User::getName() === false) Render::addTemplate('main-menu-login'); -else Render::addTemplate('main-menu-logout',array( - 'user' => User::getName() - )); +if (User::getName() === false) { + Render::addTemplate('main-menu-login', array( + 'url' => urlencode($_SERVER['REQUEST_URI']) + )); +} else { + Render::addTemplate('main-menu-logout', array( + 'url' => urlencode($_SERVER['REQUEST_URI']), + 'user' => User::getName() + )); +} Message::renderList(); |