<commit_before><?php
/**
 * @package OnlinePublisher
 * @subpackage Public.Services.Log
 */

require_once '../../../Config/Setup.php';
require_once '../../../Editor/Include/Public.php';
require_once '../../../Editor/Classes/Database.php';
require_once '../../../Editor/Classes/Network/Feed.php';
require_once '../../../Editor/Classes/Network/FeedItem.php';
require_once '../../../Editor/Classes/Network/FeedSerializer.php';


$feed = new Feed();
$feed->setTitle('OnlinePublisher log');
$feed->setDescription('OnlinePublisher log');
$feed->setPubDate(gmmktime());
$feed->setLastBuildDate(gmmktime());
$feed->setLink($baseUrl);

$sql = "select log.*,UNIX_TIMESTAMP(log.time) as timestamp,object.title as user from log left join object on object.id=log.user_id order by log.time desc limit 50";
$result = Database::select($sql);
while ($row = Database::next($result)) {
	$item = new FeedItem();
	$item->setTitle($row['event'].': '.$row['user']);
	$item->setDescription('USER: '.$row['user'].'<br/>IP: '.$row['ip']."<br/>SESSION: ".$row['session']);
	$item->setPubDate($row['timestamp']);
	$item->setGuid($baseUrl.$row['id']);
	$feed->addItem($item);
}
Database::free($result);<commit_msg>Removed info from log serializer<commit_after><?php
/**
 * @package OnlinePublisher
 * @subpackage Public.Services.Log
 */

require_once '../../../Config/Setup.php';
require_once '../../../Editor/Include/Public.php';
require_once '../../../Editor/Classes/Database.php';
require_once '../../../Editor/Classes/Network/Feed.php';
require_once '../../../Editor/Classes/Network/FeedItem.php';
require_once '../../../Editor/Classes/Network/FeedSerializer.php';


$feed = new Feed();
$feed->setTitle('OnlinePublisher log');
$feed->setDescription('OnlinePublisher log');
$feed->setPubDate(gmmktime());
$feed->setLastBuildDate(gmmktime());
$feed->setLink($baseUrl);

$sql = "select log.*,UNIX_TIMESTAMP(log.time) as timestamp,object.title as user from log left join object on object.id=log.user_id order by log.time desc limit 50";
$result = Database::select($sql);
while ($row = Database::next($result)) {
	$item = new FeedItem();
	$item->setTitle($row['event'].': '.$row['user']);
	$item->setDescription('USER: '.$row['user']);
	$item->setPubDate($row['timestamp']);
	$item->setGuid($baseUrl.$row['id']);
	$feed->addItem($item);
}
Database::free($result);
{'fraction_non_alphanumeric': 0.23917702528932705, 'fraction_numerical': 0.0017145306472353193, 'mean_word_length': 5.125984251968504, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 25, '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': '6784621', 'n_tokens_mistral': 765, 'n_tokens_neox': 748, 'n_words': 131}