From 41d7d170bc4673e9a4e89a49c191b414e38ef0d7 Mon Sep 17 00:00:00 2001
From: Sergio Cambra <sergio@programatica.es>
Date: Tue, 08 Jul 2014 08:00:01 -0400
Subject: [PATCH] default servers on system config for admin use
---
interface/web/dashboard/dashlets/limits.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index 2d63925..13c0a4a 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -71,7 +71,7 @@
$limits[] = array('field' => 'limit_web_aliasdomain',
'db_table' => 'web_domain',
- 'db_where' => "type = 'alias'");
+ 'db_where' => "(type = 'alias' OR type = 'vhostalias')");
$limits[] = array('field' => 'limit_ftp_user',
'db_table' => 'ftp_user',
@@ -127,7 +127,7 @@
$tpl->setVar('is_admin', $user_is_admin);
if($user_is_admin == false) {
- $client_group_id = $_SESSION["s"]["user"]["default_group"];
+ $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
$client = $app->db->queryOneRecord("SELECT * FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
}
@@ -157,7 +157,7 @@
function _get_limit_usage($limit) {
global $app;
- $sql = "SELECT count(sys_userid) as number FROM ".$limit['db_table']." WHERE ";
+ $sql = "SELECT count(sys_userid) as number FROM ".$app->db->quote($limit['db_table'])." WHERE ";
if($limit['db_where'] != '') $sql .= $limit['db_where']." AND ";
$sql .= $app->tform->getAuthSQL('r');
$rec = $app->db->queryOneRecord($sql);
--
Gitblit v1.9.1