From e6bb4e823a6fb353fb802b6a7bfb8d7ed1cc424a Mon Sep 17 00:00:00 2001 From: quentusrex <quentusrex@ispconfig3> Date: Thu, 06 Nov 2008 12:35:24 -0500 Subject: [PATCH] Oops. Don't ever disable auth. Bug FS#267 - mail filter not hidden for client --- interface/web/admin/language_list.php | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/interface/web/admin/language_list.php b/interface/web/admin/language_list.php index 17eab0e..cbfa619 100644 --- a/interface/web/admin/language_list.php +++ b/interface/web/admin/language_list.php @@ -30,11 +30,8 @@ require_once('../../lib/config.inc.php'); require_once('../../lib/app.inc.php'); -// Checking permissions for the module -if(!stristr($_SESSION['s']['user']['modules'],'admin')) { - header('Location: ../index.php'); - exit; -} +//* Check permissions for module +$app->auth->check_module_permissions('admin'); //* This is only allowed for administrators if(!$app->auth->is_admin()) die('only allowed for administrators.'); @@ -44,6 +41,8 @@ $app->tpl->newTemplate('form.tpl.htm'); $app->tpl->setInclude('content_tpl', 'templates/language_list.htm'); +$language_files_list = array(); +$bgcolor = '#FFFFFF'; //* reading languages $language_option = ''; @@ -55,6 +54,16 @@ if($tmp_lng !='') { $selected = ($tmp_lng == $selected_language)?'SELECTED':''; $language_option .= "<option value='$tmp_lng' $selected>$tmp_lng</option>"; + + //$bgcolor = ($bgcolor == '#FFFFFF') ? '#EEEEEE' : '#FFFFFF'; + if($file == $selected_language.'.lng') { + $language_files_list[] = array( 'module' => 'global', + 'lang_file' => $file, + 'bgcolor' => $bgcolor, + 'lang' => $selected_language); + } + + } } } @@ -62,8 +71,6 @@ // $app->tpl->setLoop('records', $language_list); //* list all language files of the selected language -$bgcolor = '#FFFFFF'; -$language_files_list = array(); $handle = @opendir(ISPC_WEB_PATH); while ($file = @readdir ($handle)) { if ($file != '.' && $file != '..') { -- Gitblit v1.9.1