From 91624b8a2d8bad8a729e1f5da852829d664d27ab Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 10 Sep 2010 07:58:47 -0400
Subject: [PATCH] Added the configuration variable $conf['demo_mode'] in the config.inc.php file. It disables the newly introduced demo mode which limits certain actions in the interface part of ispconfig: the demo mode can be used to run the ispconfig interface part as online demo.
---
interface/web/client/reseller_edit.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index b58ba8f..44c65be 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -173,7 +173,7 @@
global $app, $conf;
// username changed
- if(isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
+ if($conf['demo_mode'] != true && isset($this->dataRecord['username']) && $this->dataRecord['username'] != '' && $this->oldDataRecord['username'] != $this->dataRecord['username']) {
$username = $app->db->quote($this->dataRecord["username"]);
$client_id = $this->id;
$sql = "UPDATE sys_user SET username = '$username' WHERE client_id = $client_id";
@@ -185,7 +185,7 @@
}
// password changed
- if(isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
+ if($conf['demo_mode'] != true && isset($this->dataRecord["password"]) && $this->dataRecord["password"] != '') {
$password = $app->db->quote($this->dataRecord["password"]);
$client_id = $this->id;
$sql = "UPDATE sys_user SET passwort = md5('$password') WHERE client_id = $client_id";
@@ -193,7 +193,7 @@
}
// language changed
- if(isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
+ if($conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
$language = $app->db->quote($this->dataRecord["language"]);
$client_id = $this->id;
$sql = "UPDATE sys_user SET language = '$language' WHERE client_id = $client_id";
--
Gitblit v1.9.1