summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2008-01-06 21:59:21 +0000
committerPreston Cody <codeman@gentoo.org>2008-01-06 21:59:21 +0000
commit2726871de34bf4ca3b31699935eac179c30f45f3 (patch)
treecd4d76e8f3b0f7bb77f972c17756fc20a73111a5 /scire/add_job.php
parentstatusid needs to be a part of the key to avoid (diff)
downloadscire-2726871de34bf4ca3b31699935eac179c30f45f3.tar.gz
scire-2726871de34bf4ca3b31699935eac179c30f45f3.tar.bz2
scire-2726871de34bf4ca3b31699935eac179c30f45f3.zip
adding recurring_jobs_clients to hold the information for recurring jobs.
svn path=/trunk/; revision=338
Diffstat (limited to 'scire/add_job.php')
-rw-r--r--scire/add_job.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/scire/add_job.php b/scire/add_job.php
index d352401..a5266e0 100644
--- a/scire/add_job.php
+++ b/scire/add_job.php
@@ -33,9 +33,10 @@ if ($_POST['ADD']) {
} else {
$description = "No description provided.";
}
- $pending = sizeof($_POST['clients']);
+ $pending = sizeof($_POST['clients']) + sizeof($_POST['clientgroups']);
+
if (!$status and ($pending or $_POST['clientgroups'])) { #We have a script and clients;
- # Get the schedule!
+ # Get the schedule! All fields are required or else you're SOL
$scheduleComplete = $_POST["minute1"] and $_POST["hour1"] and
$_POST["day1"] and $_POST["month1"] and $_POST["weekday1"];
if ($scheduleComplete) {
@@ -44,8 +45,9 @@ if ($_POST['ADD']) {
} else {
$str = "";
}
-
- #$dependency = 1;
+# pre_var_dump($_POST);
+# pre_var_dump($scheduleComplete);
+ pre_var_dump($str);
try {
$result = scire_add_job($_POST['script'], $priority, $_SESSION['userid'], $permission, $description, $pending, $_POST['clients'], $_POST['clientgroups'], $dependency, $str, $_POST['validity_period']);