fixed small statesystem bugs

This commit is contained in:
Ulf Gebhardt 2015-04-10 03:46:43 +02:00
parent 36c76bb1b3
commit 37080b1956

View File

@ -83,7 +83,7 @@ SYSTEM.prototype.handle_call_pages_page = function (html,entry,id,forced,cached)
if(call_func && typeof fn === 'function'){
call_func = false;
fn();
system.log_info('call func: '+entry['func']);
this.log_info('call func: '+entry['func']);
}
//update state
this.state[entry['div']] = url;
@ -95,14 +95,14 @@ SYSTEM.prototype.handle_call_pages_entry = function (entry,id,forced,cached) {
//load page
this.call_url(url,function(data){system.handle_call_pages_page(data,entry,id,forced,cached);},{},'html',true);
} else {
this.log_info('load page: '+id+entry['div']+' '+url+' - skipped - already loaded');
this.log_info('load page: '+id+entry['div']+' '+url+' - cached');
}
}
//internal function to handle pagestate results
SYSTEM.prototype.handle_call_pages = function (data,id,forced,cached) {
if(data['status']){
//clear old state
this.state = {}
//this.state = {}
this.state_info = {}
this.log_info('load pages: endpoint '+this.endpoint+' group:'+this.group+' state:'+id+' - '+(cached ? 'cached ' : (forced ? 'forced' : 'success')));