From a5714c39c76695af5b2220e93a4ac3121a9d83a1 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Tue, 17 Nov 2015 12:59:40 -0500
Subject: [PATCH] Merge branch 'stable-3.0.5'

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

diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index bbeb822..d9afd57 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -129,7 +129,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();
@@ -249,7 +249,7 @@
 		$modules = $conf['interface_modules_enabled'];
 		if(isset($this->dataRecord["limit_client"]) && $this->dataRecord["limit_client"] > 0) $modules .= ',client';
 		$startmodule = (stristr($modules, 'dashboard'))?'dashboard':'client';
-		$usertheme = $this->dataRecord["usertheme"];
+		$usertheme = (isset($this->dataRecord["usertheme"]) && $this->dataRecord["usertheme"] != ''? $this->dataRecord["usertheme"] : 'default');
 		$type = 'user';
 		$active = 1;
 		$language = $this->dataRecord["language"];

--
Gitblit v1.9.1