summaryrefslogtreecommitdiffstats
path: root/frontends/php/actions.php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-24 16:43:23 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2005-11-24 16:43:23 +0000
commit4eeeb02ee16f99f6b2d692f7e863ebfca66c1c63 (patch)
treef2ad9a8bca15f6bef61a8156b88f7ea35ed5f707 /frontends/php/actions.php
parent3cbe6adc1f59c83ccdf319d31e7c03cb70db6351 (diff)
Misc cleanup.
git-svn-id: svn://svn.zabbix.com/trunk@2356 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/actions.php')
-rw-r--r--frontends/php/actions.php27
1 files changed, 13 insertions, 14 deletions
diff --git a/frontends/php/actions.php b/frontends/php/actions.php
index a6409a42..6f2379f6 100644
--- a/frontends/php/actions.php
+++ b/frontends/php/actions.php
@@ -217,22 +217,21 @@
if(isset($_REQUEST["actionid"]))
{
- $sql="select a.actionid,a.triggerid,a.good,a.delay,a.subject,a.message,a.userid,a.scope,a.severity,a.recipient,a.maxrepeats,a.repeatdelay from actions a where a.actionid=".$_REQUEST["actionid"];
- $result=DBselect($sql);
+ $action=get_action_by_actionid($_REQUEST["actionid"]);
- $actionid=DBget_field($result,0,0);
- $triggerid=DBget_field($result,0,1);
- $good=DBget_field($result,0,2);
- $delay=DBget_field($result,0,3);
+ $actionid=$action["actionid"];
+ $triggerid=$action["triggerid"];
+ $good=$action["good"];
+ $delay=$action["delay"];
// Otherwise symbols like ",' will not be shown
- $subject=htmlspecialchars(DBget_field($result,0,4));
- $message=DBget_field($result,0,5);
- $uid=DBget_field($result,0,6);
- $scope=@iif(isset($_REQUEST["scope"]),$_REQUEST["scope"],DBget_field($result,0,7));
- $severity=DBget_field($result,0,8);
- $recipient=@iif(isset($_REQUEST["recipient"]),$_REQUEST["recipient"],DBget_field($result,0,9));
- $maxrepeats=DBget_field($result,0,10);
- $repeatdelay=DBget_field($result,0,11);
+ $subject=htmlspecialchars($action["subject"]);
+ $message=$action["message"];
+ $uid=$action["uid"];
+ $scope=@iif(isset($_REQUEST["scope"]),$_REQUEST["scope"],$action["scope"]);
+ $severity=$action["severity"];
+ $recipient=@iif(isset($_REQUEST["recipient"]),$_REQUEST["recipient"],$action["recipient"]);
+ $maxrepeats=$action["maxrepeats"];
+ $repeatdelay=$action["repeatdelay"];
if(isset($_REQUEST["repeat"]))
{
$repeat=$_REQUEST["repeat"];