Changeset 5810
- Timestamp:
- 07/22/08 16:37:14 (4 months ago)
- Location:
- trunk/centreon/www/include/monitoring
- Files:
-
- 4 modified
-
comments/AddHostComment.php (modified) (2 diffs)
-
comments/AddSvcComment.php (modified) (3 diffs)
-
downtime/AddHostDowntime.php (modified) (2 diffs)
-
downtime/AddSvcDowntime.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/monitoring/comments/AddHostComment.php
r5437 r5810 25 25 if (isset($_GET["host_name"])){ 26 26 $host_id = getMyHostID($_GET["host_name"]); 27 if (!isset($lcaHostByName["LcaHost"] [$_GET["host_name"]]) && $isRestreint)27 if (!isset($lcaHostByName["LcaHost"] [$_GET["host_name"]]) && !$is_admin) 28 28 $LCA_error = 1; 29 29 $host_name = $_GET["host_name"]; … … 71 71 $form->addElement('textarea', 'comment', _("Comments"), $attrsTextarea); 72 72 73 $form->addRule('host ', _("Required Field"), 'required');73 $form->addRule('host_id', _("Required Field"), 'required'); 74 74 $form->addRule('comment', _("Required Field"), 'required'); 75 75 -
trunk/centreon/www/include/monitoring/comments/AddSvcComment.php
r5437 r5810 45 45 $data = array("host_id" => $host_id, "service_id" => getMyServiceID($svc_description, $host_id)); 46 46 47 # 48 ## Database retrieve information for differents elements list we need on the page 49 # 47 /* 48 * Database retrieve information for differents 49 * elements list we need on the page 50 */ 50 51 $hosts = array(""=>""); 51 52 $DBRESULT =& $pearDB->query("SELECT host_id, host_name, host_template_model_htm_id FROM `host` WHERE host_register = '1' ORDER BY host_name"); … … 55 56 if (!$host["host_name"]) 56 57 $host["host_name"] = getMyHostName($host["host_template_model_htm_id"]); 57 if (isset($lcaHostByName["LcaHost"][$host["host_name"]]) )58 if (isset($lcaHostByName["LcaHost"][$host["host_name"]]) || $is_admin) 58 59 $hosts[$host["host_id"]]= $host["host_name"]; 59 60 } … … 88 89 $form->addElement('textarea', 'comment', _("Comments"), $attrsTextarea); 89 90 90 $form->addRule('host', _("Required Field"), 'required'); 91 $form->addRule('service', _("Required Field"), 'required'); 91 /* 92 * Add Rules 93 */ 94 $form->addRule('host_id', _("Required Field"), 'required'); 95 $form->addRule('service_id', _("Required Field"), 'required'); 92 96 $form->addRule('comment', _("Required Field"), 'required'); 93 97 -
trunk/centreon/www/include/monitoring/downtime/AddHostDowntime.php
r5437 r5810 27 27 if (isset($_GET["host_name"])){ 28 28 $host_id = getMyHostID($_GET["host_name"]); 29 if (!isset($lcaHostByName["LcaHost"] [$_GET["host_name"]]) && $isRestreint)29 if (!isset($lcaHostByName["LcaHost"] [$_GET["host_name"]]) && !$is_admin) 30 30 $LCA_error = 1; 31 31 $host_name = $_GET["host_name"]; … … 79 79 $form->addElement('textarea', 'comment', _("Comments"), $attrsTextarea); 80 80 81 $form->addRule('host ', _("Required Field"), 'required');81 $form->addRule('host_id', _("Required Field"), 'required'); 82 82 $form->addRule('end', _("Required Field"), 'required'); 83 83 $form->addRule('start', _("Required Field"), 'required'); -
trunk/centreon/www/include/monitoring/downtime/AddSvcDowntime.php
r5437 r5810 32 32 if (isset($_GET["host_name"]) && isset($_GET["service_description"])){ 33 33 $host_id = getMyHostID($_GET["host_name"]); 34 if (!isset($lcaHostByName[ LcaHost] [$_GET["host_name"]]) && $isRestreint)34 if (!isset($lcaHostByName["LcaHost"][$_GET["host_name"]]) && !$is_admin) 35 35 $LCA_error = 1; 36 36 $service_id = getMyServiceID($_GET["service_description"], $host_id); … … 55 55 if (!$host["host_name"]) 56 56 $host["host_name"] = getMyHostName($host["host_template_model_htm_id"]); 57 if (isset($lcaHostByName["LcaHost"][$host["host_name"]]) )57 if (isset($lcaHostByName["LcaHost"][$host["host_name"]]) || $is_admin) 58 58 $hosts[$host["host_id"]]= $host["host_name"]; 59 59 } … … 92 92 $form->addElement('textarea', 'comment', _("Comments"), $attrsTextarea); 93 93 94 $form->addRule('host', _("Required Field"), 'required'); 94 $form->addRule('host_id', _("Required Field"), 'required'); 95 $form->addRule('service_id', _("Required Field"), 'required'); 95 96 $form->addRule('end', _("Required Field"), 'required'); 96 97 $form->addRule('start', _("Required Field"), 'required');
