Valider 2c991aa0 rédigé par marcimat's avatar marcimat
Parcourir les fichiers

Rector sur Grenier pour PHP 7.4+

parent 45c648fb
Chargement en cours
Chargement en cours
Chargement en cours
Chargement en cours
+5 −4
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -65,7 +65,7 @@ if (!function_exists('fin_cadre_couleur_foncee')) {
	 * @deprecated utiliser boite_fermer()
	 */
	function fin_cadre_couleur_foncee() { 
		return fin_cadre_grenier('couleur-foncee'); 
		return fin_cadre_grenier(); 
	}
}

@@ -78,6 +78,7 @@ if (!function_exists('fin_cadre_couleur_foncee')) {
 * @removed from SPIP 3.2
 */
function debut_cadre_grenier($style, $icone = "", $fonction = "", $titre = "", $id = "", $class = "", $padding = true) {
	$fond = null;
	$style_mapping = array(
		'r' => 'simple',
		'e' => 'raccourcis',
@@ -89,7 +90,7 @@ function debut_cadre_grenier($style, $icone = "", $fonction = "", $titre = "", $
		'sous_rub' => 'simple sous-rub'
	);
	$style_titre_mapping = array('couleur' => 'topper', 'trait-couleur' => 'section');
	$c = isset($style_mapping[$style]) ? $style_mapping[$style] : 'simple';
	$c = $style_mapping[$style] ?? 'simple';
	$class = $c . ($class ? " $class" : "");
	if (!$padding) {
		$class .= ($class ? " " : "") . "no-padding";
@@ -98,7 +99,7 @@ function debut_cadre_grenier($style, $icone = "", $fonction = "", $titre = "", $
	//($id?"id='$id' ":"")
	if (strlen($icone) > 1) {
		if ($icone_renommer = charger_fonction('icone_renommer', 'inc', true)) {
			list($fond, $fonction) = $icone_renommer($icone, $fonction);
			[$fond, $fonction] = $icone_renommer($icone, $fonction);
		}
		$size = 24;
		if (preg_match("/-([0-9]{1,3})[.](gif|png)$/i", $fond, $match)) {
@@ -115,7 +116,7 @@ function debut_cadre_grenier($style, $icone = "", $fonction = "", $titre = "", $
		$titre = $icone . $titre;
	}

	return boite_ouvrir($titre, $class, isset($style_titre_mapping[$style]) ? $style_titre_mapping[$style] : '', $id);
	return boite_ouvrir($titre, $class, $style_titre_mapping[$style] ?? '', $id);
}

/**
+1 −1
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -56,7 +56,7 @@ function balise_LOGIN_PRIVE($p) {
 *   Liste (url, login) des arguments collectés.
 */
function balise_LOGIN_PRIVE_stat($args, $context_compil) {
	return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
	return array($args[1] ?? $args[0], ($args[2] ?? ''));
}

/**
+1 −1
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -58,7 +58,7 @@ function balise_LOGIN_PUBLIC($p, $nom = 'LOGIN_PUBLIC') {
 *   Liste (url, login) des arguments collectés.
 */
function balise_LOGIN_PUBLIC_stat($args, $context_compil) {
	return array(isset($args[1]) ? $args[1] : $args[0], (isset($args[2]) ? $args[2] : ''));
	return array($args[1] ?? $args[0], ($args[2] ?? ''));
}

/**
+3 −3
Numéro de ligne d'origine Numéro de ligne de diff Ligne de diff
@@ -342,7 +342,7 @@ if (!function_exists('lire_meta')) {
 * @return mixed Valeur de la meta.
 **/
function lire_meta($nom) {
	return isset($GLOBALS['meta'][$nom]) ? $GLOBALS['meta'][$nom] : null;
	return $GLOBALS['meta'][$nom] ?? null;
}
}

@@ -540,7 +540,7 @@ function recuperer_lapage(
	$url,
	$trans = false,
	$get = 'GET',
	$taille_max = 1048576,
	$taille_max = 1_048_576,
	$datas = '',
	$refuser_gz = false,
	$date_verif = '',