From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 22 Apr 2016 05:26:17 -0400
Subject: [PATCH] Added PHP 7 check in installer and updater.

---
 interface/web/client/client_edit.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 1207c00..2bb169c 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -125,7 +125,7 @@
 
 		global $app;
 
-		$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a' ORDER BY template_name ASC";
+		$sql = "SELECT template_id,template_name FROM client_template WHERE template_type = 'a' and ".$app->tform->getAuthSQL('r')." ORDER BY template_name ASC";
 		$tpls = $app->db->queryAllRecords($sql);
 		$option = '';
 		$tpl = array();
@@ -352,8 +352,8 @@
 					$subject = str_replace('{password}', $this->dataRecord['password'], $subject);
 					break;
 				case 'gender':
-					$message = str_replace('{salutation}', $wb['gender_'.$val.'_txt'], $message);
-					$subject = str_replace('{salutation}', $wb['gender_'.$val.'_txt'], $subject);
+					$message = str_replace('{salutation}', $app->tform->lng('gender_'.$val.'_txt'), $message);
+					$subject = str_replace('{salutation}', $app->tform->lng('gender_'.$val.'_txt'), $subject);
 					break;
 				default:
 					$message = str_replace('{'.$key.'}', $val, $message);
@@ -364,7 +364,7 @@
 			//* Get sender address
 			if($app->auth->is_admin()) {
 				$app->uses('getconf');
-				$system_config = $app->getconf->get_global_config();
+				$system_config = $app->getconf->get_global_config('mail');
 				$from = $system_config['admin_mail'];
 			} else {
 				$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);

--
Gitblit v1.9.1