Skip to content
Extraits de code Groupes Projets
Valider ab59f05c rédigé par JamesRezo's avatar JamesRezo
Parcourir les fichiers

feat(header_silencieux) : ajout et application du filtre |header_silencieux (#5010)


feat(header_silencieux) : ajout et application du filtre |header_silencieux

Co-authored-by: default avatarJamesRezo <james@rezo.net>
Reviewed-on: https://git.spip.net/spip/spip/pulls/5010


Co-authored-by: default avatarJamesRezo <jamesrezo@noreply.git.spip.net>
Co-committed-by: default avatarJamesRezo <jamesrezo@noreply.git.spip.net>
parent 86a84a7c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -203,6 +203,22 @@ function spip_version() { ...@@ -203,6 +203,22 @@ function spip_version() {
return $version; return $version;
} }
/**
* Masque la version de SPIP si la globale spip_header_silencieux le demande.
*
* @global spip_header_silencieux permet de rendre le header minimal pour raisons de securité
*
* @param string $version
* @return void
*/
function header_silencieux($version) {
if (isset($GLOBALS['spip_header_silencieux']) && (bool) $GLOBALS['spip_header_silencieux']) {
$version = '';
}
return $version;
}
/** /**
* Retourne une courte description d’une révision VCS d’un répertoire * Retourne une courte description d’une révision VCS d’un répertoire
* *
......
...@@ -390,7 +390,7 @@ function balise_SQUELETTE_dist($p) { ...@@ -390,7 +390,7 @@ function balise_SQUELETTE_dist($p) {
* @see spip_version() * @see spip_version()
* @example * @example
* ``` * ```
* <meta name="generator" content="SPIP[ (#SPIP_VERSION)]" /> * [<meta name="generator" content="SPIP (#SPIP_VERSION|header_silencieux)" />]
* ``` * ```
* *
* @param Champ $p * @param Champ $p
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
#INSERT_HEAD #INSERT_HEAD
<script type='text/javascript'> <script type='text/javascript'>
jQuery(function(){jQuery('a#spip_pass').click(function(){window.open(this.href, 'spip_pass', 'scrollbars=yes, resizable=yes, width=480, height=380'); return false;});}); jQuery(function(){jQuery('a#spip_pass').click(function(){window.open(this.href, 'spip_pass', 'scrollbars=yes, resizable=yes, width=480, height=380'); return false;});});
</script> </script>[
<meta name="generator" content="SPIP[ (#SPIP_VERSION)]" /> <meta name="generator" content="SPIP (#SPIP_VERSION|header_silencieux)" />]
#SET{logo,#CHEMIN_IMAGE{#CONST{_DIR_IMG}|concat{spip_fond_login.jpg}}} #SET{logo,#CHEMIN_IMAGE{#CONST{_DIR_IMG}|concat{spip_fond_login.jpg}}}
[(#CONFIG{couleur_login}|oui) [(#CONFIG{couleur_login}|oui)
#SET{hs,#CONFIG{couleur_login}|couleur_hex_to_hsl{"h, s"}} #SET{hs,#CONFIG{couleur_login}|couleur_hex_to_hsl{"h, s"}}
......
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
<link rel="stylesheet" href="[(#VAL{reset.css}|find_in_theme|direction_css)]" type="text/css" /> <link rel="stylesheet" href="[(#VAL{reset.css}|find_in_theme|direction_css)]" type="text/css" />
<link rel="stylesheet" href="[(#VAL{clear.css}|find_in_theme|direction_css)]" type="text/css" /> <link rel="stylesheet" href="[(#VAL{clear.css}|find_in_theme|direction_css)]" type="text/css" />
<link rel="stylesheet" href="[(#VAL{minipres.css}|find_in_theme|direction_css)]" type="text/css" /> <link rel="stylesheet" href="[(#VAL{minipres.css}|find_in_theme|direction_css)]" type="text/css" />
#INSERT_HEAD #INSERT_HEAD[
<meta name="generator" content="SPIP[ (#SPIP_VERSION)]" /> <meta name="generator" content="SPIP (#SPIP_VERSION|header_silencieux)" />]
</head> </head>
<body> <body>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter