<commit_before><?php
namespace content_su;

class controller
{
	public static function routing()
	{
		self::_permission();
	}


	public static function _permission()
	{
		// if user is not login then redirect
		if(\dash\url::module() === 'install' && \dash\request::get('time') == 'first_time')
		{
			// turn routing on and allow to check in module
			return false;
		}

		if(!\dash\user::login())
		{
			\dash\redirect::to(\dash\url::kingdom(). '/enter', 'direct');
			return ;
		}

		// Check permission and if user can do this operation
		// allow to do it, else show related message in notify center
		if(\dash\url::isLocal() && false)
		{
			// on tld dev open the su to upgrade for test
		}
		else
		{
			if(\dash\request::get('server') === 'status')
			{
				if(!\dash\permission::supervisor())
				{
					\dash\header::status(403);
				}

				\dash\temp::set('force_stop_visitor', true);
			}
			else
			{
				if(\dash\permission::supervisor(true))
				{
					// the user have permission of su
				}
				else
				{
					\dash\header::status(403);
				}
			}
		}

		// if(\dash\url::subdomain())
		// {
		// 	// remove subdomain
		// 	\dash\redirect::to(\dash\url::site(). \dash\url::path());
		// }
	}
}
?><commit_msg>add desc<commit_after><?php
namespace content_su;

class controller
{
	public static function routing()
	{
		self::_permission();
	}


	public static function _permission()
	{
		// if user is not login then redirect
		if(\dash\url::module() === 'install' && \dash\request::get('time') == 'first_time')
		{
			// turn routing on and allow to check in module
			return false;
		}

		if(!\dash\user::login())
		{
			\dash\redirect::to(\dash\url::kingdom(). '/enter', 'direct');
			return ;
		}

		// Check permission and if user can do this operation
		// allow to do it, else show related message in notify center
		if(\dash\url::isLocal() && false)
		{
			// on tld dev open the su to upgrade for test
		}
		else
		{
			if(\dash\request::get('server') === 'status')
			{
				if(!\dash\permission::supervisor())
				{
					\dash\header::status(403);
				}

				\dash\temp::set('force_stop_visitor', true);
			}
			else
			{
				if(\dash\permission::supervisor(true))
				{
					// the user have permission of su
				}
				else
				{
					\dash\header::status(403);
				}
			}
		}

		// need set parameter, because some project run on subdomain
		// if(\dash\url::subdomain())
		// {
		// 	// remove subdomain
		// 	\dash\redirect::to(\dash\url::site(). \dash\url::path());
		// }
	}
}
?>
{'fraction_non_alphanumeric': 0.17635350318471338, 'fraction_numerical': 0.004777070063694267, 'mean_word_length': 2.57977207977208, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5194075', 'n_tokens_mistral': 1039, 'n_tokens_neox': 847, 'n_words': 200}