@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | static $dirs = []; |
| 42 | 42 | $liste = []; |
| 43 | 43 | foreach (creer_chemin() as $dir) { |
| 44 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 44 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 45 | 45 | $dirs[$a] = (is_dir($a) || !$a); |
| 46 | 46 | } |
| 47 | 47 | if ($dirs[$a]) { |
@@ -67,21 +67,21 @@ discard block |
||
| 67 | 67 | **/ |
| 68 | 68 | function chercher_module_lang($module, $lang = '') { |
| 69 | 69 | if ($lang) { |
| 70 | - $lang = '_' . $lang; |
|
| 70 | + $lang = '_'.$lang; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | // 1) dans un repertoire nomme lang/ se trouvant sur le chemin |
| 74 | 74 | if ( |
| 75 | 75 | $f = ($module == 'local' |
| 76 | - ? find_in_path($module . $lang . '.php', 'lang/') |
|
| 77 | - : find_langs_in_path($module . $lang . '.php', 'lang/')) |
|
| 76 | + ? find_in_path($module.$lang.'.php', 'lang/') |
|
| 77 | + : find_langs_in_path($module.$lang.'.php', 'lang/')) |
|
| 78 | 78 | ) { |
| 79 | 79 | return is_array($f) ? $f : [$f]; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // 2) directement dans le chemin (old style, uniquement pour local) |
| 83 | 83 | return (($module == 'local') or strpos($module, '/')) |
| 84 | - ? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false) |
|
| 84 | + ? (($f = find_in_path($module.$lang.'.php')) ? [$f] : false) |
|
| 85 | 85 | : false; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | **/ |
| 106 | 106 | function charger_langue($lang, $module = 'spip') { |
| 107 | 107 | static $langs = []; |
| 108 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 108 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 109 | 109 | if (!isset($langs[$lang])) { |
| 110 | 110 | $langs[$lang] = []; |
| 111 | 111 | if ($lang) { |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | foreach ($langs[$lang] as $l) { |
| 122 | 122 | if ($fichiers_lang = chercher_module_lang($module, $l)) { |
| 123 | - $GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l; |
|
| 123 | + $GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$l; |
|
| 124 | 124 | include(array_shift($fichiers_lang)); |
| 125 | 125 | surcharger_langue($fichiers_lang); |
| 126 | 126 | if ($l !== $lang) { |
| 127 | - $GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l]; |
|
| 127 | + $GLOBALS[$var] = &$GLOBALS['i18n_'.$module.'_'.$l]; |
|
| 128 | 128 | } |
| 129 | - $GLOBALS['lang_' . $var] = $l; |
|
| 129 | + $GLOBALS['lang_'.$var] = $l; |
|
| 130 | 130 | #spip_log("module de langue : ${module}_$l.php", 'traduire'); |
| 131 | 131 | break; |
| 132 | 132 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | foreach ($fichiers as $fichier) { |
| 165 | 165 | if (!isset($surcharges[$fichier])) { |
| 166 | 166 | $idx_lang_normal = $GLOBALS['idx_lang']; |
| 167 | - $GLOBALS['idx_lang'] = $GLOBALS['idx_lang'] . '@temporaire'; |
|
| 167 | + $GLOBALS['idx_lang'] = $GLOBALS['idx_lang'].'@temporaire'; |
|
| 168 | 168 | include($fichier); |
| 169 | 169 | $surcharges[$fichier] = $GLOBALS[$GLOBALS['idx_lang']]; |
| 170 | 170 | unset($GLOBALS[$GLOBALS['idx_lang']]); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | if (is_array($surcharges[$fichier])) { |
| 174 | 174 | $GLOBALS[$GLOBALS['idx_lang']] = array_merge( |
| 175 | - (isset($GLOBALS[$GLOBALS['idx_lang']]) ? (array)$GLOBALS[$GLOBALS['idx_lang']] : []), |
|
| 175 | + (isset($GLOBALS[$GLOBALS['idx_lang']]) ? (array) $GLOBALS[$GLOBALS['idx_lang']] : []), |
|
| 176 | 176 | $surcharges[$fichier] |
| 177 | 177 | ); |
| 178 | 178 | } |
@@ -250,27 +250,27 @@ discard block |
||
| 250 | 250 | } else { |
| 251 | 251 | $modules = ['spip', 'ecrire']; |
| 252 | 252 | $code = $ori; |
| 253 | - $ori_complet = implode('|', $modules) . ':' . $ori; |
|
| 253 | + $ori_complet = implode('|', $modules).':'.$ori; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | $desc = new SPIP_Traductions_Description(); |
| 257 | 257 | |
| 258 | 258 | // parcourir tous les modules jusqu'a ce qu'on trouve |
| 259 | 259 | foreach ($modules as $module) { |
| 260 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 260 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 261 | 261 | |
| 262 | 262 | if (empty($GLOBALS[$var])) { |
| 263 | 263 | charger_langue($lang, $module); |
| 264 | 264 | // surcharges persos -- on cherche |
| 265 | 265 | // (lang/)local_xx.php et/ou (lang/)local.php ... |
| 266 | - if (!isset($local['local_' . $lang])) { |
|
| 266 | + if (!isset($local['local_'.$lang])) { |
|
| 267 | 267 | // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer) |
| 268 | 268 | $GLOBALS['idx_lang'] = $var; |
| 269 | 269 | // ... (lang/)local_xx.php |
| 270 | - $local['local_' . $lang] = chercher_module_lang('local', $lang); |
|
| 270 | + $local['local_'.$lang] = chercher_module_lang('local', $lang); |
|
| 271 | 271 | } |
| 272 | - if ($local['local_' . $lang]) { |
|
| 273 | - surcharger_langue($local['local_' . $lang]); |
|
| 272 | + if ($local['local_'.$lang]) { |
|
| 273 | + surcharger_langue($local['local_'.$lang]); |
|
| 274 | 274 | } |
| 275 | 275 | // ... puis (lang/)local.php |
| 276 | 276 | if (!isset($local['local'])) { |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | if (isset($GLOBALS[$var][$code])) { |
| 285 | 285 | $desc->code = $code; |
| 286 | 286 | $desc->module = $module; |
| 287 | - $desc->langue = $GLOBALS['lang_' . $var]; |
|
| 287 | + $desc->langue = $GLOBALS['lang_'.$var]; |
|
| 288 | 288 | $desc->texte = $GLOBALS[$var][$code]; |
| 289 | 289 | break; |
| 290 | 290 | } |
@@ -339,13 +339,13 @@ discard block |
||
| 339 | 339 | if (!$desc->mode and $desc->texte) { |
| 340 | 340 | // ne pas modifier 2 fois l'affichage |
| 341 | 341 | $desc->mode = 'traduction'; |
| 342 | - $classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 342 | + $classe = 'debug-traduction'.($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 343 | 343 | $desc->texte = '<span ' |
| 344 | - . 'lang=' . $desc->langue |
|
| 345 | - . ' class=' . $classe |
|
| 346 | - . ' data-module=' . $desc->module |
|
| 347 | - . ' data-code=' . $desc->code |
|
| 348 | - . ' title=' . $modules . '(' . $desc->langue . ')>' |
|
| 344 | + . 'lang='.$desc->langue |
|
| 345 | + . ' class='.$classe |
|
| 346 | + . ' data-module='.$desc->module |
|
| 347 | + . ' data-code='.$desc->code |
|
| 348 | + . ' title='.$modules.'('.$desc->langue.')>' |
|
| 349 | 349 | . $desc->texte |
| 350 | 350 | . '</span>'; |
| 351 | 351 | $desc->texte = str_replace( |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | 'cpf_dom' => 'Kreyòl', |
| 51 | 51 | 'cpf_hat' => 'Kreyòl (Peyi Dayiti)', |
| 52 | 52 | 'cs' => 'čeština', |
| 53 | - 'cy' => 'Cymraeg', # welsh, gallois |
|
| 53 | + 'cy' => 'Cymraeg', # welsh, gallois |
|
| 54 | 54 | 'da' => 'dansk', |
| 55 | 55 | 'de' => 'Deutsch', |
| 56 | 56 | 'dz' => 'Bhutani', |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | 'hi' => 'हिंदी', |
| 93 | 93 | 'hr' => 'hrvatski', |
| 94 | 94 | 'hu' => 'magyar', |
| 95 | - 'hy' => 'Հայերեն',// Arménien |
|
| 95 | + 'hy' => 'Հայերեն', // Arménien |
|
| 96 | 96 | 'ia' => 'Interlingua', |
| 97 | 97 | 'id' => 'Indonesia', |
| 98 | 98 | 'ie' => 'Interlingue', |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'ka' => 'ქართული', |
| 107 | 107 | 'kk' => 'қазақ тілі', // Kazakh |
| 108 | 108 | 'kl' => 'kalaallisut', |
| 109 | - 'km' => 'ភាសាខ្មែរ',// Khmer |
|
| 109 | + 'km' => 'ភាសាខ្មែរ', // Khmer |
|
| 110 | 110 | 'kn' => 'Kannada', |
| 111 | 111 | 'ko' => '한국어', |
| 112 | 112 | 'kok' => 'कोंकणी', |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | 'sh_latn' => 'srpskohrvastski', |
| 177 | 177 | 'sh_cyrl' => 'Српскохрватски', |
| 178 | 178 | 'si' => 'Sinhalese', |
| 179 | - 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | - 'sl' => 'slovenščina', // (Slovenia) |
|
| 179 | + 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | + 'sl' => 'slovenščina', // (Slovenia) |
|
| 181 | 181 | 'sm' => 'Samoan', |
| 182 | 182 | 'sn' => 'Shona', |
| 183 | 183 | 'so' => 'Somali', |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | return $r ? $r : traiter_lien_explicite($ref, $texte, $pour, $connect, $echappe_typo); |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | -define('_EXTRAIRE_LIEN', ',^\s*(?:' . _PROTOCOLES_STD . '):?/?/?\s*$,iS'); |
|
| 105 | +define('_EXTRAIRE_LIEN', ',^\s*(?:'._PROTOCOLES_STD.'):?/?/?\s*$,iS'); |
|
| 106 | 106 | |
| 107 | 107 | // https://code.spip.net/@traiter_lien_explicite |
| 108 | 108 | function traiter_lien_explicite($ref, $texte = '', $pour = 'url', $connect = '', $echappe_typo = true) { |
@@ -119,19 +119,19 @@ discard block |
||
| 119 | 119 | $lien_court = charger_fonction('lien_court', 'inc'); |
| 120 | 120 | $texte = $lien_court($texte); |
| 121 | 121 | if ($echappe_typo) { |
| 122 | - $texte = '<html>' . quote_amp($texte) . '</html>'; |
|
| 122 | + $texte = '<html>'.quote_amp($texte).'</html>'; |
|
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | // petites corrections d'URL |
| 127 | 127 | if (preg_match('/^www\.[^@]+$/S', $lien)) { |
| 128 | - $lien = 'http://' . $lien; |
|
| 128 | + $lien = 'http://'.$lien; |
|
| 129 | 129 | } else { |
| 130 | 130 | if (strpos($lien, '@') && email_valide($lien)) { |
| 131 | 131 | if (!$texte) { |
| 132 | 132 | $texte = $lien; |
| 133 | 133 | } |
| 134 | - $lien = 'mailto:' . $lien; |
|
| 134 | + $lien = 'mailto:'.$lien; |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | function liens_implicite_glose_dist($texte, $id, $type, $args, $ancre, $connect = '') { |
| 150 | - if (function_exists($f = 'glossaire_' . $ancre)) { |
|
| 150 | + if (function_exists($f = 'glossaire_'.$ancre)) { |
|
| 151 | 151 | $url = $f($texte, $id); |
| 152 | 152 | } else { |
| 153 | 153 | $url = glossaire_std($texte); |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | if (!($match = typer_raccourci($ref))) { |
| 162 | 162 | return false; |
| 163 | 163 | } |
| 164 | - @list($type, , $id, , $args, , $ancre) = $match; |
|
| 164 | + @list($type,, $id,, $args,, $ancre) = $match; |
|
| 165 | 165 | // attention dans le cas des sites le lien doit pointer non pas sur |
| 166 | 166 | // la page locale du site, mais directement sur le site lui-meme |
| 167 | 167 | if ($f = charger_fonction("implicite_$type", 'liens', true)) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $r['titre'] = $texte; |
| 189 | 189 | } |
| 190 | 190 | if (!@$r['titre']) { |
| 191 | - $r['titre'] = _T($type) . " $id"; |
|
| 191 | + $r['titre'] = _T($type)." $id"; |
|
| 192 | 192 | } |
| 193 | 193 | if ($pour == 'titre') { |
| 194 | 194 | return $r['titre']; |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | and $mime = sql_getfetsel( |
| 202 | 202 | 'mime_type', |
| 203 | 203 | 'spip_types_documents', |
| 204 | - 'extension IN (' . sql_get_select('extension', 'spip_documents', 'id_document=' . sql_quote($id)) . ')', |
|
| 204 | + 'extension IN ('.sql_get_select('extension', 'spip_documents', 'id_document='.sql_quote($id)).')', |
|
| 205 | 205 | '', |
| 206 | 206 | '', |
| 207 | 207 | '', |
@@ -304,11 +304,11 @@ discard block |
||
| 304 | 304 | '(<([a-z_-]{3,})' # <modele |
| 305 | 305 | . '\s*([0-9]*)\s*' # id |
| 306 | 306 | . '([|](?:<[^<>]*>|[^>])*?)?' # |arguments (y compris des tags <...>) |
| 307 | - . '\s*/?' . '>)' # fin du modele > |
|
| 307 | + . '\s*/?'.'>)' # fin du modele > |
|
| 308 | 308 | . '\s*(<\/a>)?' # eventuel </a> |
| 309 | 309 | ); |
| 310 | 310 | |
| 311 | -define('_RACCOURCI_MODELE_DEBUT', '@^' . _RACCOURCI_MODELE . '@isS'); |
|
| 311 | +define('_RACCOURCI_MODELE_DEBUT', '@^'._RACCOURCI_MODELE.'@isS'); |
|
| 312 | 312 | |
| 313 | 313 | // https://code.spip.net/@traiter_modeles |
| 314 | 314 | function traiter_modeles($texte, $doublons = false, $echap = '', $connect = '', $liens = null, $env = []) { |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | if (test_espace_prive()) { |
| 389 | 389 | $modele = entites_html(substr($texte, $a, $cherche)); |
| 390 | 390 | if (!is_null($liens)) { |
| 391 | - $modele = '<pre>' . str_replace($liens[0], $liens[1], $modele) . '</pre>'; |
|
| 391 | + $modele = '<pre>'.str_replace($liens[0], $liens[1], $modele).'</pre>'; |
|
| 392 | 392 | } |
| 393 | 393 | } |
| 394 | 394 | } |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | if (strncmp($url, 'configurer_', 11) == 0) { |
| 336 | 336 | $deja[$url] = $b; |
| 337 | 337 | } elseif ($b['url'] == 'configurer' and preg_match(',cfg=([a-z0-9_]+),i', $b['args'], $match)) { |
| 338 | - $deja['configurer_' . $match[1]] = $b; |
|
| 338 | + $deja['configurer_'.$match[1]] = $b; |
|
| 339 | 339 | } |
| 340 | 340 | } |
| 341 | 341 | } |
@@ -348,10 +348,10 @@ discard block |
||
| 348 | 348 | |
| 349 | 349 | // trouver toutes les pages configurer_xxx de l'espace prive |
| 350 | 350 | // et construire un tableau des entrees qui ne sont pas dans $deja |
| 351 | - $pages = find_all_in_path('prive/squelettes/contenu/', 'configurer_.*[.]' . _EXTENSION_SQUELETTES . '$'); |
|
| 351 | + $pages = find_all_in_path('prive/squelettes/contenu/', 'configurer_.*[.]'._EXTENSION_SQUELETTES.'$'); |
|
| 352 | 352 | |
| 353 | 353 | foreach ($pages as $page) { |
| 354 | - $configurer = basename($page, '.' . _EXTENSION_SQUELETTES); |
|
| 354 | + $configurer = basename($page, '.'._EXTENSION_SQUELETTES); |
|
| 355 | 355 | if (!isset($exclure[$configurer])) { |
| 356 | 356 | $liste[$configurer] = [ |
| 357 | 357 | 'parent' => 'bando_configuration', |
@@ -371,9 +371,9 @@ discard block |
||
| 371 | 371 | |
| 372 | 372 | // trouver tous les formulaires/configurer_ |
| 373 | 373 | // et construire un tableau des entrees |
| 374 | - $pages = find_all_in_path('formulaires/', 'configurer_.*[.]' . _EXTENSION_SQUELETTES . '$'); |
|
| 374 | + $pages = find_all_in_path('formulaires/', 'configurer_.*[.]'._EXTENSION_SQUELETTES.'$'); |
|
| 375 | 375 | foreach ($pages as $page) { |
| 376 | - $configurer = basename($page, '.' . _EXTENSION_SQUELETTES); |
|
| 376 | + $configurer = basename($page, '.'._EXTENSION_SQUELETTES); |
|
| 377 | 377 | if ( |
| 378 | 378 | !isset($forms[$configurer]) |
| 379 | 379 | and !isset($liste[$configurer]) |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | $liste[$configurer] = [ |
| 383 | 383 | 'parent' => 'bando_configuration', |
| 384 | 384 | 'url' => 'configurer', |
| 385 | - 'args' => 'cfg=' . substr($configurer, 11), |
|
| 385 | + 'args' => 'cfg='.substr($configurer, 11), |
|
| 386 | 386 | 'titre' => _T("configurer:{$configurer}_titre"), |
| 387 | 387 | 'icone' => find_in_theme($i = "images/{$configurer}-16.png") ? $i : $icone_defaut, |
| 388 | 388 | ]; |
@@ -414,8 +414,8 @@ discard block |
||
| 414 | 414 | |
| 415 | 415 | // evaluer le fond en lui passant un exec coherent pour que les pipelines le reconnaissent |
| 416 | 416 | // et reperer les formulaires CVT configurer_xx insereres par les plugins via pipeline |
| 417 | - $config = basename(substr($file, 0, -strlen('.' . _EXTENSION_SQUELETTES))); |
|
| 418 | - spip_log('Calcul de ' . "prive/squelettes/contenu/$config"); |
|
| 417 | + $config = basename(substr($file, 0, -strlen('.'._EXTENSION_SQUELETTES))); |
|
| 418 | + spip_log('Calcul de '."prive/squelettes/contenu/$config"); |
|
| 419 | 419 | $fond = recuperer_fond("prive/squelettes/contenu/$config", ['exec' => $config]); |
| 420 | 420 | |
| 421 | 421 | // passer dans le pipeline affiche_milieu pour que les plugins puissent ajouter leur formulaires... |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $n = 0; |
| 46 | 46 | $time = isset($GLOBALS['meta']['cache_mark']) ? $GLOBALS['meta']['cache_mark'] : 0; |
| 47 | 47 | for ($i = 0; $i < 256; $i++) { |
| 48 | - $dir = _DIR_CACHE . sprintf('%02s', dechex($i)); |
|
| 48 | + $dir = _DIR_CACHE.sprintf('%02s', dechex($i)); |
|
| 49 | 49 | if (@is_dir($dir) and is_readable($dir) and $d = opendir($dir)) { |
| 50 | 50 | while (($f = readdir($d)) !== false) { |
| 51 | 51 | if (preg_match(',^[[0-9a-f]+\.cache$,S', $f) and $a = stat("$dir/$f")) { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // stocker la date_modif_$objet (ne sert a rien pour le moment) |
| 104 | 104 | if (isset($objet)) { |
| 105 | - ecrire_meta('derniere_modif_' . $objet, time()); |
|
| 105 | + ecrire_meta('derniere_modif_'.$objet, time()); |
|
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | // si $derniere_modif_invalide est un array('article', 'rubrique') |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | ) |
| 202 | 202 | ) { |
| 203 | 203 | // supprimer le fichier (de facon propre) |
| 204 | - supprimer_fichier(_DIR_CACHE . $cache); |
|
| 204 | + supprimer_fichier(_DIR_CACHE.$cache); |
|
| 205 | 205 | } else { |
| 206 | 206 | spip_log("Nom de fichier cache incorrect : $cache"); |
| 207 | 207 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | $arg = parametre_url($url_action, 'arg'); |
| 94 | - $confirm = md5("$action:$arg:" . realpath(__FILE__)); |
|
| 94 | + $confirm = md5("$action:$arg:".realpath(__FILE__)); |
|
| 95 | 95 | if (_request('confirm_action') === $confirm) { |
| 96 | 96 | return true; |
| 97 | 97 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } else { |
| 146 | 146 | return generer_url_action( |
| 147 | 147 | $action, |
| 148 | - 'arg=' . rawurlencode($arg) . "&hash=$hash" . (!$r ? '' : "&redirect=$r"), |
|
| 148 | + 'arg='.rawurlencode($arg)."&hash=$hash".(!$r ? '' : "&redirect=$r"), |
|
| 149 | 149 | $mode, |
| 150 | 150 | $public |
| 151 | 151 | ); |
@@ -156,9 +156,9 @@ discard block |
||
| 156 | 156 | $hash = calculer_action_auteur("$action-$arg"); |
| 157 | 157 | $att .= " style='margin: 0px; border: 0px'"; |
| 158 | 158 | if ($redirect) { |
| 159 | - $redirect = "\n\t\t<input name='redirect' type='hidden' value='" . str_replace("'", ''', $redirect) . "' />"; |
|
| 159 | + $redirect = "\n\t\t<input name='redirect' type='hidden' value='".str_replace("'", ''', $redirect)."' />"; |
|
| 160 | 160 | } |
| 161 | - $mode .= $redirect . " |
|
| 161 | + $mode .= $redirect." |
|
| 162 | 162 | <input name='hash' type='hidden' value='$hash' /> |
| 163 | 163 | <input name='arg' type='hidden' value='$arg' />"; |
| 164 | 164 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | */ |
| 230 | 230 | function _action_auteur($action, $id_auteur, $pass, $alea) { |
| 231 | 231 | static $sha = []; |
| 232 | - if (!isset($sha[$id_auteur . $pass . $alea])) { |
|
| 232 | + if (!isset($sha[$id_auteur.$pass.$alea])) { |
|
| 233 | 233 | if (!isset($GLOBALS['meta'][$alea])) { |
| 234 | 234 | if (!$exec = _request('exec') or !autoriser_sans_cookie($exec)) { |
| 235 | 235 | include_spip('inc/acces'); |
@@ -243,12 +243,12 @@ discard block |
||
| 243 | 243 | } |
| 244 | 244 | } |
| 245 | 245 | include_spip('auth/sha256.inc'); |
| 246 | - $sha[$id_auteur . $pass . $alea] = spip_sha256($id_auteur . $pass . @$GLOBALS['meta'][$alea]); |
|
| 246 | + $sha[$id_auteur.$pass.$alea] = spip_sha256($id_auteur.$pass.@$GLOBALS['meta'][$alea]); |
|
| 247 | 247 | } |
| 248 | 248 | if (function_exists('sha1')) { |
| 249 | - return sha1($action . $sha[$id_auteur . $pass . $alea]); |
|
| 249 | + return sha1($action.$sha[$id_auteur.$pass.$alea]); |
|
| 250 | 250 | } else { |
| 251 | - return md5($action . $sha[$id_auteur . $pass . $alea]); |
|
| 251 | + return md5($action.$sha[$id_auteur.$pass.$alea]); |
|
| 252 | 252 | } |
| 253 | 253 | } |
| 254 | 254 | |
@@ -332,9 +332,9 @@ discard block |
||
| 332 | 332 | */ |
| 333 | 333 | function calculer_cle_action($action) { |
| 334 | 334 | if (function_exists('sha1')) { |
| 335 | - return sha1($action . secret_du_site()); |
|
| 335 | + return sha1($action.secret_du_site()); |
|
| 336 | 336 | } else { |
| 337 | - return md5($action . secret_du_site()); |
|
| 337 | + return md5($action.secret_du_site()); |
|
| 338 | 338 | } |
| 339 | 339 | } |
| 340 | 340 | |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | // On nettoie l’URL de tous les var_. |
| 375 | 375 | $url = nettoyer_uri_var($url); |
| 376 | 376 | |
| 377 | - $token = _action_auteur('previsualiser-' . $url, $id_auteur, null, $alea); |
|
| 377 | + $token = _action_auteur('previsualiser-'.$url, $id_auteur, null, $alea); |
|
| 378 | 378 | return "$id_auteur-$token"; |
| 379 | 379 | } |
| 380 | 380 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | if ($objet == 'rubrique') { |
| 117 | 117 | // si c'est une rubrique-secteur contenant des breves, demander la |
| 118 | 118 | // confirmation du deplacement |
| 119 | - $contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet)); |
|
| 119 | + $contient_breves = sql_countsel('spip_breves', 'id_rubrique='.intval($id_objet)); |
|
| 120 | 120 | |
| 121 | 121 | if ($contient_breves > 0) { |
| 122 | 122 | $scb = ($contient_breves > 1 ? 's' : ''); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | ); |
| 130 | 130 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 131 | 131 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 132 | - . $scb . |
|
| 132 | + . $scb. |
|
| 133 | 133 | "</label></div></div>\n"; |
| 134 | 134 | } else { |
| 135 | 135 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -138,11 +138,11 @@ discard block |
||
| 138 | 138 | $form .= $confirm; |
| 139 | 139 | if ($actionable) { |
| 140 | 140 | if (strpos($form, '<select') !== false) { |
| 141 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 142 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 141 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 142 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 143 | 143 | . '</div>'; |
| 144 | 144 | } |
| 145 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 145 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 146 | 146 | if ($action = charger_fonction("editer_$objet", 'action', true)) { |
| 147 | 147 | $form = generer_action_auteur( |
| 148 | 148 | "editer_$objet", |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | |
| 169 | 169 | include_spip('inc/presentation'); |
| 170 | 170 | |
| 171 | - return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur(true); |
|
| 171 | + return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur(true); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | |
@@ -244,7 +244,7 @@ discard block |
||
| 244 | 244 | if ($statut == 'nouveau') { |
| 245 | 245 | if ($attente) { |
| 246 | 246 | $statut = $attente; |
| 247 | - $plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')'; |
|
| 247 | + $plus = ' ('._T('info_statut_auteur_a_confirmer').')'; |
|
| 248 | 248 | } else { |
| 249 | 249 | return _T('info_statut_auteur_a_confirmer'); |
| 250 | 250 | } |
@@ -257,16 +257,16 @@ discard block |
||
| 257 | 257 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 258 | 258 | ]; |
| 259 | 259 | if (isset($recom[$statut])) { |
| 260 | - return $recom[$statut] . $plus; |
|
| 260 | + return $recom[$statut].$plus; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | 263 | // retrouver directement par le statut sinon |
| 264 | 264 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 265 | 265 | if (isset($recom[$t])) { |
| 266 | - return $recom[$t] . $plus; |
|
| 266 | + return $recom[$t].$plus; |
|
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - return _T($t) . $plus; |
|
| 269 | + return _T($t).$plus; |
|
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 391 | 391 | $in = !count($GLOBALS['connect_id_rubrique']) |
| 392 | 392 | ? '' |
| 393 | - : (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 393 | + : (' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 394 | 394 | |
| 395 | 395 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
| 396 | 396 | if ($objet == 'rubrique') { |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | return ''; |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | - return propre('[->' . $virtuel . ']'); |
|
| 427 | + return propre('[->'.$virtuel.']'); |
|
| 428 | 428 | } |
| 429 | 429 | |
| 430 | 430 | |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | $args = param_low_sec($op, $args, $lang, 'rss'); |
| 453 | 453 | $url = generer_url_public('rss', $args); |
| 454 | 454 | |
| 455 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 455 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | ); |
| 529 | 529 | |
| 530 | 530 | if ($alertes = array_filter($alertes)) { |
| 531 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 531 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 532 | 532 | join(' | ', $alertes) |
| 533 | 533 | . '</div></div>'; |
| 534 | 534 | } |
@@ -562,13 +562,13 @@ discard block |
||
| 562 | 562 | */ |
| 563 | 563 | function afficher_plus_info($lien, $titre = '+', $titre_lien = '') { |
| 564 | 564 | $titre = attribut_html($titre); |
| 565 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 566 | - http_img_pack('information-16.png', $titre) . '</a>'; |
|
| 565 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 566 | + http_img_pack('information-16.png', $titre).'</a>'; |
|
| 567 | 567 | |
| 568 | 568 | if (!$titre_lien) { |
| 569 | 569 | return $icone; |
| 570 | 570 | } else { |
| 571 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 571 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 572 | 572 | } |
| 573 | 573 | } |
| 574 | 574 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | if ($aff_racine) { |
| 56 | 56 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 57 | - $idom3 = $idom . '_selection'; |
|
| 57 | + $idom3 = $idom.'_selection'; |
|
| 58 | 58 | |
| 59 | 59 | $onClick = "jQuery(this).parent().addClass('on');jQuery('#choix_parent_principal .on').removeClass('on'); aff_selection(0, '$idom3', '$info', event);return false;"; |
| 60 | 60 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | ' ' |
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | - $js_func = $do . '_selection_titre'; |
|
| 75 | + $js_func = $do.'_selection_titre'; |
|
| 76 | 76 | $ondbClick = "$js_func('$ondbClick',0,'selection_rubrique','id_parent');"; |
| 77 | 77 | |
| 78 | 78 | $aff_racine = "<div class='petit-item petite-racine item'>" |
@@ -113,12 +113,12 @@ discard block |
||
| 113 | 113 | **/ |
| 114 | 114 | function construire_selectionner_hierarchie($idom, $liste, $racine, $url, $name, $url_init = '') { |
| 115 | 115 | |
| 116 | - $idom1 = $idom . '_champ_recherche'; |
|
| 117 | - $idom2 = $idom . '_principal'; |
|
| 118 | - $idom3 = $idom . '_selection'; |
|
| 119 | - $idom4 = $idom . '_col_1'; |
|
| 120 | - $idom5 = 'img_' . $idom4; |
|
| 121 | - $idom6 = $idom . '_fonc'; |
|
| 116 | + $idom1 = $idom.'_champ_recherche'; |
|
| 117 | + $idom2 = $idom.'_principal'; |
|
| 118 | + $idom3 = $idom.'_selection'; |
|
| 119 | + $idom4 = $idom.'_col_1'; |
|
| 120 | + $idom5 = 'img_'.$idom4; |
|
| 121 | + $idom6 = $idom.'_fonc'; |
|
| 122 | 122 | |
| 123 | 123 | return "<div id='$idom'>" |
| 124 | 124 | . "<a id='$idom6' style='visibility: hidden;'" |
@@ -128,10 +128,10 @@ discard block |
||
| 128 | 128 | . http_img_pack( |
| 129 | 129 | 'loader.svg', |
| 130 | 130 | '', |
| 131 | - "class='loader' style='visibility: hidden;float:" . $GLOBALS['spip_lang_right'] . "' id='$idom5'" |
|
| 131 | + "class='loader' style='visibility: hidden;float:".$GLOBALS['spip_lang_right']."' id='$idom5'" |
|
| 132 | 132 | ) |
| 133 | 133 | . '' |
| 134 | - . "<input style='width: 10em;float:" . $GLOBALS['spip_lang_right'] . ";' type='text' class='text search' id='$idom1' placeholder='" . _T('info_rechercher') . "'" |
|
| 134 | + . "<input style='width: 10em;float:".$GLOBALS['spip_lang_right'].";' type='text' class='text search' id='$idom1' placeholder='"._T('info_rechercher')."'" |
|
| 135 | 135 | // eliminer Return car il provoque la soumission (balise unique) |
| 136 | 136 | // et eliminer Tab pour la navigation au clavier |
| 137 | 137 | // ce serait encore mieux de ne le faire que s'il y a encore plusieurs |
@@ -178,8 +178,8 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | $liste = $id_rubrique; |
| 180 | 180 | $id_rubrique = intval($id_rubrique); |
| 181 | - while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = ' . $id_rubrique)) { |
|
| 182 | - $liste = $id_rubrique . ",$liste"; |
|
| 181 | + while ($id_rubrique = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique = '.$id_rubrique)) { |
|
| 182 | + $liste = $id_rubrique.",$liste"; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | return explode(',', "0,$liste"); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | if ($notification = charger_fonction($quoi, 'notifications', true)) { |
| 41 | 41 | spip_log("$notification($quoi,$id" |
| 42 | - . ($options ? ',' . serialize($options) : '') |
|
| 42 | + . ($options ? ','.serialize($options) : '') |
|
| 43 | 43 | . ')', 'notifications'); |
| 44 | 44 | $notification($quoi, $id, $options); |
| 45 | 45 | } |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | |
| 158 | 158 | job_queue_add( |
| 159 | 159 | 'envoyer_mail', |
| 160 | - ">$email : " . $envoi['sujet'], |
|
| 160 | + ">$email : ".$envoi['sujet'], |
|
| 161 | 161 | [$email, $envoi['sujet'], $envoi['texte'], $envoi['from'], $envoi['headers']], |
| 162 | 162 | 'inc/' |
| 163 | 163 | ); |