@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | |
| 108 | 108 | $titre = ($titre == 'install') |
| 109 | 109 | ? _T('avis_espace_interdit') |
| 110 | - : $titre . ' : ' . _T('info_acces_interdit'); |
|
| 110 | + : $titre.' : '._T('info_acces_interdit'); |
|
| 111 | 111 | |
| 112 | 112 | $statut = $GLOBALS['visiteur_session']['statut'] ?? ''; |
| 113 | 113 | $nom = $GLOBALS['visiteur_session']['nom'] ?? ''; |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | $corps = ""; |
| 130 | - spip_log($nom . " $titre " . $_SERVER['REQUEST_URI'], 'minipres'); |
|
| 130 | + spip_log($nom." $titre ".$_SERVER['REQUEST_URI'], 'minipres'); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $options['footer'] = $footer; |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | foreach ($_POST as $v => $c) { |
| 148 | 148 | $url = parametre_url($url, $v, $c, '&'); |
| 149 | 149 | } |
| 150 | - ajax_retour('<div>' . $titre . redirige_formulaire($url) . '</div>', false); |
|
| 150 | + ajax_retour('<div>'.$titre.redirige_formulaire($url).'</div>', false); |
|
| 151 | 151 | return ''; |
| 152 | 152 | } |
| 153 | 153 | } |
@@ -118,11 +118,9 @@ |
||
| 118 | 118 | |
| 119 | 119 | if ($statut and test_espace_prive()) { |
| 120 | 120 | $footer = bouton_action(_T('public:accueil_site'), generer_url_ecrire('accueil')); |
| 121 | - } |
|
| 122 | - elseif (!empty($_COOKIE['spip_admin'])) { |
|
| 121 | + } elseif (!empty($_COOKIE['spip_admin'])) { |
|
| 123 | 122 | $footer = bouton_action(_T('public:lien_connecter'), generer_url_public('login')); |
| 124 | - } |
|
| 125 | - else { |
|
| 123 | + } else { |
|
| 126 | 124 | $footer = bouton_action(_T('public:accueil_site'), $GLOBALS['meta']['adresse_site']); |
| 127 | 125 | } |
| 128 | 126 | |
@@ -64,17 +64,17 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $page_title = (isset($options['page_title']) ? $options['page_title'] : $GLOBALS['meta']['nom_site']); |
| 66 | 66 | $doctype = (isset($options['doctype']) ? $options['doctype'] : "<!DOCTYPE html>"); |
| 67 | - $doctype = trim($doctype) . "\n"; |
|
| 67 | + $doctype = trim($doctype)."\n"; |
|
| 68 | 68 | $charset = (isset($options['charset']) ? $options['charset'] : "utf-8"); |
| 69 | 69 | $all_inline = (isset($options['all_inline']) ? $options['all_inline'] : true); |
| 70 | 70 | $onLoad = (isset($options['onLoad']) ? $options['onLoad'] : ''); |
| 71 | 71 | if ($onLoad) { |
| 72 | - $onLoad = ' onload="' . attribut_html($onLoad) . '"'; |
|
| 72 | + $onLoad = ' onload="'.attribut_html($onLoad).'"'; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | # envoyer le charset |
| 76 | 76 | if (!headers_sent()) { |
| 77 | - header('Content-Type: text/html; charset=' . $charset); |
|
| 77 | + header('Content-Type: text/html; charset='.$charset); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | $css = ''; |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | . "--minipublic-color-theme--s: $s;" |
| 96 | 96 | . "--minipublic-color-theme--l: $l;}"; |
| 97 | 97 | $vars = file_get_contents(find_in_theme('minipublic.vars.css')); |
| 98 | - $inline .= "\n" . trim($vars); |
|
| 98 | + $inline .= "\n".trim($vars); |
|
| 99 | 99 | if (function_exists('minifier')) { |
| 100 | 100 | $inline = minifier($inline, 'css'); |
| 101 | 101 | } |
@@ -122,31 +122,31 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | $css = "$inline\n$css"; |
| 124 | 124 | if (!empty($options['css'])) { |
| 125 | - $css .= "\n" . $options['css']; |
|
| 125 | + $css .= "\n".$options['css']; |
|
| 126 | 126 | } |
| 127 | 127 | $css = "<style type='text/css'>$css</style>"; |
| 128 | 128 | } else { |
| 129 | 129 | $css = "<style type='text/css'>$inline</style>"; |
| 130 | 130 | foreach ($files as $name) { |
| 131 | 131 | $file = timestamp(direction_css($name)); |
| 132 | - $css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n"; |
|
| 132 | + $css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n"; |
|
| 133 | 133 | } |
| 134 | 134 | if (!empty($options['css'])) { |
| 135 | - $css .= "<style type='text/css'>" . $options['css'] . "</style>"; |
|
| 135 | + $css .= "<style type='text/css'>".$options['css']."</style>"; |
|
| 136 | 136 | } |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | - return $doctype . |
|
| 140 | - html_lang_attributes() . |
|
| 141 | - "<head>\n" . |
|
| 142 | - '<title>' . |
|
| 143 | - textebrut($page_title) . |
|
| 144 | - "</title>\n" . |
|
| 145 | - "<meta name=\"viewport\" content=\"width=device-width\" />\n" . |
|
| 146 | - $css . |
|
| 147 | - (empty($options['head']) ? "" : $options['head']) . |
|
| 148 | - "</head>\n" . |
|
| 149 | - "<body{$onLoad} class=\"minipublic\">\n" . |
|
| 139 | + return $doctype. |
|
| 140 | + html_lang_attributes(). |
|
| 141 | + "<head>\n". |
|
| 142 | + '<title>'. |
|
| 143 | + textebrut($page_title). |
|
| 144 | + "</title>\n". |
|
| 145 | + "<meta name=\"viewport\" content=\"width=device-width\" />\n". |
|
| 146 | + $css. |
|
| 147 | + (empty($options['head']) ? "" : $options['head']). |
|
| 148 | + "</head>\n". |
|
| 149 | + "<body{$onLoad} class=\"minipublic\">\n". |
|
| 150 | 150 | "\t<div class=\"minipublic-bloc\">\n"; |
| 151 | 151 | } |
| 152 | 152 | |
@@ -157,16 +157,16 @@ discard block |
||
| 157 | 157 | */ |
| 158 | 158 | protected function ouvreCorps($options = []) { |
| 159 | 159 | $url_site = url_de_base(); |
| 160 | - $header = "<header>\n" . |
|
| 161 | - "<h1><a href=\"" . attribut_html($url_site) . "\">" . interdire_scripts($GLOBALS['meta']['nom_site']) . "</a></h1>\n"; |
|
| 160 | + $header = "<header>\n". |
|
| 161 | + "<h1><a href=\"".attribut_html($url_site)."\">".interdire_scripts($GLOBALS['meta']['nom_site'])."</a></h1>\n"; |
|
| 162 | 162 | |
| 163 | 163 | $titre = (isset($options['titre']) ? $options['titre'] : ''); |
| 164 | 164 | if ($titre) { |
| 165 | - $header .= "<h2>" . interdire_scripts($titre) . "</h2>"; |
|
| 165 | + $header .= "<h2>".interdire_scripts($titre)."</h2>"; |
|
| 166 | 166 | } |
| 167 | 167 | $header .= "</header>"; |
| 168 | 168 | |
| 169 | - return $header . "<div class='corps'>\n"; |
|
| 169 | + return $header."<div class='corps'>\n"; |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | /** |
@@ -180,13 +180,13 @@ discard block |
||
| 180 | 180 | if (isset($options['footer'])) { |
| 181 | 181 | $footer = $options['footer']; |
| 182 | 182 | } else { |
| 183 | - $footer = "<a href=\"" . attribut_html($url_site) . "\">" . _T('retour') . "</a>\n"; |
|
| 183 | + $footer = "<a href=\"".attribut_html($url_site)."\">"._T('retour')."</a>\n"; |
|
| 184 | 184 | } |
| 185 | 185 | if (!empty($footer)) { |
| 186 | 186 | $footer = "<footer>\n{$footer}</footer>"; |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - return "</div>\n" . $footer; |
|
| 189 | + return "</div>\n".$footer; |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | |