From 0cd87e682012f224e2b74531190bb983fdcbb430 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Sun, 10 Jan 2016 03:31:27 -0500
Subject: [PATCH] Revert "allow 0 for ISINT"

---
 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 f9bd9a0..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();
@@ -241,7 +241,7 @@
 	function onAfterInsert() {
 		global $app, $conf;
 		// Create the group for the client
-		$groupid = $app->db->datalogInsert('sys_group', "(name,description,client_id) VALUES ('".$app->db->quote($this->dataRecord["username"])."','',".$this->id.")", 'groupid');
+		$groupid = $app->db->datalogInsert('sys_group', array("name" => $this->dataRecord["username"], "description" => '', "client_id" => $this->id), 'groupid');
 		$groups = $groupid;
 
 		$username = $this->dataRecord["username"];
@@ -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"];
@@ -325,7 +325,7 @@
 					//* save new counter value
 					$system_config['misc']['customer_no_counter']++;
 					$system_config_str = $app->ini_parser->get_ini_string($system_config);
-					$app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($system_config_str)."'", 'sysini_id', 1);
+					$app->db->datalogUpdate('sys_ini', array("config" => $system_config_str), 'sysini_id', 1);
 				}
 			} else {
 				//* Logged in user must be a reseller

--
Gitblit v1.9.1