<commit_before><?php
class Module_Page extends Page {
	public $module = null;
	protected function fillVarsByResult($result) {
		parent::fillVarsByResult ( $result );
		$this->module = $result->module;
		$this->text_position = $result->text_position;
	}
	public function save() {
		$retval = null;
		if ($this->id === null) {
			$retval = $this->create ();
			$this->update ();
		} else {
			$retval = $this->update ();
		}
		return $retval;
	}
	public function update() {
		$result = null;
		if ($this->id === null) {
			return $this->create ();
		}
		parent::update ();
		$sql = "update {prefix}content set module = ?, text_position = ? where id = ?";
		$args = array (
				$this->module,
				$this->text_position,
				$this->id 
		);
		
		$result = Database::pQuery ( $sql, $args, true );
		return $result;
	}
	public function containsModule($module = false) {
		$retval = false;
			$retval = true;
		}
		if ($this->module !== null and ! empty ( $this->module )) {
			if (($module and $this->module == $module) or ! $module) {
				$retval = true;
			}
		}
		return $retval;
	}
}<commit_msg>rgrgt<commit_after><?php
class Module_Page extends Page {
	public $module = null;
	protected function fillVarsByResult($result) {
		parent::fillVarsByResult ( $result );
		$this->module = $result->module;
		$this->text_position = $result->text_position;
	}
	public function save() {
		$retval = null;
		if ($this->id === null) {
			$retval = $this->create ();
			$this->update ();
		} else {
			$retval = $this->update ();
		}
		return $retval;
	}
	public function update() {
		$result = null;
		if ($this->id === null) {
			return $this->create ();
		}
		parent::update ();
		$sql = "update {prefix}content set module = ?, text_position = ? where id = ?";
		$args = array (
				$this->module,
				$this->text_position,
				$this->id 
		);
		
		$result = Database::pQuery ( $sql, $args, true );
		return $result;
	}
	public function containsModule($module = false) {
		$retval = false;
		if (parent::containsModule ( $module )) {
			$retval = true;
		}
		if ($this->module !== null and ! empty ( $this->module )) {
			if (($module and $this->module == $module) or ! $module) {
				$retval = true;
			}
		}
		return $retval;
	}
}
{'fraction_non_alphanumeric': 0.1837837837837838, 'fraction_numerical': 0.0, 'mean_word_length': 3.2304761904761903, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 35, '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': '1683053', 'n_tokens_mistral': 861, 'n_tokens_neox': 758, 'n_words': 181}