diff options
Diffstat (limited to 'frontends/php/scripts.php')
| -rw-r--r-- | frontends/php/scripts.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/scripts.php b/frontends/php/scripts.php index 531e371e..84dd2b0d 100644 --- a/frontends/php/scripts.php +++ b/frontends/php/scripts.php @@ -58,7 +58,7 @@ if(isset($_REQUEST['action'])){ if(isset($_REQUEST['save'])){ $cond = (isset($_REQUEST['scriptid']))?(' AND scriptid<>'.$_REQUEST['scriptid']):(''); - $scripts = DBfetch(DBselect('SELECT count(scriptid) as cnt FROM scripts WHERE name='.zbx_dbstr($_REQUEST['name']).$cond,1)); + $scripts = DBfetch(DBselect('SELECT count(scriptid) as cnt FROM scripts WHERE name='.zbx_dbstr($_REQUEST['name']).$cond.' and '.DBin_node('scriptid', get_current_nodeid(false)),1)); if($scripts && $scripts['cnt']>0){ error(S_SCRIPT.SPACE.'['.htmlspecialchars($_REQUEST['name']).']'.SPACE.S_ALREADY_EXISTS_SMALL); @@ -202,4 +202,4 @@ else { ?> <?php include_once "include/page_footer.php"; -?>
\ No newline at end of file +?> |
