/[scire]/trunk/scire/add_job.php
Gentoo

Diff of /trunk/scire/add_job.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 337 Revision 338
31 if ($_POST['description']) { 31 if ($_POST['description']) {
32 $description = $_POST['description']; 32 $description = $_POST['description'];
33 } else { 33 } else {
34 $description = "No description provided."; 34 $description = "No description provided.";
35 } 35 }
36 $pending = sizeof($_POST['clients']); 36 $pending = sizeof($_POST['clients']) + sizeof($_POST['clientgroups']);
37
37 if (!$status and ($pending or $_POST['clientgroups'])) { #We have a script and clients; 38 if (!$status and ($pending or $_POST['clientgroups'])) { #We have a script and clients;
38 # Get the schedule! 39 # Get the schedule! All fields are required or else you're SOL
39 $scheduleComplete = $_POST["minute1"] and $_POST["hour1"] and 40 $scheduleComplete = $_POST["minute1"] and $_POST["hour1"] and
40 $_POST["day1"] and $_POST["month1"] and $_POST["weekday1"]; 41 $_POST["day1"] and $_POST["month1"] and $_POST["weekday1"];
41 if ($scheduleComplete) { 42 if ($scheduleComplete) {
42 $str = implode(" ", array($_POST["minute1"], $_POST["hour1"], 43 $str = implode(" ", array($_POST["minute1"], $_POST["hour1"],
43 $_POST["day1"], $_POST["month1"], $_POST["weekday1"])); 44 $_POST["day1"], $_POST["month1"], $_POST["weekday1"]));
44 } else { 45 } else {
45 $str = ""; 46 $str = "";
46 } 47 }
47 48# pre_var_dump($_POST);
48 #$dependency = 1; 49# pre_var_dump($scheduleComplete);
50 pre_var_dump($str);
49 51
50 try { 52 try {
51 $result = scire_add_job($_POST['script'], $priority, $_SESSION['userid'], $permission, $description, $pending, $_POST['clients'], $_POST['clientgroups'], $dependency, $str, $_POST['validity_period']); 53 $result = scire_add_job($_POST['script'], $priority, $_SESSION['userid'], $permission, $description, $pending, $_POST['clients'], $_POST['clientgroups'], $dependency, $str, $_POST['validity_period']);
52 54
53 if (!$result) { 55 if (!$result) {

Legend:
Removed from v.337  
changed lines
  Added in v.338

  ViewVC Help
Powered by ViewVC 1.1.20