From 620df024f3d8960a89eb4ed71d3ea61e2b9aa3db Mon Sep 17 00:00:00 2001
From: quentusrex <quentusrex@ispconfig3>
Date: Thu, 30 Oct 2008 13:59:40 -0400
Subject: [PATCH] Now a client can view e-mail filters created by admin, but the client can't edit them. The client can submit a change, but it isn't input in the database, nor is the client told that the changes aren't made.
---
interface/web/admin/language_edit.php | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php
index 6329339..6edfb0d 100644
--- a/interface/web/admin/language_edit.php
+++ b/interface/web/admin/language_edit.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.');
@@ -65,13 +62,21 @@
$msg = 'File saved.';
}
$file_content .= "?>\n";
- file_put_contents(ISPC_WEB_PATH."/$module/lib/lang/$lang_file" ,$file_content);
+ if($module == 'global') {
+ file_put_contents(ISPC_LIB_PATH."/lang/$lang_file" ,$file_content);
+ } else {
+ file_put_contents(ISPC_WEB_PATH."/$module/lib/lang/$lang_file" ,$file_content);
+ }
}
$app->tpl->setVar(array('module' => $module,'lang_file' => $lang_file, 'lang' => $lang, 'msg' => $msg));
-include(ISPC_WEB_PATH."/$module/lib/lang/$lang_file");
+if($module == 'global') {
+ include(ISPC_LIB_PATH."/lang/$lang_file");
+} else {
+ include(ISPC_WEB_PATH."/$module/lib/lang/$lang_file");
+}
$keyword_list = array();
if(isset($wb) && is_array($wb)) {
--
Gitblit v1.9.1