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.

---
 server/plugins-available/mysql_clientdb_plugin.inc.php |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/server/plugins-available/mysql_clientdb_plugin.inc.php b/server/plugins-available/mysql_clientdb_plugin.inc.php
index e9c3400..24e4ba2 100644
--- a/server/plugins-available/mysql_clientdb_plugin.inc.php
+++ b/server/plugins-available/mysql_clientdb_plugin.inc.php
@@ -69,9 +69,16 @@
 				$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);
 				return;
 			}
-		
+
+			// Charset for the new table
+			if($data["new"]["database_charset"] != '') {
+        $query_charset_table = ' DEFAULT CHARACTER SET '.$data["new"]["database_charset"];
+			} else {
+        $query_charset_table = '';
+			}
+
 			//* Create the new database
-			if (mysql_query('CREATE DATABASE '.mysql_real_escape_string($data["new"]["database_name"]),$link)) {
+			if (mysql_query('CREATE DATABASE '.mysql_real_escape_string($data["new"]["database_name"]).$query_charset_table,$link)) {
 				$app->log('Created MySQL database: '.$data["new"]["database_name"],LOGLEVEL_DEBUG);
 			} else {
 				$app->log('Unable to connect to the database'.mysql_error($link),LOGLEVEL_ERROR);

--
Gitblit v1.9.1