From 90edcde0946a5c89187111f49d03737ae33a965d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 28 Feb 2013 03:45:36 -0500
Subject: [PATCH] Disable mysql error messages in demo mode.
---
interface/lib/classes/db_mysql.inc.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 085eb54..528099f 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -108,10 +108,10 @@
if($this->errorNumber) {
$error_msg = $this->errorLocation .' '. $this->errorMessage;
// This right here will allow us to use the samefile for server & interface
- if($this->show_error_messages) {
- echo $error_msg;
+ if($this->show_error_messages && $conf['demo_mode'] != true) {
+ echo $error_msg;
} else if(is_object($app) && method_exists($app, 'log')) {
- $app->log($error_msg, LOGLEVEL_WARN);
+ $app->log($error_msg, LOGLEVEL_WARN);
}
}
}
--
Gitblit v1.9.1