<commit_before><?php
/*
*/
if (!defined("WIKINI_VERSION"))
{
            die ("acc&egrave;s direct interdit");
}


if ($this->HasAccess("write") && $this->HasAccess("read"))
{
	
	// Edition 
	if ($_POST["submit"] != 'Sauver') {
		
		require_once('tools/hashcash/secret/wp-hashcash.lib');

		// UPDATE RANDOM SECRET
		$curr = @file_get_contents(HASHCASH_SECRET_FILE);
		if(empty($curr) || (time() - @filemtime(HASHCASH_SECRET_FILE)) > HASHCASH_REFRESH) {	
			if (is_writable(HASHCASH_SECRET_FILE)) {
				//update our secret
				$fp = fopen(HASHCASH_SECRET_FILE, 'w');
				fwrite($fp, rand(21474836, 2126008810));
				fclose($fp);
			}
		}
		
		if (substr($this->config['base_url'],0,4)!="http") { // Wakka.config mal configure
			$base_url="http://".$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] != 80 ? ":".$_SERVER["SERVER_PORT"] : "").$_SERVER["REQUEST_URI"].(preg_match("/".preg_quote("wakka.php")."$/", $_SERVER["REQUEST_URI"]) ? "?wiki=" : "");
			$a = parse_url($base_url);
		}
		else {
			$a = parse_url($this->config['base_url']);<commit_msg>Correction Warning sur submit<commit_after><?php
/*
*/
if (!defined("WIKINI_VERSION"))
{
            die ("acc&egrave;s direct interdit");
}


if ($this->HasAccess("write") && $this->HasAccess("read"))
{
	
	// Edition 
	if (isset($_POST["submit"]) && $_POST["submit"] != 'Sauver') {
		
		require_once('tools/hashcash/secret/wp-hashcash.lib');

		// UPDATE RANDOM SECRET
		$curr = @file_get_contents(HASHCASH_SECRET_FILE);
		if(empty($curr) || (time() - @filemtime(HASHCASH_SECRET_FILE)) > HASHCASH_REFRESH) {	
			if (is_writable(HASHCASH_SECRET_FILE)) {
				//update our secret
				$fp = fopen(HASHCASH_SECRET_FILE, 'w');
				fwrite($fp, rand(21474836, 2126008810));
				fclose($fp);
			}
		}
		
		if (substr($this->config['base_url'],0,4)!="http") { // Wakka.config mal configure
			$base_url="http://".$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] != 80 ? ":".$_SERVER["SERVER_PORT"] : "").$_SERVER["REQUEST_URI"].(preg_match("/".preg_quote("wakka.php")."$/", $_SERVER["REQUEST_URI"]) ? "?wiki=" : "");
			$a = parse_url($base_url);
		}
		else {
			$a = parse_url($this->config['base_url']);
{'fraction_non_alphanumeric': 0.22661703117729176, 'fraction_numerical': 0.02047463936714751, 'mean_word_length': 4.598958333333333, 'pattern_counts': {'":': 2, '<': 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': '5987727', 'n_tokens_mistral': 949, 'n_tokens_neox': 823, 'n_words': 107}