From 465f2bbfb524dc21021f71e78e8a2ab31a064d93 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Wed, 09 Apr 2014 12:30:42 -0400
Subject: [PATCH] Merge branch 'stable-3.0.5' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.0.5

---
 interface/web/sites/cron_edit.php |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php
index 092c7dd..6ec02c7 100644
--- a/interface/web/sites/cron_edit.php
+++ b/interface/web/sites/cron_edit.php
@@ -140,13 +140,18 @@
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			// Get the limits of the client
 			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-			$client = $app->db->queryOneRecord("SELECT limit_cron_frequency FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+			$client = $app->db->queryOneRecord("SELECT limit_cron_frequency, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
 
 			if($client["limit_cron_frequency"] > 1) {
 				if($app->tform->cron_min_freq < $client["limit_cron_frequency"]) {
 					$app->error($app->tform->wordbook["limit_cron_frequency_txt"]);
 					$has_error = true;
 				}
+			}
+			
+			if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') {
+				$app->error($app->tform->wordbook["limit_cron_url_txt"]);
+				$has_error = true;
 			}
 		}
 
@@ -165,7 +170,7 @@
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			// Get the limits of the client
 			$client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
-			$client = $app->db->queryOneRecord("SELECT limit_cron_frequency FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+			$client = $app->db->queryOneRecord("SELECT limit_cron_frequency, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
 
 			if($client["limit_cron_frequency"] > 1) {
 				if($app->tform->cron_min_freq < $client["limit_cron_frequency"]) {
@@ -173,6 +178,11 @@
 					$has_error = true;
 				}
 			}
+			
+			if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') {
+				$app->error($app->tform->wordbook["limit_cron_url_txt"]);
+				$has_error = true;
+			}
 		}
 
 		if($has_error == true) {

--
Gitblit v1.9.1