<commit_before><?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
 * @class  page
 * @author NAVER (<EMAIL>)
 * @brief high class of the module page
 */
class page extends ModuleObject
{
	/**
	 * @brief Implement if additional tasks are necessary when installing
	 */
	function moduleInstall()
	{
		// page generated from the cache directory to use
		FileHandler::makeDir('./files/cache/page');

		return new Object();
	}

	/**
	 * @brief a method to check if successfully installed
	 */
	function checkUpdate()
	{
		$output = executeQuery('page.pageTypeOpageCheck');
		if($output->toBool() && $output->data) return true;

		$output = executeQuery('page.pageTypeNullCheck');
		if($output->toBool() && $output->data) return true;

		return false;
	}

	/**
	 * @brief Execute update
	 */
	function moduleUpdate()
	{
		$args = new stdClass;
		// opage module instance update
		$output = executeQueryArray('page.pageTypeOpageCheck');
		if($output->toBool() && count($output->data) > 0)
		{
			foreach($output->data as $val)
			{
				$args->module_srl = $val->module_srl;
				$args->name = 'page_type';
				$args->value= 'OUTSIDE';
				$in_out = executeQuery('page.insertPageType', $args);
			}
			$output = executeQuery('page.updateAllOpage');
			if(!$output->toBool()) return $output;
		}

		// old page module instance update
		$output = executeQueryArray('page.pageTypeNullCheck');
		$skin_update_srls = array();
		if($output->toBool() && $output->data)
		{
			foreach($output->data as $val)
			{
				$args->module_srl = $val->module_srl;
				$args->name = 'page_type';
				$args->value= 'WIDGET';
				$in_out = executeQuery('page.insertPageType', $args);

				$skin_update_srls[] = $val->module_srl;
			}
		}

		if(count($skin_update_srls)>0)
		{
			$skin_args->module_srls = implode(',',$skin_update_srls);
			$skin_args->is_skin_fix = "Y";
			$ouput = executeQuery('page.updateSkinFix', $skin_args);
		}
		return new Object(0,'success_updated');
	}

	/**
	 * @brief Re-generate the cache file
	 */
	function recompileCache()
	{
	}
}
/* End of file page.class.php */
/* Location: ./modules/page/page.class.php */<commit_msg>#742 이슈 외 php54 호환성 개선.<commit_after><?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
 * @class  page
 * @author NAVER (<EMAIL>)
 * @brief high class of the module page
 */
class page extends ModuleObject
{
	/**
	 * @brief Implement if additional tasks are necessary when installing
	 */
	function moduleInstall()
	{
		// page generated from the cache directory to use
		FileHandler::makeDir('./files/cache/page');

		return new Object();
	}

	/**
	 * @brief a method to check if successfully installed
	 */
	function checkUpdate()
	{
		$output = executeQuery('page.pageTypeOpageCheck');
		if($output->toBool() && $output->data) return true;

		$output = executeQuery('page.pageTypeNullCheck');
		if($output->toBool() && $output->data) return true;

		return false;
	}

	/**
	 * @brief Execute update
	 */
	function moduleUpdate()
	{
		$args = new stdClass;
		// opage module instance update
		$output = executeQueryArray('page.pageTypeOpageCheck');
		if($output->toBool() && count($output->data) > 0)
		{
			foreach($output->data as $val)
			{
				$args->module_srl = $val->module_srl;
				$args->name = 'page_type';
				$args->value= 'OUTSIDE';
				$in_out = executeQuery('page.insertPageType', $args);
			}
			$output = executeQuery('page.updateAllOpage');
			if(!$output->toBool()) return $output;
		}

		// old page module instance update
		$output = executeQueryArray('page.pageTypeNullCheck');
		$skin_update_srls = array();
		if($output->toBool() && $output->data)
		{
			foreach($output->data as $val)
			{
				$args->module_srl = $val->module_srl;
				$args->name = 'page_type';
				$args->value= 'WIDGET';
				$in_out = executeQuery('page.insertPageType', $args);

				$skin_update_srls[] = $val->module_srl;
			}
		}

		if(count($skin_update_srls)>0)
		{
			$skin_args = new stdClass;
			$skin_args->module_srls = implode(',',$skin_update_srls);
			$skin_args->is_skin_fix = "Y";
			$ouput = executeQuery('page.updateSkinFix', $skin_args);
		}
		return new Object(0,'success_updated');
	}

	/**
	 * @brief Re-generate the cache file
	 */
	function recompileCache()
	{
	}
}
/* End of file page.class.php */
/* Location: ./modules/page/page.class.php */
{'fraction_non_alphanumeric': 0.1699119146963375, 'fraction_numerical': 0.0025498377375985167, 'mean_word_length': 3.7210065645514225, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6858418', 'n_tokens_mistral': 1675, 'n_tokens_neox': 1481, 'n_words': 310}