<commit_before><?php
namespace wcf\system\cronjob;
use wcf\data\cronjob\Cronjob;
use wcf\system\WCF;

/**
 * Unbans users and enables disabled avatars and disabled signatures.
 * 
 * @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.cronjob
 * @category	Community Framework
 */
class UserBanCronjob extends AbstractCronjob {
	/**
	 * @see	\wcf\system\cronjob\ICronjob::execute()
	 */
	public function execute(Cronjob $cronjob) {
		parent::execute($cronjob);
		
		// unban users
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	banned = ?,
				banExpires = ?
			WHERE	banned = ?
				AND banExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			TIME_NOW
		));
		
		// enable avatars
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	disableAvatar = ?,
				disableAvatarExpires = ?
			WHERE	disableAvatar = ?
				AND disableAvatarExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			TIME_NOW
		));
		
		// enable signatures
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	disableSignature = ?,
				disableSignatureExpires = ?
			WHERE	disableSignature = ?
				AND disableSignatureExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			TIME_NOW
		));
	}
}<commit_msg>Fix UserBanCronjob's handling of permanent bans<commit_after><?php
namespace wcf\system\cronjob;
use wcf\data\cronjob\Cronjob;
use wcf\system\WCF;

/**
 * Unbans users and enables disabled avatars and disabled signatures.
 * 
 * @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.cronjob
 * @category	Community Framework
 */
class UserBanCronjob extends AbstractCronjob {
	/**
	 * @see	\wcf\system\cronjob\ICronjob::execute()
	 */
	public function execute(Cronjob $cronjob) {
		parent::execute($cronjob);
		
		// unban users
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	banned = ?,
				banExpires = ?
			WHERE	banned = ?
				AND banExpires <> ?
				AND banExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			0,
			TIME_NOW
		));
		
		// enable avatars
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	disableAvatar = ?,
				disableAvatarExpires = ?
			WHERE	disableAvatar = ?
				AND disableAvatarExpires <> ?
				AND disableAvatarExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			0,
			TIME_NOW
		));
		
		// enable signatures
		$sql = "UPDATE	wcf".WCF_N."_user
			SET	disableSignature = ?,
				disableSignatureExpires = ?
			WHERE	disableSignature = ?
				AND disableSignatureExpires <> ?
				AND disableSignatureExpires <= ?";
		$statement = WCF::getDB()->prepareStatement($sql);
		$statement->execute(array(
			0,
			0,
			1,
			0,
			TIME_NOW
		));
	}
}
{'fraction_non_alphanumeric': 0.1398264223722276, 'fraction_numerical': 0.011893281902925105, 'mean_word_length': 3.3342618384401113, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 22, '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': '938144', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1102, 'n_words': 222}