<commit_before><?php
namespace wcf\system\comment\manager;
use wcf\data\moderation\queue\ModerationQueue;
use wcf\data\moderation\queue\ModerationQueueEditor;
use wcf\data\moderation\queue\ViewableModerationQueue;

/**
 * Moderation queue comment manager implementation.
 * 
 * @author	<NAME>
 * @copyright	2001-2014 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.comment.manager
 * @category	Community Framework
 */
class ModerationQueueCommentManager extends AbstractCommentManager {
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::isAccessible()
	 */
	public function isAccessible($objectID, $validateWritePermission = false) {
		$entry = new ModerationQueue($objectID);
		return $entry->canEdit();
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::getLink()
	 */
	public function getLink($objectTypeID, $objectID) {
		$entry = new ViewableModerationQueue(new ModerationQueue($objectID));
		return $entry->getLink();
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::getTitle()
	 */
	public function getTitle($objectTypeID, $objectID, $isResponse = false) {
		return '';
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::updateCounter()
	 */
	public function updateCounter($objectID, $value) {
		$entry = new ModerationQueue($objectID);
		$editor = new ModerationQueueEditor($entry);
		$editor->updateCounters(array(
			'comments' => $value
		));
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::canAdd()
	 */
	public function canAdd($objectID) {
		if (!$this->isAccessible($objectID, true)) {
			return false;
		}
	
		return true;
	}
	<commit_msg>Added missing 'last change time' update<commit_after><?php
namespace wcf\system\comment\manager;
use wcf\data\moderation\queue\ModerationQueue;
use wcf\data\moderation\queue\ModerationQueueEditor;
use wcf\data\moderation\queue\ViewableModerationQueue;

/**
 * Moderation queue comment manager implementation.
 * 
 * @author	<NAME>
 * @copyright	2001-2014 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.comment.manager
 * @category	Community Framework
 */
class ModerationQueueCommentManager extends AbstractCommentManager {
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::isAccessible()
	 */
	public function isAccessible($objectID, $validateWritePermission = false) {
		$entry = new ModerationQueue($objectID);
		return $entry->canEdit();
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::getLink()
	 */
	public function getLink($objectTypeID, $objectID) {
		$entry = new ViewableModerationQueue(new ModerationQueue($objectID));
		return $entry->getLink();
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::getTitle()
	 */
	public function getTitle($objectTypeID, $objectID, $isResponse = false) {
		return '';
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::updateCounter()
	 */
	public function updateCounter($objectID, $value) {
		$entry = new ModerationQueue($objectID);
		$editor = new ModerationQueueEditor($entry);
		$editor->updateCounters(array(
			'comments' => $value
		));
		$editor->update(array(
			'lastChangeTime' => TIME_NOW
		));
	}
	
	/**
	 * @see	\wcf\system\comment\manager\ICommentManager::canAdd()
	 */
	public function canAdd($objectID) {
		if (!$this->isAccessible($objectID, true)) {
			return false;
		}
	
		return true;
	}
	
{'fraction_non_alphanumeric': 0.14305829343846804, 'fraction_numerical': 0.004505773021684032, 'mean_word_length': 4.719806763285024, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, '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': '3877464', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1133, 'n_words': 204}