From dc19c4eb8c75b5ec02d2d5337b7fb63c8b61688e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Sun, 16 Feb 2014 06:27:35 -0500
Subject: [PATCH] Fixed: FS#3093 - PHPMyAdmin URL field does not accept uri symbols '?', '&' and '='

---
 interface/lib/classes/tform.inc.php |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index 2f5c08d..5fc0627 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -131,7 +131,7 @@
 		$this->module = $module;
 		$wb = array();
 
-		include_once ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng';
+		include ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng';
 
 		if(is_array($wb)) $wb_global = $wb;
 
@@ -845,6 +845,15 @@
 					}
 				}
 				break;
+			case 'ISASCII':
+				if(preg_match("/[^\x20-\x7F]/", $field_value)) {
+					$errmsg = $validator['errmsg'];
+					if(isset($this->wordbook[$errmsg])) {
+						$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
+					} else {
+						$this->errorMessage .= $errmsg."<br />\r\n";
+					}
+				}
 			case 'ISEMAIL':
 				if(function_exists('filter_var')) {
 					if(filter_var($field_value, FILTER_VALIDATE_EMAIL) === false) {
@@ -1293,7 +1302,7 @@
 		$perm = $app->db->quote($perm);
 		$table = $app->db->quote($table);
 		
-		if($_SESSION["s"]["user"]["typ"] == 'admin') {
+		if($_SESSION["s"]["user"]["typ"] == 'admin' || $_SESSION['s']['user']['mailuser_id'] > 0) {
 			return '1';
 		} else {
 			if ($table != ''){

--
Gitblit v1.9.1