<commit_before><?php
/**
 * Represents a default news article page type
 *
 * This code is forked from https://gitlab.cwp.govt.nz/cwp/cwp (16/Jul/2014)
 *
 * @author  <EMAIL>
 * @license BSD License (http://silverstripe.org/bsd-license/)
 * @package datedupdates
 */
class NewsPage extends DatedUpdatePage {

	private static $description = 'A generic news article';

	private static $default_parent = 'NewsHolderPage';

	private static $can_be_root = false;

	private static $icon = 'datedupdates/images/icons/sitetree_images/bell.png';

	public $pageIcon = 'datedupdates/images/icons/sitetree_images/bell.png';

	private static $db = array(
		'Author' => 'Varchar(255)'
	);

	private static $has_one = array(
		'FeaturedImage' => 'Image'
	);

	public function fieldLabels($includerelations = true) {
		$labels = parent::fieldLabels($includerelations);
		$labels['Author'] = _t('DateUpdatePage.AuthorFieldLabel', 'Author');
		$labels['FeaturedImageID'] = _t('DateUpdatePage.FeaturedImageFieldLabel', 'Featured Image');
		return $labels;
	}

	public function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields->addFieldToTab('Root.Main', new DropdownField("ParentID", "Parent News Holder", NewsHolder::get()->map('ID', 'Title')), 'Title');
		$fields->addFieldToTab('Root.Main', new TextField('Author', $this->fieldLabel('Author')), 'Abstract');
		$fields->addFieldToTab('Root.Main', new UploadField('FeaturedImage', $this->fieldLabel('FeaturedImageID')), 'Abstract');
		return $fields;
	}
}

class NewsPage_Controller extends DatedUpdatePage_Controller {

	/**
	 * @var array $allowed_actions The list of functions that are public scoped url segments in this controller.
	 */
	private static $allowed_actions = array(
	);

	/**
	 * Initialise the controller
	 */
	public function init() {
	}
}<commit_msg>FIX: Added missing call to parent::init()<commit_after><?php
/**
 * Represents a default news article page type
 *
 * This code is forked from https://gitlab.cwp.govt.nz/cwp/cwp (16/Jul/2014)
 *
 * @author  <EMAIL>
 * @license BSD License (http://silverstripe.org/bsd-license/)
 * @package datedupdates
 */
class NewsPage extends DatedUpdatePage {

	private static $description = 'A generic news article';

	private static $default_parent = 'NewsHolderPage';

	private static $can_be_root = false;

	private static $icon = 'datedupdates/images/icons/sitetree_images/bell.png';

	public $pageIcon = 'datedupdates/images/icons/sitetree_images/bell.png';

	private static $db = array(
		'Author' => 'Varchar(255)'
	);

	private static $has_one = array(
		'FeaturedImage' => 'Image'
	);

	public function fieldLabels($includerelations = true) {
		$labels = parent::fieldLabels($includerelations);
		$labels['Author'] = _t('DateUpdatePage.AuthorFieldLabel', 'Author');
		$labels['FeaturedImageID'] = _t('DateUpdatePage.FeaturedImageFieldLabel', 'Featured Image');
		return $labels;
	}

	public function getCMSFields() {
		$fields = parent::getCMSFields();
		$fields->addFieldToTab('Root.Main', new DropdownField("ParentID", "Parent News Holder", NewsHolder::get()->map('ID', 'Title')), 'Title');
		$fields->addFieldToTab('Root.Main', new TextField('Author', $this->fieldLabel('Author')), 'Abstract');
		$fields->addFieldToTab('Root.Main', new UploadField('FeaturedImage', $this->fieldLabel('FeaturedImageID')), 'Abstract');
		return $fields;
	}
}

class NewsPage_Controller extends DatedUpdatePage_Controller {

	/**
	 * @var array $allowed_actions The list of functions that are public scoped url segments in this controller.
	 */
	private static $allowed_actions = array(
	);

	/**
	 * Initialise the controller
	 */
	public function init() {
		parent::init();
	}
}
{'fraction_non_alphanumeric': 0.1500815660685155, 'fraction_numerical': 0.004893964110929853, 'mean_word_length': 5.310463121783877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, 'https://': 2, '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': '1020974', 'n_tokens_mistral': 1222, 'n_tokens_neox': 1134, 'n_words': 270}