diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-04-25 01:21:59 -0700 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-04-25 01:21:59 -0700 |
commit | 63b26997207f65a55173c013876e2000b4c0795e (patch) | |
tree | ee4dec8f5d8390cfd16765a9a9974370f092af0e /settings | |
parent | a0df5903b0fd2d22fb523c292d4012c74b2bbd7e (diff) | |
parent | 8fab7d5afb099a99aab81df7b0f44e3a1eb0016f (diff) | |
download | nextcloud-server-63b26997207f65a55173c013876e2000b4c0795e.tar.gz nextcloud-server-63b26997207f65a55173c013876e2000b4c0795e.zip |
Merge pull request #3094 from owncloud/log-ajax
fix logical issue while retrieving log via ajax
Diffstat (limited to 'settings')
-rwxr-xr-x | settings/admin.php | 5 | ||||
-rw-r--r-- | settings/ajax/getlog.php | 9 |
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 + ) +); |