diff options
| author | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-04 13:00:16 +0000 |
|---|---|---|
| committer | artem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-06-04 13:00:16 +0000 |
| commit | b0d70e49ec39c7af96a13144fa6747b1b6eaeb20 (patch) | |
| tree | 01d0c9e9b0e3a675de7307ed49871e0a36ffdd72 /frontends/php/include/config.inc.php | |
| parent | 9c976c3c04e8a3f9bc9f9dbbdb429d82559f58b0 (diff) | |
- added constant ZBX_HISTORY_COUNT (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@4230 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/config.inc.php')
| -rw-r--r-- | frontends/php/include/config.inc.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d3b71f18..1c633932 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1421,7 +1421,7 @@ $result = $history=''; $delimiter = new CSpan('»','delimiter'); $delimiter = $delimiter->ToString(); - for($i = 0; $i < 5; $i++){ + for($i = 0; $i < ZBX_HISTORY_COUNT; $i++){ if($rows = get_profile('web.history.'.$i,false)){ $history.= ($i>0)?($delimiter):(''); $url = new CLink($rows[0],$rows[1],'history'); @@ -1450,7 +1450,7 @@ $result = $curr = 0; $profile = array(); - for($i = 0; $i < 5; $i++){ + for($i = 0; $i < ZBX_HISTORY_COUNT; $i++){ if($history = get_profile('web.history.'.$i,false)){ if($history[0] != $title){ $profile[$curr] = $history; @@ -1461,16 +1461,16 @@ $result = $history = array($title,$url); - if($curr < 5){ + if($curr < ZBX_HISTORY_COUNT){ for($i = 0; $i < $curr; $i++){ update_profile('web.history.'.$i,$profile[$i],PROFILE_TYPE_ARRAY); } $result = update_profile('web.history.'.$curr,$history,PROFILE_TYPE_ARRAY); } else { - for($i = 1; $i < 5; $i++){ + for($i = 1; $i < ZBX_HISTORY_COUNT; $i++){ update_profile('web.history.'.($i-1),$profile[$i],PROFILE_TYPE_ARRAY); } - $result = update_profile('web.history.'.(5-1),$history,PROFILE_TYPE_ARRAY); + $result = update_profile('web.history.'.(ZBX_HISTORY_COUNT-1),$history,PROFILE_TYPE_ARRAY); } return $result; |
