diff options
| author | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-06 11:52:09 +0000 |
|---|---|---|
| committer | hugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2005-05-06 11:52:09 +0000 |
| commit | 26ee00a8526a15de827768c715a0fc27a4cee925 (patch) | |
| tree | e4544ad543e3d4cd1a69bc43f28aa153f44f8ebe /frontends/php/include/graphs.inc.php | |
| parent | 639aac687504d1c00010a4295c22f3e6fb878ffb (diff) | |
| download | zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.tar.gz zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.tar.xz zabbix-26ee00a8526a15de827768c715a0fc27a4cee925.zip | |
- better error reporting for GUI (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@1757 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/graphs.inc.php')
| -rw-r--r-- | frontends/php/include/graphs.inc.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/frontends/php/include/graphs.inc.php b/frontends/php/include/graphs.inc.php index cb642277..5d08b6ad 100644 --- a/frontends/php/include/graphs.inc.php +++ b/frontends/php/include/graphs.inc.php @@ -23,11 +23,9 @@ function add_graph($name,$width,$height,$yaxistype,$yaxismin,$yaxismax) { - global $ERROR_MSG; - if(!check_right("Graph","A",0)) { - $ERROR_MSG="Insufficient permissions"; + error("Insufficient permissions"); return 0; } @@ -53,11 +51,9 @@ function update_graph($graphid,$name,$width,$height,$yaxistype,$yaxismin,$yaxismax) { - global $ERROR_MSG; - if(!check_right("Graph","U",0)) { - $ERROR_MSG="Insufficient permissions"; + error("Insufficient permissions"); return 0; } @@ -87,8 +83,6 @@ function get_graphitem_by_gitemid($gitemid) { - global $ERROR_MSG; - $sql="select * from graphs_items where gitemid=$gitemid"; $result=DBselect($sql); if(DBnum_rows($result) == 1) @@ -97,15 +91,13 @@ } else { - $ERROR_MSG="No graph item with gitemid=[$gitemid]"; + error("No graph item with gitemid=[$gitemid]"); } return $result; } function get_graph_by_graphid($graphid) { - global $ERROR_MSG; - $sql="select * from graphs where graphid=$graphid"; $result=DBselect($sql); if(DBnum_rows($result) == 1) @@ -114,7 +106,7 @@ } else { - $ERROR_MSG="No graph with graphid=[$graphid]"; + error("No graph with graphid=[$graphid]"); } return $result; } |
