Fix log viewing bug

This commit is contained in:
Michael Gapczynski 2012-05-02 15:26:42 -04:00
parent 6d37b8567b
commit 31d623f426
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class OC_Log_Owncloud {
$end=max(count($contents)-$offset-1, 0);
$start=max($end-$limit,0);
$i=$end;
while(count($entries)<$limit){
while($i>$start){
$entry=json_decode($contents[$i]);
if($entry->level>=$minLevel){
$entries[]=$entry;

View File

@ -25,7 +25,6 @@ OC.Log={
$('html, body').animate({scrollTop: $(document).height()}, 800);
}
});
OC.Log.loaded+=count;
},
addEntries:function(entries){
for(var i=0;i<entries.length;i++){
@ -48,6 +47,7 @@ OC.Log={
row.append(timeTd);
$('#log').append(row);
}
OC.Log.loaded += entries.length;
}
}