getlog.php 529 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Copyright (c) 2012, Robin Appelman <icewind1991@gmail.com>
  4. * This file is licensed under the Affero General Public License version 3 or later.
  5. * See the COPYING-README file.
  6. */
  7. OC_JSON::checkAdminUser();
  8. $count=(isset($_GET['count']))?$_GET['count']:50;
  9. $offset=(isset($_GET['offset']))?$_GET['offset']:0;
  10. $entries=OC_Log_Owncloud::getEntries($count, $offset);
  11. $data = array();
  12. OC_JSON::success(
  13. array(
  14. "data" => $entries,
  15. "remain" => count(OC_Log_Owncloud::getEntries(1, $offset + $count)) !== 0,
  16. )
  17. );