summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsettings/admin.php5
-rw-r--r--settings/ajax/getlog.php9
2 files changed, 6 insertions, 8 deletions
diff --git a/settings/admin.php b/settings/admin.php
index c7848803095..035cef5bf95 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -20,11 +20,6 @@ $htaccessworking=OC_Util::ishtaccessworking();
$entries=OC_Log_Owncloud::getEntries(3);
$entriesremain=(count(OC_Log_Owncloud::getEntries(4)) > 3)?true:false;
-function compareEntries($a, $b) {
- return $b->time - $a->time;
-}
-usort($entries, 'compareEntries');
-
$tmpl->assign('loglevel', OC_Config::getValue( "loglevel", 2 ));
$tmpl->assign('entries', $entries);
$tmpl->assign('entriesremain', $entriesremain);
diff --git a/settings/ajax/getlog.php b/settings/ajax/getlog.php
index 141457e72a0..da69a2863b7 100644
--- a/settings/ajax/getlog.php
+++ b/settings/ajax/getlog.php
@@ -13,6 +13,9 @@ $offset=(isset($_GET['offset']))?$_GET['offset']:0;
$entries=OC_Log_Owncloud::getEntries($count, $offset);
$data = array();
-OC_JSON::success(array(
- "data" => $entries,
- "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $offset)) != 0) ? true : false));
+OC_JSON::success(
+ array(
+ "data" => $entries,
+ "remain"=>(count(OC_Log_Owncloud::getEntries(1, $offset + $count)) != 0) ? true : false
+ )
+);