summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/profiles.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/include/profiles.inc.php')
-rw-r--r--frontends/php/include/profiles.inc.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontends/php/include/profiles.inc.php b/frontends/php/include/profiles.inc.php
index f308430e..3289b71b 100644
--- a/frontends/php/include/profiles.inc.php
+++ b/frontends/php/include/profiles.inc.php
@@ -203,13 +203,15 @@ function rm4favorites($favobj,$favid,$favcnt=null,$resource=null){
$resource = (is_null($resource))?0:$resource;
$favcnt = (is_null($favcnt))?0:$favcnt;
+
+ if($favid == 0) $favcnt = ZBX_FAVORITES_ALL;
foreach($favorites as $key => $value){
if(((bccomp($favid,$value) == 0) || ($favid == 0)) && ($fav_rsrc[$key] == $resource)){
if($favcnt < 1){
unset($favorites[$key]);
unset($fav_rsrc[$key]);
- if($favcnt > ZBX_FAVORITES_ALL) break;
+ if($favcnt > ZBX_FAVORITES_ALL) break; // foreach
}
}
$favcnt--;