<commit_before><?php
namespace wpphpbbu;
class Path{

	static function is_path_ok(){
		return file_exists( get_option( 'wpphpbbu_path', false ).'includes/functions_content.php');
	}

	static function is_url_ok(){
		$url = get_option( 'wpphpbbu_url', false );
		if( filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)){
			return strpos(@get_headers($url)[0],'200') === false ? false : true;
		}
		return false;
	}



	static function login_page() {
		global $phpbb_root_path;
		$page = basename($_SERVER['REQUEST_URI']);
		if( strpos($page,"wp-login.php")!== false && get_option('wpphpbbu_url',false) && !\wpphpbbu\User::is_user_logged_in()
				&& strpos($page,'loggedout') === false ) {
			wp_redirect(get_option('wpphpbbu_url',false) .'ucp.php?mode=login&redirect=' . urlencode(get_bloginfo('home')),301);
			exit;//seriously, when documentation requires this one, it demonstrate how much it suxx
		}
	}


	static function logout_page() {
		global $phpbb_container;
		// we have got the sessions, destroy them all! WP on's are ahndled normally, so we destroy the phpbb one
		//proof that global suxx, user is the WP one at this moment
		$phpbb_container->get('user')->session_kill(false);
		wp_redirect(get_bloginfo('home'));
		exit;//Sorry for anyone trying to plug after this

	}


	/**
	 * Return the administration link for phpBB
	 */
	static function get_admin_link()
	{
		global $auth, $user, $phpbb_root_path, $phpEx;

		if(is_object($auth) && method_exists($auth, 'acl_get') && $auth->acl_get('a_') && $user->data['is_registered'])
		{
			$forum_url = get_option('wppphpbbu_url');
			return $forum_url . 'adm/index.php?sid=' . $user->session_id;
		}
		else
		{
			return '';
		}
	}

<commit_msg>Fixing typo creating a link to the greatest void of the universe<commit_after><?php
namespace wpphpbbu;
class Path{

	static function is_path_ok(){
		return file_exists( get_option( 'wpphpbbu_path', false ).'includes/functions_content.php');
	}

	static function is_url_ok(){
		$url = get_option( 'wpphpbbu_url', false );
		if( filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED)){
			return strpos(@get_headers($url)[0],'200') === false ? false : true;
		}
		return false;
	}



	static function login_page() {
		global $phpbb_root_path;
		$page = basename($_SERVER['REQUEST_URI']);
		if( strpos($page,"wp-login.php")!== false && get_option('wpphpbbu_url',false) && !\wpphpbbu\User::is_user_logged_in()
				&& strpos($page,'loggedout') === false ) {
			wp_redirect(get_option('wpphpbbu_url',false) .'ucp.php?mode=login&redirect=' . urlencode(get_bloginfo('home')),301);
			exit;//seriously, when documentation requires this one, it demonstrate how much it suxx
		}
	}


	static function logout_page() {
		global $phpbb_container;
		// we have got the sessions, destroy them all! WP on's are ahndled normally, so we destroy the phpbb one
		//proof that global suxx, user is the WP one at this moment
		$phpbb_container->get('user')->session_kill(false);
		wp_redirect(get_bloginfo('home'));
		exit;//Sorry for anyone trying to plug after this

	}


	/**
	 * Return the administration link for phpBB
	 */
	static function get_admin_link()
	{
		global $auth, $user, $phpbb_root_path, $phpEx;

		if(is_object($auth) && method_exists($auth, 'acl_get') && $auth->acl_get('a_') && $user->data['is_registered'])
		{
			$forum_url = get_option('wpphpbbu_url');
			return $forum_url . 'adm/index.php?sid=' . $user->session_id;
		}
		else
		{
			return '';
		}
	}


{'fraction_non_alphanumeric': 0.1508892713711991, 'fraction_numerical': 0.004016064257028112, 'mean_word_length': 4.792358803986711, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '4063410', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1228, 'n_words': 279}