From f6da11cd817aaba7a23e75333cf9d5cdba0c5418 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 21 Aug 2013 12:28:07 +0300 Subject: [PATCH] Thanks to Shamil Yakupov for validation improvement --- web/add/cron/index.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/web/add/cron/index.php b/web/add/cron/index.php index 0cc257e08..8f0102811 100644 --- a/web/add/cron/index.php +++ b/web/add/cron/index.php @@ -14,12 +14,12 @@ top_panel($user,$TAB); if (!empty($_POST['ok'])) { // Check input - if ((!isset($_POST['v_min'])) || ($_POST['v_min'] != '')) $errors[] = __('minute'); - if ((!isset($_POST['v_hour'])) || ($_POST['v_hour'] != '')) $errors[] = __('hour'); - if ((!isset($_POST['v_day'])) || ($_POST['v_day'] != '')) $errors[] = __('day'); - if ((!isset($_POST['v_month'])) || ($_POST['v_month'] != '')) $errors[] = __('month'); - if ((!isset($_POST['v_wday'])) || ($_POST['v_wday'] != '')) $errors[] = __('day of week'); - if ((!isset($_POST['v_cmd'])) || ($_POST['v_cmd'] != '')) $errors[] = __('cmd'); + if ((!isset($_POST['v_min'])) || ($_POST['v_min'] == '')) $errors[] = __('minute'); + if ((!isset($_POST['v_hour'])) || ($_POST['v_hour'] == '')) $errors[] = __('hour'); + if ((!isset($_POST['v_day'])) || ($_POST['v_day'] == '')) $errors[] = __('day'); + if ((!isset($_POST['v_month'])) || ($_POST['v_month'] == '')) $errors[] = __('month'); + if ((!isset($_POST['v_wday'])) || ($_POST['v_wday'] == '')) $errors[] = __('day of week'); + if ((!isset($_POST['v_cmd'])) || ($_POST['v_cmd'] == '')) $errors[] = __('cmd'); // Protect input $v_min = escapeshellarg($_POST['v_min']);