From 9c9382e6949e1366c6adb502b7aacae2c11023f7 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 08 Sep 2011 09:42:04 -0400
Subject: [PATCH] Fixed: FS#1709 - Wrong message "Your hard-disk space is going full" in the "Monitor -> Show Disk Usage"

---
 interface/web/mail/mail_domain_catchall_edit.php |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/interface/web/mail/mail_domain_catchall_edit.php b/interface/web/mail/mail_domain_catchall_edit.php
index 93a0635..c3338cc 100644
--- a/interface/web/mail/mail_domain_catchall_edit.php
+++ b/interface/web/mail/mail_domain_catchall_edit.php
@@ -55,17 +55,11 @@
 		
 		// we will check only users, not admins
 		if($_SESSION["s"]["user"]["typ"] == 'user') {
-			
-			// Get the limits of the client
-			$client_group_id = $_SESSION["s"]["user"]["default_group"];
-			$client = $app->db->queryOneRecord("SELECT limit_mailcatchall FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
-			
-			// Check if the user may add another mailbox.
-			if($client["limit_mailforward"] >= 0) {
-				$tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE sys_groupid = $client_group_id and type = 'catchall'");
-				if($tmp["number"] >= $client["limit_mailcatchall"]) {
-					$app->error($app->tform->wordbook["limit_mailcatchall_txt"]);
-				}
+			if(!$app->tform->checkClientLimit('limit_mailcatchall',"type = 'catchall'")) {
+				$app->error($app->tform->wordbook["limit_mailcatchall_txt"]);
+			}
+			if(!$app->tform->checkResellerLimit('limit_mailcatchall',"type = 'catchall'")) {
+				$app->error('Reseller: '.$app->tform->wordbook["limit_mailcatchall_txt"]);
 			}
 		}
 		

--
Gitblit v1.9.1