From e08297876e554e2a1b48bca50b44c26e7d755d7e Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 03 Aug 2008 08:46:23 -0400
Subject: [PATCH] Network Configuration through the ISPConfig interface for debian and compatible linux distributions.
---
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