diff options
author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-02 14:30:09 +0000 |
---|---|---|
committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2008-04-02 14:30:09 +0000 |
commit | 5160f49d9546dc4a33fff23e75b03b5ac13de570 (patch) | |
tree | 6ca1d0e6dd639e25aa4d5d2bed4cc2bcc0593c8b /frontends/php/maps.php | |
parent | 674c41240eec523885688bed0a649548ac9b2086 (diff) | |
download | zabbix-5160f49d9546dc4a33fff23e75b03b5ac13de570.tar.gz zabbix-5160f49d9546dc4a33fff23e75b03b5ac13de570.tar.xz zabbix-5160f49d9546dc4a33fff23e75b03b5ac13de570.zip |
- added deletion from favorites on deleting items,graphs,screens,maps.. (Artem)
- changes resources for favorites (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5579 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/maps.php')
-rw-r--r-- | frontends/php/maps.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/frontends/php/maps.php b/frontends/php/maps.php index c18aac7f..697a2d6a 100644 --- a/frontends/php/maps.php +++ b/frontends/php/maps.php @@ -57,23 +57,21 @@ include_once "include/page_header.php"; ?> <?php if(isset($_REQUEST['favobj'])){ - if('sysmaps' == $_REQUEST['favobj']){ + if('sysmapid' == $_REQUEST['favobj']){ $result = false; if('add' == $_REQUEST['action']){ $result = add2favorites('web.favorite.sysmapids',$_REQUEST['favid'],$_REQUEST['favobj']); if($result){ print('$("addrm_fav").title = "'.S_REMOVE_FROM.' '.S_FAVORITES.'";'."\n"); - print('$("addrm_fav").onclick = function(){rm4favorites("sysmaps","'.$_REQUEST['favid'].'",0);}'."\n"); + print('$("addrm_fav").onclick = function(){rm4favorites("sysmapid","'.$_REQUEST['favid'].'",0);}'."\n"); } } else if('remove' == $_REQUEST['action']){ - while(infavorites('web.favorite.sysmapids',$_REQUEST['favid'],$_REQUEST['favobj'])){ - $result = rm4favorites('web.favorite.sysmapids',$_REQUEST['favid'],0,$_REQUEST['favobj']); - } + $result = rm4favorites('web.favorite.sysmapids',$_REQUEST['favid'],ZBX_FAVORITES_ALL,$_REQUEST['favobj']); if($result){ print('$("addrm_fav").title = "'.S_ADD_TO.' '.S_FAVORITES.'";'."\n"); - print('$("addrm_fav").onclick = function(){ add2favorites("sysmaps","'.$_REQUEST['favid'].'");}'."\n"); + print('$("addrm_fav").onclick = function(){ add2favorites("sysmapid","'.$_REQUEST['favid'].'");}'."\n"); } } @@ -136,15 +134,15 @@ include_once "include/page_header.php"; array_push($text, nbsp(" / "), new CLink($all_maps[$_REQUEST["sysmapid"]],$url)); - if(infavorites('web.favorite.sysmapids',$_REQUEST['sysmapid'],'sysmaps')){ + if(infavorites('web.favorite.sysmapids',$_REQUEST['sysmapid'],'sysmapid')){ $icon = new CDiv(SPACE,'iconminus'); $icon->AddOption('title',S_REMOVE_FROM.' '.S_FAVORITES); - $icon->AddAction('onclick',new CScript("javascript: rm4favorites('sysmaps','".$_REQUEST["sysmapid"]."',0);")); + $icon->AddAction('onclick',new CScript("javascript: rm4favorites('sysmapid','".$_REQUEST["sysmapid"]."',0);")); } else{ $icon = new CDiv(SPACE,'iconplus'); $icon->AddOption('title',S_ADD_TO.' '.S_FAVORITES); - $icon->AddAction('onclick',new CScript("javascript: add2favorites('sysmaps','".$_REQUEST["sysmapid"]."');")); + $icon->AddAction('onclick',new CScript("javascript: add2favorites('sysmapid','".$_REQUEST["sysmapid"]."');")); } $icon->AddOption('id','addrm_fav'); |