<commit_before><?php

function isEqual($what,$toWhat){
	return (isset($what) AND isset($toWhat) AND $what == $toWhat ? true : false );
}


function cleanString($string) {
   $utf8 = array(
        '/[0]/u'   =>   'zero',
        '/[1]/u'   =>   'one',
        '/[2]/u'   =>   'two',
        '/[3]/u'   =>   'three',
        '/[4]/u'   =>   'for',
        '/[5]/u'   =>   'five',
        '/[6]/u'   =>   'six',
        '/[7]/u'   =>   'seven',
        '/[8]/u'   =>   'eight',
        '/[9]/u'   =>   'nine',
        '/[áàâãªä]/u'   =>   'a',
        '/[ÁÀÂÃÄ]/u'    =>   'A',
        '/[ÍÌÎÏ]/u'     =>   'I',
        '/[íìîï]/u'     =>   'i',
        '/[éèêë]/u'     =>   'e',
        '/[ÉÈÊË]/u'     =>   'E',
        '/[óòôõºö]/u'   =>   'o',
        '/[ÓÒÔÕÖ]/u'    =>   'O',
        '/[úùûü]/u'     =>   'u',
        '/[ÚÙÛÜ]/u'     =>   'U',
        '/ç/'           =>   'c',
        '/Ç/'           =>   'C',
        '/ñ/'           =>   'n',
        '/Ñ/'           =>   'N',
        '/–/'           =>   '-', // UTF-8 hyphen to "normal" hyphen
        '/[’‘‹›‚]/u'    =>   ' ', // Literally a single quote
        '/[“”«»„]/u'    =>   ' ', // Double quote
        '/ /'           =>   ' ', // nonbreaking space (equiv. to 0x160)
    );
   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
   $string = preg_replace(array_keys($utf8), array_values($utf8), $string);
   return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
}

function drawLead($class, $name, $description,$type,$id,$translation,$lang,$priority = "",$image = "", $caption = ""){
  $admin = "";
	(isset($priority)?: $priority = "");
  if(isLogedNC()){
    $admin = '<a id="editLead" data-type="'.$type.'" data-lang="'.$lang.'" data-cat="'.$id.'" data-priority="'.$priority.'" class="admin">'.$translation['admin_changeLead'].'</a>
    ';
  }
	if(!empty($image)){
		if(!empty($caption)){
			$picture = '<figure><img src="'.$image.'" alt="'.addslashes($caption).'" /><figcaption>'.$caption.'</figcaption></figure>';
		}
		else{
			$picture = '<figure><img src="'.$image.'"/></figure>';
		}
	}
	else{
		$picture = '';
	}
  ?>
  <section id="chapeau" class="<?=$class?>">
    <article class="wrapper">
      <!--<nav id="goLeft"><a href=""><</a></nav>
      <nav id="goRight"><a href="">></a></nav>-->
      <h1><?=$name?></h1>
			<?=$admin?>
      <?=$picture?>
      <h2 class="hyphenate"><?=$description?></h2>
			<div class="clear"></div>
    </article>
  </section>
  <?php
}

function drawCookieTrail($lang = "",$category = "",$subCat = "",$year = "",$month = "",$day = "",$article = ""){
  $echo = "/".$lang."/";
  $echoLink = '/<a href="'.$echo.'">'.$lang.'</a>';
  if(!empty($category)){<commit_msg>Alt text fix<commit_after><?php

function isEqual($what,$toWhat){
	return (isset($what) AND isset($toWhat) AND $what == $toWhat ? true : false );
}


function cleanString($string) {
   $utf8 = array(
        '/[0]/u'   =>   'zero',
        '/[1]/u'   =>   'one',
        '/[2]/u'   =>   'two',
        '/[3]/u'   =>   'three',
        '/[4]/u'   =>   'for',
        '/[5]/u'   =>   'five',
        '/[6]/u'   =>   'six',
        '/[7]/u'   =>   'seven',
        '/[8]/u'   =>   'eight',
        '/[9]/u'   =>   'nine',
        '/[áàâãªä]/u'   =>   'a',
        '/[ÁÀÂÃÄ]/u'    =>   'A',
        '/[ÍÌÎÏ]/u'     =>   'I',
        '/[íìîï]/u'     =>   'i',
        '/[éèêë]/u'     =>   'e',
        '/[ÉÈÊË]/u'     =>   'E',
        '/[óòôõºö]/u'   =>   'o',
        '/[ÓÒÔÕÖ]/u'    =>   'O',
        '/[úùûü]/u'     =>   'u',
        '/[ÚÙÛÜ]/u'     =>   'U',
        '/ç/'           =>   'c',
        '/Ç/'           =>   'C',
        '/ñ/'           =>   'n',
        '/Ñ/'           =>   'N',
        '/–/'           =>   '-', // UTF-8 hyphen to "normal" hyphen
        '/[’‘‹›‚]/u'    =>   ' ', // Literally a single quote
        '/[“”«»„]/u'    =>   ' ', // Double quote
        '/ /'           =>   ' ', // nonbreaking space (equiv. to 0x160)
    );
   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.
   $string = preg_replace(array_keys($utf8), array_values($utf8), $string);
   return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
}

function drawLead($class, $name, $description,$type,$id,$translation,$lang,$priority = "",$image = "", $caption = ""){
  $admin = "";
	(isset($priority)?: $priority = "");
  if(isLogedNC()){
    $admin = '<a id="editLead" data-type="'.$type.'" data-lang="'.$lang.'" data-cat="'.$id.'" data-priority="'.$priority.'" class="admin">'.$translation['admin_changeLead'].'</a>
    ';
  }
	if(!empty($image)){
		if(!empty($caption)){
			$picture = '<figure><img src="'.$image.'" alt="'.htmlentities($caption).'" /><figcaption>'.$caption.'</figcaption></figure>';
		}
		else{
			$picture = '<figure><img src="'.$image.'"/></figure>';
		}
	}
	else{
		$picture = '';
	}
  ?>
  <section id="chapeau" class="<?=$class?>">
    <article class="wrapper">
      <!--<nav id="goLeft"><a href=""><</a></nav>
      <nav id="goRight"><a href="">></a></nav>-->
      <h1><?=$name?></h1>
			<?=$admin?>
      <?=$picture?>
      <h2 class="hyphenate"><?=$description?></h2>
			<div class="clear"></div>
    </article>
  </section>
  <?php
}

function drawCookieTrail($lang = "",$category = "",$subCat = "",$year = "",$month = "",$day = "",$article = ""){
  $echo = "/".$lang."/";
  $echoLink = '/<a href="'.$echo.'">'.$lang.'</a>';
  if(!empty($category)){
{'fraction_non_alphanumeric': 0.29643183897529735, 'fraction_numerical': 0.00878316559926807, 'mean_word_length': 2.0249031543995573, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 135, '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': '5859895', 'n_tokens_mistral': 2112, 'n_tokens_neox': 2127, 'n_words': 339}