<commit_before><?php
/**
 * Copyright (c) 2012, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

OC_JSON::checkAdminUser();

$count=(isset($_GET['count']))?$_GET['count']:50;
$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));
<commit_msg>fix logical issue while retrieving log via ajax<commit_after><?php
/**
 * Copyright (c) 2012, <NAME> <<EMAIL>>
 * This file is licensed under the Affero General Public License version 3 or later.
 * See the COPYING-README file.
 */

OC_JSON::checkAdminUser();

$count=(isset($_GET['count']))?$_GET['count']:50;
$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 + $count)) != 0) ? true : false));

{'fraction_non_alphanumeric': 0.20807174887892377, 'fraction_numerical': 0.017937219730941704, 'mean_word_length': 6.9714285714285715, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6579082', 'n_tokens_mistral': 400, 'n_tokens_neox': 385, 'n_words': 87}