<commit_before><?php


/**
 * PageTitle ShortCode.
 * 
 * @author <NAME>, w3concepts AG
 * @copyright Copyright &copy; 2010, w3concepts AG
 * 
 * {@id $Id: Class.php 17813 2010-07-29 09:01:04Z akm $}
 */

class Aitsu_Ee_Module_PageTitle_Class extends Aitsu_Ee_Module_Abstract {

	public static function about() {

		return (object) array (
			'name' => 'Page title',
			'description' => Zend_Registry :: get('Zend_Translate')->translate('Returns the page title of the current article.'),
			'type' => 'Header',
			'author' => (object) array (
				'name' => '<NAME>',
				'copyright' => 'w3concepts AG'
			),
			'version' => '1.0.0',
			'status' => 'stable',
			'url' => null,
			'id' => '4ca0a1a5-18b8-45fe-8e37-206f7f000101'
		);
	}

	public static function init($context) {

		Aitsu_Content_Edit :: noEdit('PageTitle', true);
		
		$params = Aitsu_Util :: parseSimpleIni($context['params']);
		
		$prefix = isset($params->prefix) ? $params->prefix : ''; 
		$suffix = isset($params->suffix) ? $params->suffix : ''; 

		$instance = new self();

		$output = '';
		if ($instance->_get('PageTitle', $output)) {
			return $output;
		}

		$pageTitle = Aitsu_Core_Article :: factory()->pagetitle;

		$output =  '<title>' . $prefix . $pageTitle . $suffix . '</title>';
		
		if (Aitsu_Registry :: isEdit()) {
			$output = '<code class="aitsu_params" style="display:none;">' . $context['params'] . '</code>' . $output;
		}

		$instance->_save($output, 'eternal');

		return $output;
	}
}<commit_msg>Removed id from title and changed the translation in the about method.<commit_after><?php


/**
 * @author <NAME>, w3concepts AG
 * @copyright Copyright &copy; 2010, w3concepts AG
 */

class Aitsu_Ee_Module_PageTitle_Class extends Aitsu_Ee_Module_Abstract {

	public static function about() {

		return (object) array (
			'name' => 'Page title',
			'description' => Aitsu_Translate :: translate('Returns the page title of the current article.'),
			'type' => 'Header',
			'author' => (object) array (
				'name' => '<NAME>',
				'copyright' => 'w3concepts AG'
			),
			'version' => '1.0.0',
			'status' => 'stable',
			'url' => null,
			'id' => '4ca0a1a5-18b8-45fe-8e37-206f7f000101'
		);
	}

	public static function init($context) {

		Aitsu_Content_Edit :: noEdit('PageTitle', true);
		
		$params = Aitsu_Util :: parseSimpleIni($context['params']);
		
		$prefix = isset($params->prefix) ? $params->prefix : ''; 
		$suffix = isset($params->suffix) ? $params->suffix : ''; 

		$instance = new self();

		$output = '';
		if ($instance->_get('PageTitle', $output)) {
			return $output;
		}

		$pageTitle = Aitsu_Core_Article :: factory()->pagetitle;

		$output =  '<title>' . $prefix . $pageTitle . $suffix . '</title>';
		
		if (Aitsu_Registry :: isEdit()) {
			$output = '<code class="aitsu_params" style="display:none;">' . $context['params'] . '</code>' . $output;
		}

		$instance->_save($output, 'eternal');

		return $output;
	}
}
{'fraction_non_alphanumeric': 0.19179487179487179, 'fraction_numerical': 0.028376068376068375, 'mean_word_length': 3.8125, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 50, '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': '2224334', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1009, 'n_words': 222}