<commit_before><?php
namespace wcf\system\condition\page;
use wcf\data\condition\Condition;
use wcf\data\page\PageCache;
use wcf\data\page\PageNode;
use wcf\data\page\PageNodeTree;
use wcf\system\condition\AbstractMultiSelectCondition;
use wcf\system\condition\AbstractSingleFieldCondition;
use wcf\system\condition\IContentCondition;
use wcf\system\exception\UserInputException;
use wcf\system\request\RequestHandler;

/**
 * Condition implementation for selecting multiple pages.
 * 
 * @author	<NAME>
 * @copyright	2001-2016 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.condition.page
 * @category	Community Framework
 * @since	2.2
 */
class MultiPageCondition extends AbstractMultiSelectCondition implements IContentCondition {
	/**
	 * @inheritDoc
	 */
	protected $fieldName = 'pageIDs';
	
	/**
	 * @inheritDoc
	 */
	protected $label = 'wcf.page.requestedPage';
	
	/**
	 * @inheritDoc
	 */
	protected function getFieldElement() {
		$pageNodes = (new PageNodeTree())->getNodeList();
		
		$fieldElement = '<ul class="scrollableCheckboxList">';
		/** @var PageNode $pageNode */
		foreach ($pageNodes as $pageNode) {
			$fieldElement .= '<li';
			if ($pageNode->getDepth() > 1) {
				$fieldElement .= ' style="padding-left: '.($pageNode->getDepth()*20-20).'px"';
			}
			$fieldElement .= '><label><input type="checkbox" name="'.$this->fieldName.'[]" value="'.$pageNode->pageID.'"';
			if (in_array($pageNode->pageID, $this->fieldValue)) {
				$fieldElement .= ' checked="checked"';
			}
			$fieldElement .= ' />'.$pageNode->name.'</label></li>';
		}
		$fieldElement .= "</ul>";
		
		return $fieldElement;
	}
	
	/**
	 * @inheritDoc<commit_msg>Add missing spaces in page condition box<commit_after><?php
namespace wcf\system\condition\page;
use wcf\data\condition\Condition;
use wcf\data\page\PageCache;
use wcf\data\page\PageNode;
use wcf\data\page\PageNodeTree;
use wcf\system\condition\AbstractMultiSelectCondition;
use wcf\system\condition\AbstractSingleFieldCondition;
use wcf\system\condition\IContentCondition;
use wcf\system\exception\UserInputException;
use wcf\system\request\RequestHandler;

/**
 * Condition implementation for selecting multiple pages.
 * 
 * @author	<NAME>
 * @copyright	2001-2016 WoltLab GmbH
 * @license	GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
 * @package	com.woltlab.wcf
 * @subpackage	system.condition.page
 * @category	Community Framework
 * @since	2.2
 */
class MultiPageCondition extends AbstractMultiSelectCondition implements IContentCondition {
	/**
	 * @inheritDoc
	 */
	protected $fieldName = 'pageIDs';
	
	/**
	 * @inheritDoc
	 */
	protected $label = 'wcf.page.requestedPage';
	
	/**
	 * @inheritDoc
	 */
	protected function getFieldElement() {
		$pageNodes = (new PageNodeTree())->getNodeList();
		
		$fieldElement = '<ul class="scrollableCheckboxList">';
		/** @var PageNode $pageNode */
		foreach ($pageNodes as $pageNode) {
			$fieldElement .= '<li';
			if ($pageNode->getDepth() > 1) {
				$fieldElement .= ' style="padding-left: '.($pageNode->getDepth()*20-20).'px"';
			}
			$fieldElement .= '><label><input type="checkbox" name="'.$this->fieldName.'[]" value="'.$pageNode->pageID.'"';
			if (in_array($pageNode->pageID, $this->fieldValue)) {
				$fieldElement .= ' checked="checked"';
			}
			$fieldElement .= ' /> '.$pageNode->name.'</label></li>';
		}
		$fieldElement .= "</ul>";
		
		return $fieldElement;
	}
	
	/**
	 * @inheritDoc
{'fraction_non_alphanumeric': 0.16487859966120835, 'fraction_numerical': 0.00846979107848673, 'mean_word_length': 4.3844984802431615, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 39, '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': '7490413', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1116, 'n_words': 215}