summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/blocks.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-26 12:33:26 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-26 12:33:26 +0000
commitc228c7b2c9ea0b4d0e65295e47992b1e559447fc (patch)
tree7ec77efdc12a83d823f7116d9708769caaa5018d /frontends/php/include/blocks.inc.php
parent401c0e953a8ad1bb7c7cedb5221cc29af76edd20 (diff)
downloadzabbix-c228c7b2c9ea0b4d0e65295e47992b1e559447fc.tar.gz
zabbix-c228c7b2c9ea0b4d0e65295e47992b1e559447fc.tar.xz
zabbix-c228c7b2c9ea0b4d0e65295e47992b1e559447fc.zip
- [DEV-116] added option to remember user login (Artem)
git-svn-id: svn://svn.zabbix.com/trunk@5406 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/blocks.inc.php')
-rw-r--r--frontends/php/include/blocks.inc.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/frontends/php/include/blocks.inc.php b/frontends/php/include/blocks.inc.php
index 0f97ea4a..8e3819b6 100644
--- a/frontends/php/include/blocks.inc.php
+++ b/frontends/php/include/blocks.inc.php
@@ -722,15 +722,18 @@ return $screenids;
function add_refresh_objects($ref_tab){
$min = PHP_INT_MAX;
- foreach($ref_tab as $id => $interval){
- $min = ($min < $interval)?$min:$interval;
- zbx_add_post_js(get_refresh_obj_script($id,$interval));
+ foreach($ref_tab as $id => $obj){
+ $obj['interval'] = (isset($obj['interval']))?$obj['interval']:60;
+
+ $min = ($min < $obj['interval'])?$min:$obj['interval'];
+ zbx_add_post_js(get_refresh_obj_script($obj));
}
zbx_add_post_js('updater.interval = 10; updater.check4Update();');
}
-function get_refresh_obj_script($id,$interval){
- return 'updater.setObj4Update("'.$id.'","dashboard.php?output=html",{"favobj": "refresh", "favid": "'.$id.'"}, '.$interval.');';
+function get_refresh_obj_script($obj){
+ $obj['url'] = (isset($obj['url']))?$obj['url']:'dashboard.php?output=html';
+return 'updater.setObj4Update("'.$obj['id'].'",'.$obj['interval'].',"'.$obj['url'].'",{"favobj": "refresh", "favid": "'.$obj['id'].'"});';
}
function make_refresh_menu($id,$cur_interval,&$menu,&$submenu){