From e2c00a1762d1313e32f9fed330406b2e38d1af5b Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Mon, 26 Mar 2012 12:33:34 -0400
Subject: [PATCH] - Added restart function for PHP-FPM.
---
interface/web/sites/tools.inc.php | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/interface/web/sites/tools.inc.php b/interface/web/sites/tools.inc.php
index 66ce39a..316abe6 100644
--- a/interface/web/sites/tools.inc.php
+++ b/interface/web/sites/tools.inc.php
@@ -55,8 +55,7 @@
function getClientName($dataRecord) {
global $app, $conf;
-
- if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
+ if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
// Get the group-id of the user
$client_group_id = $_SESSION["s"]["user"]["default_group"];
} else {
@@ -82,7 +81,7 @@
function getClientID($dataRecord) {
global $app, $conf;
- if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
+ if($_SESSION["s"]["user"]["typ"] != 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
// Get the group-id of the user
$client_group_id = $_SESSION["s"]["user"]["default_group"];
} else {
@@ -97,7 +96,7 @@
}
}
/* get the name of the client */
- $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . $client_group_id);
+ $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = " . intval($client_group_id));
$clientID = $tmp['client_id'];
if ($clientID == '') $clientID = '0';
return $clientID;
--
Gitblit v1.9.1