Fix log viewing bug
This commit is contained in:
parent
6d37b8567b
commit
31d623f426
|
@ -73,7 +73,7 @@ class OC_Log_Owncloud {
|
||||||
$end=max(count($contents)-$offset-1, 0);
|
$end=max(count($contents)-$offset-1, 0);
|
||||||
$start=max($end-$limit,0);
|
$start=max($end-$limit,0);
|
||||||
$i=$end;
|
$i=$end;
|
||||||
while(count($entries)<$limit){
|
while($i>$start){
|
||||||
$entry=json_decode($contents[$i]);
|
$entry=json_decode($contents[$i]);
|
||||||
if($entry->level>=$minLevel){
|
if($entry->level>=$minLevel){
|
||||||
$entries[]=$entry;
|
$entries[]=$entry;
|
||||||
|
|
|
@ -25,7 +25,6 @@ OC.Log={
|
||||||
$('html, body').animate({scrollTop: $(document).height()}, 800);
|
$('html, body').animate({scrollTop: $(document).height()}, 800);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
OC.Log.loaded+=count;
|
|
||||||
},
|
},
|
||||||
addEntries:function(entries){
|
addEntries:function(entries){
|
||||||
for(var i=0;i<entries.length;i++){
|
for(var i=0;i<entries.length;i++){
|
||||||
|
@ -48,6 +47,7 @@ OC.Log={
|
||||||
row.append(timeTd);
|
row.append(timeTd);
|
||||||
$('#log').append(row);
|
$('#log').append(row);
|
||||||
}
|
}
|
||||||
|
OC.Log.loaded += entries.length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue