@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | /** l'adresse du repertoire de telechargement et de decompactage des plugins */ |
| 23 | 23 | if (!defined('_DIR_PLUGINS_AUTO')) { |
| 24 | - define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/'); |
|
| 24 | + define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/'); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins. |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | if ($dir) { |
| 379 | 379 | $dir .= '/'; |
| 380 | 380 | } |
| 381 | - $dir .= 'procure:' . $procure['nom']; |
|
| 381 | + $dir .= 'procure:'.$procure['nom']; |
|
| 382 | 382 | |
| 383 | 383 | $procure['etat'] = '?'; |
| 384 | 384 | $procure['dir_type'] = $resume['dir_type']; |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | $plug = $resume['dir']; |
| 559 | 559 | $k = $infos[$dir_type][$plug]; |
| 560 | 560 | |
| 561 | - $plug = constant($dir_type) . $plug; |
|
| 561 | + $plug = constant($dir_type).$plug; |
|
| 562 | 562 | if (!isset($msg[$p])) { |
| 563 | 563 | if (isset($resume['erreur']) && $resume['erreur']) { |
| 564 | 564 | $msg[$p] = [$resume['erreur']]; |
@@ -601,10 +601,10 @@ discard block |
||
| 601 | 601 | $list = $raw ? [] : $GLOBALS['meta']['plugin_erreur_activation']; |
| 602 | 602 | } elseif (!$raw) { |
| 603 | 603 | foreach ($list as $plug => $msg) { |
| 604 | - $list[$plug] = '<li>' . _T('plugin_impossible_activer', ['plugin' => $plug]) |
|
| 605 | - . '<ul><li>' . implode('</li><li>', $msg) . '</li></ul></li>'; |
|
| 604 | + $list[$plug] = '<li>'._T('plugin_impossible_activer', ['plugin' => $plug]) |
|
| 605 | + . '<ul><li>'.implode('</li><li>', $msg).'</li></ul></li>'; |
|
| 606 | 606 | } |
| 607 | - $list = '<ul>' . join("\n", $list) . '</ul>'; |
|
| 607 | + $list = '<ul>'.join("\n", $list).'</ul>'; |
|
| 608 | 608 | } |
| 609 | 609 | if ($raz) { |
| 610 | 610 | effacer_meta('plugin_erreur_activation'); |
@@ -718,13 +718,13 @@ discard block |
||
| 718 | 718 | if ($minimum_inclus && spip_version_compare($version, $minimum, '<')) { |
| 719 | 719 | return _T("plugin_{$balise}_{$type}", [ |
| 720 | 720 | 'plugin' => $nom, |
| 721 | - 'version' => ' ≥ ' . $minimum |
|
| 721 | + 'version' => ' ≥ '.$minimum |
|
| 722 | 722 | ]); |
| 723 | 723 | } |
| 724 | 724 | if (!$minimum_inclus && spip_version_compare($version, $minimum, '<=')) { |
| 725 | 725 | return _T("plugin_{$balise}_{$type}", [ |
| 726 | 726 | 'plugin' => $nom, |
| 727 | - 'version' => ' > ' . $minimum |
|
| 727 | + 'version' => ' > '.$minimum |
|
| 728 | 728 | ]); |
| 729 | 729 | } |
| 730 | 730 | } |
@@ -733,13 +733,13 @@ discard block |
||
| 733 | 733 | if ($maximum_inclus && spip_version_compare($version, $maximum, '>')) { |
| 734 | 734 | return _T("plugin_{$balise}_{$type}", [ |
| 735 | 735 | 'plugin' => $nom, |
| 736 | - 'version' => ' ≤ ' . $maximum |
|
| 736 | + 'version' => ' ≤ '.$maximum |
|
| 737 | 737 | ]); |
| 738 | 738 | } |
| 739 | 739 | if (!$maximum_inclus && spip_version_compare($version, $maximum, '>=')) { |
| 740 | 740 | return _T("plugin_{$balise}_plugin", [ |
| 741 | 741 | 'plugin' => $nom, |
| 742 | - 'version' => ' < ' . $maximum |
|
| 742 | + 'version' => ' < '.$maximum |
|
| 743 | 743 | ]); |
| 744 | 744 | } |
| 745 | 745 | } |
@@ -758,7 +758,7 @@ discard block |
||
| 758 | 758 | include_spip('inc/charger_plugin'); |
| 759 | 759 | $url = '<br />' . bouton_telechargement_plugin($url, 'lib'); |
| 760 | 760 | }*/ |
| 761 | - return _T('plugin_necessite_lib', ['lib' => $lib]) . " <a href='$url'>$url</a>"; |
|
| 761 | + return _T('plugin_necessite_lib', ['lib' => $lib])." <a href='$url'>$url</a>"; |
|
| 762 | 762 | } |
| 763 | 763 | |
| 764 | 764 | |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | foreach ($plugin_valides as $p => $resume) { |
| 858 | 858 | // Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP |
| 859 | 859 | if (!str_starts_with($p, 'PHP:') && $p !== 'PHP') { |
| 860 | - $header[] = $p . ($resume['version'] ? '(' . $resume['version'] . ')' : ''); |
|
| 860 | + $header[] = $p.($resume['version'] ? '('.$resume['version'].')' : ''); |
|
| 861 | 861 | } |
| 862 | 862 | if ($resume['dir']) { |
| 863 | 863 | foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) { |
@@ -882,11 +882,11 @@ discard block |
||
| 882 | 882 | $header = strtolower(implode(',', $header)); |
| 883 | 883 | if (!isset($GLOBALS['spip_header_silencieux']) || !$GLOBALS['spip_header_silencieux']) { |
| 884 | 884 | ecrire_fichier( |
| 885 | - _DIR_VAR . 'config.txt', |
|
| 886 | - (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP') . ' ' . $GLOBALS['spip_version_affichee'] . ' @ www.spip.net + ' . $header |
|
| 885 | + _DIR_VAR.'config.txt', |
|
| 886 | + (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : 'Composed-By: SPIP').' '.$GLOBALS['spip_version_affichee'].' @ www.spip.net + '.$header |
|
| 887 | 887 | ); |
| 888 | 888 | } else { |
| 889 | - @unlink(_DIR_VAR . 'config.txt'); |
|
| 889 | + @unlink(_DIR_VAR.'config.txt'); |
|
| 890 | 890 | } |
| 891 | 891 | // generer charger_plugins_chemin.php |
| 892 | 892 | plugins_precompile_chemin($plugin_valides, $ordre); |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | // definir le plugin, donc le path avant l'include du fichier options |
| 941 | 941 | // permet de faire des include_spip pour attraper un inc_ du plugin |
| 942 | 942 | |
| 943 | - $dir = $dir_type . ".'" . $plug . "/'"; |
|
| 943 | + $dir = $dir_type.".'".$plug."/'"; |
|
| 944 | 944 | |
| 945 | 945 | $prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix'])); |
| 946 | 946 | if ( |
@@ -951,7 +951,7 @@ discard block |
||
| 951 | 951 | if (!$info['chemin']) { |
| 952 | 952 | $chemins['public'][] = "_DIR_PLUGIN_$prefix"; |
| 953 | 953 | $chemins['prive'][] = "_DIR_PLUGIN_$prefix"; |
| 954 | - if (is_dir(constant($dir_type) . $plug . '/squelettes/')) { |
|
| 954 | + if (is_dir(constant($dir_type).$plug.'/squelettes/')) { |
|
| 955 | 955 | $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'"; |
| 956 | 956 | } |
| 957 | 957 | } |
@@ -973,13 +973,13 @@ discard block |
||
| 973 | 973 | $dir = ''; |
| 974 | 974 | } |
| 975 | 975 | if (strlen($dir)) { |
| 976 | - $dir = rtrim($dir, '/') . '/'; |
|
| 976 | + $dir = rtrim($dir, '/').'/'; |
|
| 977 | 977 | } |
| 978 | 978 | if (!isset($chemin['type']) || $chemin['type'] == 'public') { |
| 979 | - $chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ''); |
|
| 979 | + $chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ''); |
|
| 980 | 980 | } |
| 981 | 981 | if (!isset($chemin['type']) || $chemin['type'] == 'prive') { |
| 982 | - $chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ''); |
|
| 982 | + $chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ''); |
|
| 983 | 983 | } |
| 984 | 984 | } |
| 985 | 985 | } |
@@ -988,11 +988,11 @@ discard block |
||
| 988 | 988 | } |
| 989 | 989 | } |
| 990 | 990 | if (count($chemins['public']) || count($chemins['prive'])) { |
| 991 | - $contenu .= 'if (_DIR_RESTREINT) _chemin([' . implode( |
|
| 991 | + $contenu .= 'if (_DIR_RESTREINT) _chemin(['.implode( |
|
| 992 | 992 | ',', |
| 993 | 993 | array_reverse($chemins['public']) |
| 994 | - ) . "]);\n" |
|
| 995 | - . 'else _chemin([' . implode(',', array_reverse($chemins['prive'])) . "]);\n"; |
|
| 994 | + )."]);\n" |
|
| 995 | + . 'else _chemin(['.implode(',', array_reverse($chemins['prive']))."]);\n"; |
|
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu); |
@@ -1041,7 +1041,7 @@ discard block |
||
| 1041 | 1041 | && !str_contains($dir, ':') |
| 1042 | 1042 | && file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml |
| 1043 | 1043 | ) { |
| 1044 | - if (is_readable("$dir$plug/" . ($file = $info['prefix'] . '_' . $charge . '.php'))) { |
|
| 1044 | + if (is_readable("$dir$plug/".($file = $info['prefix'].'_'.$charge.'.php'))) { |
|
| 1045 | 1045 | $info[$charge] = [$file]; |
| 1046 | 1046 | } |
| 1047 | 1047 | } |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | ) { |
| 1057 | 1057 | unset($info[$charge][$k]); |
| 1058 | 1058 | } else { |
| 1059 | - $_file = $root_dir_type . ".'$plug/$file'"; |
|
| 1059 | + $_file = $root_dir_type.".'$plug/$file'"; |
|
| 1060 | 1060 | $contenu[$charge] .= "include_once_check($_file);\n"; |
| 1061 | 1061 | } |
| 1062 | 1062 | } |
@@ -1066,7 +1066,7 @@ discard block |
||
| 1066 | 1066 | } |
| 1067 | 1067 | } |
| 1068 | 1068 | |
| 1069 | - $contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options']; |
|
| 1069 | + $contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options']; |
|
| 1070 | 1070 | $contenu['fonctions'] .= plugin_ongletbouton('boutons_plugins', $boutons) |
| 1071 | 1071 | . plugin_ongletbouton('onglets_plugins', $onglets); |
| 1072 | 1072 | |
@@ -1101,12 +1101,12 @@ discard block |
||
| 1101 | 1101 | define("_UPDATED_$nom", $val); |
| 1102 | 1102 | define("_UPDATED_md5_$nom", $md5); |
| 1103 | 1103 | } |
| 1104 | - $val = "unserialize('" . str_replace("'", "\'", $val) . "')"; |
|
| 1104 | + $val = "unserialize('".str_replace("'", "\'", $val)."')"; |
|
| 1105 | 1105 | |
| 1106 | 1106 | return |
| 1107 | 1107 | "if (!function_exists('$nom')) {\n" |
| 1108 | 1108 | . "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n" |
| 1109 | - . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n" |
|
| 1109 | + . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n" |
|
| 1110 | 1110 | . "}\n"; |
| 1111 | 1111 | } |
| 1112 | 1112 | |
@@ -1129,7 +1129,7 @@ discard block |
||
| 1129 | 1129 | if (@is_readable(_CACHE_PLUGINS_OPT)) { |
| 1130 | 1130 | include_once(_CACHE_PLUGINS_OPT); |
| 1131 | 1131 | } else { |
| 1132 | - spip_log('pipelines desactives: impossible de produire ' . _CACHE_PLUGINS_OPT); |
|
| 1132 | + spip_log('pipelines desactives: impossible de produire '._CACHE_PLUGINS_OPT); |
|
| 1133 | 1133 | } |
| 1134 | 1134 | } |
| 1135 | 1135 | |
@@ -1166,7 +1166,7 @@ discard block |
||
| 1166 | 1166 | $dir_type = $plugin_valides[$p]['dir_type']; |
| 1167 | 1167 | $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type); |
| 1168 | 1168 | $plug = $plugin_valides[$p]['dir']; |
| 1169 | - $prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'] . '_'); |
|
| 1169 | + $prefix = (($info['prefix'] == 'spip') ? '' : $info['prefix'].'_'); |
|
| 1170 | 1170 | if (isset($info['pipeline']) && is_array($info['pipeline'])) { |
| 1171 | 1171 | foreach ($info['pipeline'] as $pipe) { |
| 1172 | 1172 | $nom = $pipe['nom']; |
@@ -1200,7 +1200,7 @@ discard block |
||
| 1200 | 1200 | } |
| 1201 | 1201 | if (isset($pipe['inclure'])) { |
| 1202 | 1202 | $GLOBALS['spip_matrice']["$prefix$action"] = |
| 1203 | - "$root_dir_type:$plug/" . $pipe['inclure']; |
|
| 1203 | + "$root_dir_type:$plug/".$pipe['inclure']; |
|
| 1204 | 1204 | } |
| 1205 | 1205 | } |
| 1206 | 1206 | } |
@@ -1210,7 +1210,7 @@ discard block |
||
| 1210 | 1210 | $prepend_code['taches_generales_cron'] = ''; |
| 1211 | 1211 | } |
| 1212 | 1212 | foreach ($info['genie'] as $genie) { |
| 1213 | - $nom = $prefix . $genie['nom']; |
|
| 1213 | + $nom = $prefix.$genie['nom']; |
|
| 1214 | 1214 | $periode = max(60, intval($genie['periode'])); |
| 1215 | 1215 | if (charger_fonction($nom, 'genie', true)) { |
| 1216 | 1216 | $prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n"; |
@@ -1228,13 +1228,13 @@ discard block |
||
| 1228 | 1228 | } |
| 1229 | 1229 | foreach ($info['style'] as $style) { |
| 1230 | 1230 | if (isset($style['path']) && $style['path']) { |
| 1231 | - $code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) "; |
|
| 1231 | + $code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) "; |
|
| 1232 | 1232 | } else { |
| 1233 | - $code = "if (\$f='" . addslashes($style['url']) . "') "; |
|
| 1233 | + $code = "if (\$f='".addslashes($style['url'])."') "; |
|
| 1234 | 1234 | } |
| 1235 | 1235 | $code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\""; |
| 1236 | 1236 | if (isset($style['media']) && strlen($style['media'])) { |
| 1237 | - $code .= ' media="' . addslashes($style['media']) . '"'; |
|
| 1237 | + $code .= ' media="'.addslashes($style['media']).'"'; |
|
| 1238 | 1238 | } |
| 1239 | 1239 | $code .= "/>';\n"; |
| 1240 | 1240 | if ($style['type'] != 'prive') { |
@@ -1254,9 +1254,9 @@ discard block |
||
| 1254 | 1254 | if (isset($info['script']) && (is_countable($info['script']) ? count($info['script']) : 0)) { |
| 1255 | 1255 | foreach ($info['script'] as $script) { |
| 1256 | 1256 | if (isset($script['path']) && $script['path']) { |
| 1257 | - $code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) "; |
|
| 1257 | + $code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) "; |
|
| 1258 | 1258 | } else { |
| 1259 | - $code = "if (\$f='" . addslashes($script['url']) . "') "; |
|
| 1259 | + $code = "if (\$f='".addslashes($script['url'])."') "; |
|
| 1260 | 1260 | } |
| 1261 | 1261 | $code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n"; |
| 1262 | 1262 | if ($script['type'] != 'prive') { |
@@ -1319,10 +1319,10 @@ discard block |
||
| 1319 | 1319 | unset($GLOBALS['spip_pipeline']['all']); |
| 1320 | 1320 | $all_pipes = trim(array_shift($a)); |
| 1321 | 1321 | if ($all_pipes) { |
| 1322 | - $all_pipes = '|' . ltrim($all_pipes, '|'); |
|
| 1322 | + $all_pipes = '|'.ltrim($all_pipes, '|'); |
|
| 1323 | 1323 | } |
| 1324 | 1324 | if (count($a)) { |
| 1325 | - $all_pipes_end = '||' . array_shift($a); |
|
| 1325 | + $all_pipes_end = '||'.array_shift($a); |
|
| 1326 | 1326 | } |
| 1327 | 1327 | } |
| 1328 | 1328 | $content = ''; |
@@ -1339,7 +1339,7 @@ discard block |
||
| 1339 | 1339 | // Eclater le pipeline en filtres et appliquer chaque filtre |
| 1340 | 1340 | foreach ($pipe as $fonc) { |
| 1341 | 1341 | $fonc = trim($fonc); |
| 1342 | - $s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n"; |
|
| 1342 | + $s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n"; |
|
| 1343 | 1343 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 1344 | 1344 | $file = $GLOBALS['spip_matrice'][$fonc]; |
| 1345 | 1345 | $file = "'$file'"; |
@@ -1350,7 +1350,7 @@ discard block |
||
| 1350 | 1350 | if (defined($root_dir)) { |
| 1351 | 1351 | $dir = $root_dir; |
| 1352 | 1352 | } |
| 1353 | - $file = str_replace($regs[0], "'." . $dir . ".'", $file); |
|
| 1353 | + $file = str_replace($regs[0], "'.".$dir.".'", $file); |
|
| 1354 | 1354 | $file = str_replace("''.", '', $file); |
| 1355 | 1355 | $file = str_replace(constant($dir), '', $file); |
| 1356 | 1356 | } |
@@ -1363,7 +1363,7 @@ discard block |
||
| 1363 | 1363 | $content .= "// Pipeline $action \n" |
| 1364 | 1364 | . "function execute_pipeline_$action(&\$val){\n" |
| 1365 | 1365 | . $s_inc |
| 1366 | - . ((isset($prepend_code[$action]) && strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '') |
|
| 1366 | + . ((isset($prepend_code[$action]) && strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '') |
|
| 1367 | 1367 | . $s_call |
| 1368 | 1368 | . "return \$val;\n}\n"; |
| 1369 | 1369 | } |
@@ -1419,9 +1419,9 @@ discard block |
||
| 1419 | 1419 | $result = ($ok ? ((isset($infos['upgrade']) && $infos['upgrade']) ? _T('plugin_info_upgrade_ok') : _T('plugin_info_install_ok')) : _T('avis_operation_echec')); |
| 1420 | 1420 | if (_IS_CLI) { |
| 1421 | 1421 | include_spip('inc/filtres'); |
| 1422 | - $trace = ltrim(textebrut($trace) . "\n" . $result); |
|
| 1423 | - $trace = ' ' . str_replace("\n", "\n ", $trace); |
|
| 1424 | - echo "\n" . ($ok ? 'OK ' : '/!\ ') . textebrut($titre) . "\n", |
|
| 1422 | + $trace = ltrim(textebrut($trace)."\n".$result); |
|
| 1423 | + $trace = ' '.str_replace("\n", "\n ", $trace); |
|
| 1424 | + echo "\n".($ok ? 'OK ' : '/!\ ').textebrut($titre)."\n", |
|
| 1425 | 1425 | $trace, |
| 1426 | 1426 | "\n"; |
| 1427 | 1427 | } |
@@ -1456,15 +1456,15 @@ discard block |
||
| 1456 | 1456 | $GLOBALS['fichier_php_compile_recent'] = 0; |
| 1457 | 1457 | } |
| 1458 | 1458 | |
| 1459 | - $contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>'; |
|
| 1459 | + $contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>'; |
|
| 1460 | 1460 | // si un fichier existe deja on verifie que son contenu change avant de l'ecraser |
| 1461 | 1461 | // si pas de modif on ne touche pas au fichier initial |
| 1462 | 1462 | if (file_exists($nom)) { |
| 1463 | 1463 | if (str_ends_with($nom, '.php')) { |
| 1464 | - $fichier_tmp = substr($nom, 0, -4) . '.tmp.php'; |
|
| 1464 | + $fichier_tmp = substr($nom, 0, -4).'.tmp.php'; |
|
| 1465 | 1465 | } |
| 1466 | 1466 | else { |
| 1467 | - $fichier_tmp = $nom . '.tmp'; |
|
| 1467 | + $fichier_tmp = $nom.'.tmp'; |
|
| 1468 | 1468 | } |
| 1469 | 1469 | file_put_contents($fichier_tmp, $contenu); |
| 1470 | 1470 | if (md5_file($nom) == md5_file($fichier_tmp)) { |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $n = (int) sql_errno(); |
| 61 | - spip_log("Erreur base de donnees $n " . sql_error()); |
|
| 61 | + spip_log("Erreur base de donnees $n ".sql_error()); |
|
| 62 | 62 | |
| 63 | 63 | return $n ?: 1; |
| 64 | 64 | } |
@@ -101,19 +101,19 @@ discard block |
||
| 101 | 101 | // erreur SQL a afficher |
| 102 | 102 | $raison = minipres( |
| 103 | 103 | _T('info_travaux_titre'), |
| 104 | - _T('titre_probleme_technique') . '<p><tt>' . sql_errno() . ' ' . sql_error() . '</tt></p>' |
|
| 104 | + _T('titre_probleme_technique').'<p><tt>'.sql_errno().' '.sql_error().'</tt></p>' |
|
| 105 | 105 | ); |
| 106 | 106 | } elseif (@$raison['statut']) { |
| 107 | 107 | // un simple visiteur n'a pas acces a l'espace prive |
| 108 | - spip_log('connexion refusee a ' . @$raison['id_auteur']); |
|
| 108 | + spip_log('connexion refusee a '.@$raison['id_auteur']); |
|
| 109 | 109 | $est_connecte = (!empty($GLOBALS['visiteur_session']['login']) && !empty($GLOBALS['visiteur_session']['statut'])); // idem test balise #URL_LOGOUT |
| 110 | 110 | $raison = minipres( |
| 111 | 111 | _T('avis_erreur_connexion'), |
| 112 | 112 | _T('avis_erreur_visiteur') |
| 113 | 113 | // Lien vers le site public |
| 114 | - . '<br /><a href="' . url_de_base() . '">' . _T('login_retour_public') . '</a>' |
|
| 114 | + . '<br /><a href="'.url_de_base().'">'._T('login_retour_public').'</a>' |
|
| 115 | 115 | // Si la personne est connectée, lien de déconnexion ramenant vers la page de login |
| 116 | - . ($est_connecte ? ' | <a href="' . generer_url_public('', 'action=logout&logout=prive') . '">' . _T('icone_deconnecter') . '</a>' : '') |
|
| 116 | + . ($est_connecte ? ' | <a href="'.generer_url_public('', 'action=logout&logout=prive').'">'._T('icone_deconnecter').'</a>' : '') |
|
| 117 | 117 | ); |
| 118 | 118 | } else { |
| 119 | 119 | // auteur en fin de droits ... |
@@ -201,8 +201,7 @@ discard block |
||
| 201 | 201 | $where = (is_numeric($id_auteur) |
| 202 | 202 | /*AND $id_auteur>0*/ // reprise lors des restaurations |
| 203 | 203 | ) ? |
| 204 | - "id_auteur=$id_auteur" : |
|
| 205 | - (strlen((string) $GLOBALS['connect_login']) ? 'login=' . sql_quote($GLOBALS['connect_login'], '', 'text') : ''); |
|
| 204 | + "id_auteur=$id_auteur" : (strlen((string) $GLOBALS['connect_login']) ? 'login='.sql_quote($GLOBALS['connect_login'], '', 'text') : ''); |
|
| 206 | 205 | |
| 207 | 206 | if (!$where) { |
| 208 | 207 | return ''; |
@@ -327,7 +326,7 @@ discard block |
||
| 327 | 326 | * @return string |
| 328 | 327 | */ |
| 329 | 328 | function auth_a_loger() { |
| 330 | - $redirect = generer_url_public('login', 'url=' . rawurlencode((string) self('&', true)), true); |
|
| 329 | + $redirect = generer_url_public('login', 'url='.rawurlencode((string) self('&', true)), true); |
|
| 331 | 330 | |
| 332 | 331 | // un echec au "bonjour" (login initial) quand le statut est |
| 333 | 332 | // inconnu signale sans doute un probleme de cookies |
@@ -363,7 +362,7 @@ discard block |
||
| 363 | 362 | $date ??= date('Y-m-d H:i:s'); |
| 364 | 363 | |
| 365 | 364 | if (abs(strtotime($date) - $connect_quand) >= 60) { |
| 366 | - sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur=' . (int) $row['id_auteur']); |
|
| 365 | + sql_updateq('spip_auteurs', ['en_ligne' => $date], 'id_auteur='.(int) $row['id_auteur']); |
|
| 367 | 366 | $row['en_ligne'] = $date; |
| 368 | 367 | } |
| 369 | 368 | |
@@ -471,7 +470,7 @@ discard block |
||
| 471 | 470 | if ( |
| 472 | 471 | !$login |
| 473 | 472 | || !($login_base = auth_retrouver_login($login, $serveur)) |
| 474 | - || !($row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)) |
|
| 473 | + || !($row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur)) |
|
| 475 | 474 | ) { |
| 476 | 475 | // generer de fausses infos, mais credibles, pour eviter une attaque |
| 477 | 476 | // https://core.spip.net/issues/1758 + https://core.spip.net/issues/3691 |
@@ -581,7 +580,7 @@ discard block |
||
| 581 | 580 | sql_updateq( |
| 582 | 581 | 'spip_auteurs', |
| 583 | 582 | ['prefs' => serialize($p)], |
| 584 | - 'id_auteur=' . (int) $auteur['id_auteur'] |
|
| 583 | + 'id_auteur='.(int) $auteur['id_auteur'] |
|
| 585 | 584 | ); |
| 586 | 585 | |
| 587 | 586 | // bloquer ici le visiteur qui tente d'abuser de ses droits |
@@ -745,7 +744,7 @@ discard block |
||
| 745 | 744 | return false; |
| 746 | 745 | } |
| 747 | 746 | |
| 748 | - $row = sql_fetsel('*', 'spip_auteurs', 'login=' . sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur); |
|
| 747 | + $row = sql_fetsel('*', 'spip_auteurs', 'login='.sql_quote($login_base, $serveur, 'text'), '', '', '', '', $serveur); |
|
| 749 | 748 | |
| 750 | 749 | if (!$row) { |
| 751 | 750 | if ( |
@@ -801,11 +800,11 @@ discard block |
||
| 801 | 800 | $retour = $retour ?: _T('icone_retour'); |
| 802 | 801 | $corps .= "<p>$raison</p>[<a href='$public'>$retour</a>] "; |
| 803 | 802 | if ($url) { |
| 804 | - $corps .= "[<a href='" . generer_url_action('cookie', "essai_auth_http=oui&$url") . "'>$re</a>]"; |
|
| 803 | + $corps .= "[<a href='".generer_url_action('cookie', "essai_auth_http=oui&$url")."'>$re</a>]"; |
|
| 805 | 804 | } |
| 806 | 805 | |
| 807 | 806 | if ($lien) { |
| 808 | - $corps .= " [<a href='$ecrire'>" . _T('login_espace_prive') . '</a>]'; |
|
| 807 | + $corps .= " [<a href='$ecrire'>"._T('login_espace_prive').'</a>]'; |
|
| 809 | 808 | } |
| 810 | 809 | include_spip('inc/minipres'); |
| 811 | 810 | echo minipres($pb, $corps); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $contenu = @gzfile($fichier); |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - return is_array($contenu) ? implode('', $contenu) : (string)$contenu; |
|
| 124 | + return is_array($contenu) ? implode('', $contenu) : (string) $contenu; |
|
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | |
@@ -321,9 +321,9 @@ discard block |
||
| 321 | 321 | */ |
| 322 | 322 | function ecrire_fichier_securise($fichier, $contenu, $ecrire_quand_meme = false, $truncate = true) { |
| 323 | 323 | if (!str_ends_with($fichier, '.php')) { |
| 324 | - spip_log('Erreur de programmation: ' . $fichier . ' doit finir par .php'); |
|
| 324 | + spip_log('Erreur de programmation: '.$fichier.' doit finir par .php'); |
|
| 325 | 325 | } |
| 326 | - $contenu = '<' . "?php die ('Acces interdit'); ?" . ">\n" . $contenu; |
|
| 326 | + $contenu = '<'."?php die ('Acces interdit'); ?".">\n".$contenu; |
|
| 327 | 327 | |
| 328 | 328 | return ecrire_fichier($fichier, $contenu, $ecrire_quand_meme, $truncate); |
| 329 | 329 | } |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | * @return bool |
| 337 | 337 | */ |
| 338 | 338 | function ecrire_fichier_calcule_si_modifie($fichier, $contenu, $force = false, $use_copy = false) { |
| 339 | - $fichier_tmp = $fichier . '.last'; |
|
| 339 | + $fichier_tmp = $fichier.'.last'; |
|
| 340 | 340 | if (!ecrire_fichier($fichier_tmp, $contenu, true)) { |
| 341 | 341 | return false; |
| 342 | 342 | } |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | $wait = 0; |
| 548 | 548 | } |
| 549 | 549 | } |
| 550 | - spip_log('Probleme de configuration opcache.revalidate_freq ' . $duree . 's : on attend ' . $wait . 's', _LOG_INFO_IMPORTANTE); |
|
| 550 | + spip_log('Probleme de configuration opcache.revalidate_freq '.$duree.'s : on attend '.$wait.'s', _LOG_INFO_IMPORTANTE); |
|
| 551 | 551 | if ($wait) { |
| 552 | 552 | sleep($duree + 1); |
| 553 | 553 | } |
@@ -575,9 +575,9 @@ discard block |
||
| 575 | 575 | if ($item == '.' || $item == '..') { |
| 576 | 576 | continue; |
| 577 | 577 | } |
| 578 | - if (!supprimer_repertoire($dir . '/' . $item)) { |
|
| 579 | - @chmod($dir . '/' . $item, 0777); |
|
| 580 | - if (!supprimer_repertoire($dir . '/' . $item)) { |
|
| 578 | + if (!supprimer_repertoire($dir.'/'.$item)) { |
|
| 579 | + @chmod($dir.'/'.$item, 0777); |
|
| 580 | + if (!supprimer_repertoire($dir.'/'.$item)) { |
|
| 581 | 581 | return false; |
| 582 | 582 | } |
| 583 | 583 | }; |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | if (!strlen($subdir)) { |
| 623 | 623 | $n = strrpos($base, '/'); |
| 624 | 624 | if ($n === false) { |
| 625 | - return $nobase ? '' : ($base . '/'); |
|
| 625 | + return $nobase ? '' : ($base.'/'); |
|
| 626 | 626 | } |
| 627 | 627 | $subdir = substr($base, $n + 1); |
| 628 | 628 | $base = substr($base, 0, $n + 1); |
@@ -632,14 +632,14 @@ discard block |
||
| 632 | 632 | } |
| 633 | 633 | |
| 634 | 634 | $baseaff = $nobase ? '' : $base; |
| 635 | - if (isset($dirs[$base . $subdir])) { |
|
| 636 | - return $baseaff . $dirs[$base . $subdir]; |
|
| 635 | + if (isset($dirs[$base.$subdir])) { |
|
| 636 | + return $baseaff.$dirs[$base.$subdir]; |
|
| 637 | 637 | } |
| 638 | 638 | |
| 639 | - $path = $base . $subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf' |
|
| 639 | + $path = $base.$subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf' |
|
| 640 | 640 | |
| 641 | 641 | if (file_exists("$path/.ok")) { |
| 642 | - return $baseaff . ($dirs[$base . $subdir] = "$subdir/"); |
|
| 642 | + return $baseaff.($dirs[$base.$subdir] = "$subdir/"); |
|
| 643 | 643 | } |
| 644 | 644 | |
| 645 | 645 | @mkdir($path, _SPIP_CHMOD); |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | @touch("$path/.ok"); |
| 650 | 650 | spip_log("creation $base$subdir/"); |
| 651 | 651 | |
| 652 | - return $baseaff . ($dirs[$base . $subdir] = "$subdir/"); |
|
| 652 | + return $baseaff.($dirs[$base.$subdir] = "$subdir/"); |
|
| 653 | 653 | } |
| 654 | 654 | |
| 655 | 655 | // en cas d'echec c'est peut etre tout simplement que le disque est plein : |
@@ -660,10 +660,10 @@ discard block |
||
| 660 | 660 | } |
| 661 | 661 | // FIXME: throw an Exception… |
| 662 | 662 | if (!_DIR_RESTREINT) { |
| 663 | - $base = preg_replace(',^' . _DIR_RACINE . ',', '', $base); |
|
| 663 | + $base = preg_replace(',^'._DIR_RACINE.',', '', $base); |
|
| 664 | 664 | } |
| 665 | 665 | $base .= $subdir; |
| 666 | - raler_fichier($base . '/.ok'); |
|
| 666 | + raler_fichier($base.'/.ok'); |
|
| 667 | 667 | } |
| 668 | 668 | |
| 669 | 669 | |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | $maxfiles - $nbfiles, |
| 736 | 736 | $recurs |
| 737 | 737 | ); |
| 738 | - $fichiers = array_merge((array)$beginning, (array)$end); |
|
| 738 | + $fichiers = array_merge((array) $beginning, (array) $end); |
|
| 739 | 739 | $nbfiles = count($fichiers); |
| 740 | 740 | } |
| 741 | 741 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | // mais apres la fonction autoriser() |
| 120 | 120 | if ($f = find_in_path('mes_fonctions.php')) { |
| 121 | 121 | global $dossier_squelettes; |
| 122 | - include_once(_ROOT_CWD . $f); |
|
| 122 | + include_once(_ROOT_CWD.$f); |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | $qui = $GLOBALS['visiteur_session'] ?: []; |
| 161 | 161 | $qui = array_merge(['statut' => '', 'id_auteur' => 0, 'webmestre' => 'non'], $qui); |
| 162 | 162 | } elseif (is_numeric($qui)) { |
| 163 | - $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur=' . $qui); |
|
| 163 | + $qui = sql_fetsel('*', 'spip_auteurs', 'id_auteur='.$qui); |
|
| 164 | 164 | if (!$qui) { |
| 165 | 165 | return false; |
| 166 | 166 | } |
@@ -173,8 +173,8 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | spip_log( |
| 176 | - "autoriser $faire $type $id (" . ($qui['nom'] ?? '') . ') ?', |
|
| 177 | - 'autoriser' . _LOG_DEBUG |
|
| 176 | + "autoriser $faire $type $id (".($qui['nom'] ?? '').') ?', |
|
| 177 | + 'autoriser'._LOG_DEBUG |
|
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | 180 | // passer par objet_type pour avoir les alias |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | isset($GLOBALS['autoriser_exception'][$faire][$type][$id]) |
| 191 | 191 | && autoriser_exception($faire, $type, $id, 'verifier') || isset($GLOBALS['autoriser_exception'][$faire][$type]['*']) && autoriser_exception($faire, $type, '*', 'verifier') |
| 192 | 192 | ) { |
| 193 | - spip_log("autoriser ($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : OK Exception', 'autoriser' . _LOG_DEBUG); |
|
| 193 | + spip_log("autoriser ($faire, $type, $id, ".($qui['nom'] ?? '').') : OK Exception', 'autoriser'._LOG_DEBUG); |
|
| 194 | 194 | return true; |
| 195 | 195 | } |
| 196 | 196 | |
@@ -199,18 +199,18 @@ discard block |
||
| 199 | 199 | // autoriser_faire[_dist], autoriser_defaut[_dist] |
| 200 | 200 | $fonctions = $type |
| 201 | 201 | ? [ |
| 202 | - 'autoriser_' . $type . '_' . $faire, |
|
| 203 | - 'autoriser_' . $type . '_' . $faire . '_dist', |
|
| 204 | - 'autoriser_' . $type, |
|
| 205 | - 'autoriser_' . $type . '_dist', |
|
| 206 | - 'autoriser_' . $faire, |
|
| 207 | - 'autoriser_' . $faire . '_dist', |
|
| 202 | + 'autoriser_'.$type.'_'.$faire, |
|
| 203 | + 'autoriser_'.$type.'_'.$faire.'_dist', |
|
| 204 | + 'autoriser_'.$type, |
|
| 205 | + 'autoriser_'.$type.'_dist', |
|
| 206 | + 'autoriser_'.$faire, |
|
| 207 | + 'autoriser_'.$faire.'_dist', |
|
| 208 | 208 | 'autoriser_defaut', |
| 209 | 209 | 'autoriser_defaut_dist' |
| 210 | 210 | ] |
| 211 | 211 | : [ |
| 212 | - 'autoriser_' . $faire, |
|
| 213 | - 'autoriser_' . $faire . '_dist', |
|
| 212 | + 'autoriser_'.$faire, |
|
| 213 | + 'autoriser_'.$faire.'_dist', |
|
| 214 | 214 | 'autoriser_defaut', |
| 215 | 215 | 'autoriser_defaut_dist' |
| 216 | 216 | ]; |
@@ -224,8 +224,8 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | spip_log( |
| 227 | - "$f($faire, $type, $id, " . ($qui['nom'] ?? '') . ') : ' . ($a ? 'OK' : 'niet'), |
|
| 228 | - 'autoriser' . _LOG_DEBUG |
|
| 227 | + "$f($faire, $type, $id, ".($qui['nom'] ?? '').') : '.($a ? 'OK' : 'niet'), |
|
| 228 | + 'autoriser'._LOG_DEBUG |
|
| 229 | 229 | ); |
| 230 | 230 | |
| 231 | 231 | if (!is_bool($a)) { |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | function autoriser_previsualiser_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 375 | 375 | |
| 376 | 376 | // Le visiteur a-t-il un statut prevu par la config ? |
| 377 | - if (str_contains((string) $GLOBALS['meta']['preview'], ',' . $qui['statut'] . ',')) { |
|
| 377 | + if (str_contains((string) $GLOBALS['meta']['preview'], ','.$qui['statut'].',')) { |
|
| 378 | 378 | return test_previsualiser_objet_champ($type, $id, $qui, $opt); |
| 379 | 379 | } |
| 380 | 380 | |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | } // pas de champ passe a la demande => NIET |
| 429 | 429 | $previsu = explode(',', (string) $c['previsu']); |
| 430 | 430 | // regarder si ce statut est autorise pour l'auteur |
| 431 | - if (in_array($opt[$champ] . '/auteur', $previsu)) { |
|
| 431 | + if (in_array($opt[$champ].'/auteur', $previsu)) { |
|
| 432 | 432 | // retrouver l’id_auteur qui a filé un lien de prévisu éventuellement, |
| 433 | 433 | // sinon l’auteur en session |
| 434 | 434 | include_spip('inc/securiser_action'); |
@@ -442,12 +442,12 @@ discard block |
||
| 442 | 442 | |
| 443 | 443 | if (!$id_auteur) { |
| 444 | 444 | return false; |
| 445 | - } elseif (autoriser('previsualiser' . $opt[$champ], $type, 0, $id_auteur)) { |
|
| 445 | + } elseif (autoriser('previsualiser'.$opt[$champ], $type, 0, $id_auteur)) { |
|
| 446 | 446 | // dans ce cas (admin en general), pas de filtrage sur ce statut |
| 447 | 447 | } elseif ( |
| 448 | 448 | !sql_countsel( |
| 449 | 449 | 'spip_auteurs_liens', |
| 450 | - 'id_auteur=' . (int) $id_auteur . ' AND objet=' . sql_quote($type) . ' AND id_objet=' . (int) $id |
|
| 450 | + 'id_auteur='.(int) $id_auteur.' AND objet='.sql_quote($type).' AND id_objet='.(int) $id |
|
| 451 | 451 | ) |
| 452 | 452 | ) { |
| 453 | 453 | return false; |
@@ -492,14 +492,14 @@ discard block |
||
| 492 | 492 | // multilinguisme par secteur et objet rattaché à une rubrique |
| 493 | 493 | $primary = id_table_objet($type); |
| 494 | 494 | $id_rubrique = $table != 'spip_rubriques' |
| 495 | - ? sql_getfetsel('id_rubrique', "$table", "$primary=" . (int) $id) |
|
| 495 | + ? sql_getfetsel('id_rubrique', "$table", "$primary=".(int) $id) |
|
| 496 | 496 | : $id; |
| 497 | - $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 497 | + $id_secteur = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 498 | 498 | if (!$id_secteur > 0) { |
| 499 | 499 | $id_secteur = $id_rubrique; |
| 500 | 500 | } |
| 501 | - $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . (int) $id_secteur); |
|
| 502 | - $langue_objet = sql_getfetsel('lang', "$table", "$primary=" . (int) $id); |
|
| 501 | + $langue_secteur = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.(int) $id_secteur); |
|
| 502 | + $langue_objet = sql_getfetsel('lang', "$table", "$primary=".(int) $id); |
|
| 503 | 503 | if ($langue_secteur != $langue_objet) { |
| 504 | 504 | // configuration incohérente, on laisse l'utilisateur corriger la situation |
| 505 | 505 | return true; |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | if ($table != 'spip_rubriques') { // le choix de la langue se fait seulement sur les rubriques |
| 508 | 508 | return false; |
| 509 | 509 | } else { |
| 510 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . (int) $id); |
|
| 510 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.(int) $id); |
|
| 511 | 511 | if ($id_parent != 0) { |
| 512 | 512 | // sous-rubriques : pas de choix de langue |
| 513 | 513 | return false; |
@@ -559,7 +559,7 @@ discard block |
||
| 559 | 559 | |
| 560 | 560 | if (!isset($opt['statut'])) { |
| 561 | 561 | if (isset($desc['field']['statut'])) { |
| 562 | - $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type) . '=' . (int) $id); |
|
| 562 | + $statut = sql_getfetsel('statut', $desc['table'], id_table_objet($type).'='.(int) $id); |
|
| 563 | 563 | } else { |
| 564 | 564 | $statut = 'publie'; |
| 565 | 565 | } // pas de statut => publie |
@@ -724,11 +724,11 @@ discard block |
||
| 724 | 724 | return false; |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | - if (sql_countsel('spip_rubriques', 'id_parent=' . (int) $id)) { |
|
| 727 | + if (sql_countsel('spip_rubriques', 'id_parent='.(int) $id)) { |
|
| 728 | 728 | return false; |
| 729 | 729 | } |
| 730 | 730 | |
| 731 | - if (sql_countsel('spip_articles', 'id_rubrique=' . (int) $id . " AND (statut<>'poubelle')")) { |
|
| 731 | + if (sql_countsel('spip_articles', 'id_rubrique='.(int) $id." AND (statut<>'poubelle')")) { |
|
| 732 | 732 | return false; |
| 733 | 733 | } |
| 734 | 734 | |
@@ -765,7 +765,7 @@ discard block |
||
| 765 | 765 | if (!$id) { |
| 766 | 766 | return false; |
| 767 | 767 | } |
| 768 | - $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article=' . sql_quote($id)); |
|
| 768 | + $r = sql_fetsel('id_rubrique,statut', 'spip_articles', 'id_article='.sql_quote($id)); |
|
| 769 | 769 | |
| 770 | 770 | return $r && ( |
| 771 | 771 | autoriser('publierdans', 'rubrique', $r['id_rubrique'], $qui, $opt) |
@@ -773,7 +773,7 @@ discard block |
||
| 773 | 773 | (!isset($opt['statut']) || !in_array($opt['statut'], ['publie', 'refuse'], true)) |
| 774 | 774 | && in_array($qui['statut'], ['0minirezo', '1comite']) |
| 775 | 775 | && in_array($r['statut'], ['prop', 'prepa', 'poubelle']) |
| 776 | - && auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']) |
|
| 776 | + && auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']) |
|
| 777 | 777 | ) |
| 778 | 778 | ); |
| 779 | 779 | } |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | if (!$id) { |
| 832 | 832 | return false; |
| 833 | 833 | } |
| 834 | - $statut = sql_getfetsel('statut', 'spip_articles', 'id_article=' . (int) $id); |
|
| 834 | + $statut = sql_getfetsel('statut', 'spip_articles', 'id_article='.(int) $id); |
|
| 835 | 835 | } |
| 836 | 836 | |
| 837 | 837 | return |
@@ -840,7 +840,7 @@ discard block |
||
| 840 | 840 | in_array($statut, ['prop', 'publie']) |
| 841 | 841 | // sinon si on est auteur, on a le droit de le voir, evidemment ! |
| 842 | 842 | |
| 843 | - || $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur=' . $qui['id_auteur']); |
|
| 843 | + || $id && $qui['id_auteur'] && auteurs_objet('article', $id, 'id_auteur='.$qui['id_auteur']); |
|
| 844 | 844 | } |
| 845 | 845 | |
| 846 | 846 | |
@@ -861,8 +861,8 @@ discard block |
||
| 861 | 861 | function autoriser_voir_dist(string $faire, string $type, $id, array $qui, array $opt): bool { |
| 862 | 862 | # securite, mais on aurait pas du arriver ici ! |
| 863 | 863 | if ( |
| 864 | - function_exists($f = 'autoriser_' . $type . '_voir') |
|
| 865 | - || function_exists($f = 'autoriser_' . $type . '_voir_dist') |
|
| 864 | + function_exists($f = 'autoriser_'.$type.'_voir') |
|
| 865 | + || function_exists($f = 'autoriser_'.$type.'_voir_dist') |
|
| 866 | 866 | ) { |
| 867 | 867 | return $f($faire, $type, $id, $qui, $opt); |
| 868 | 868 | } |
@@ -987,7 +987,7 @@ discard block |
||
| 987 | 987 | $n = sql_fetsel( |
| 988 | 988 | 'A.id_article', |
| 989 | 989 | 'spip_auteurs_liens AS L LEFT JOIN spip_articles AS A ON (L.objet=\'article\' AND L.id_objet=A.id_article)', |
| 990 | - "A.statut='publie' AND L.id_auteur=" . sql_quote($id) |
|
| 990 | + "A.statut='publie' AND L.id_auteur=".sql_quote($id) |
|
| 991 | 991 | ); |
| 992 | 992 | |
| 993 | 993 | return (bool) $n; |
@@ -1185,7 +1185,7 @@ discard block |
||
| 1185 | 1185 | && ($r = sql_allfetsel( |
| 1186 | 1186 | 'id_objet', |
| 1187 | 1187 | 'spip_auteurs_liens', |
| 1188 | - 'id_auteur=' . (int) $id_auteur . " AND objet='rubrique' AND id_objet!=0" |
|
| 1188 | + 'id_auteur='.(int) $id_auteur." AND objet='rubrique' AND id_objet!=0" |
|
| 1189 | 1189 | )) |
| 1190 | 1190 | && (is_countable($r) ? count($r) : 0) |
| 1191 | 1191 | ) { |
@@ -1862,8 +1862,8 @@ discard block |
||
| 1862 | 1862 | function auteurs_objet($objet, $id_objet, $cond = '') { |
| 1863 | 1863 | $objet = objet_type($objet); |
| 1864 | 1864 | $where = [ |
| 1865 | - 'objet=' . sql_quote($objet), |
|
| 1866 | - 'id_objet=' . (int) $id_objet |
|
| 1865 | + 'objet='.sql_quote($objet), |
|
| 1866 | + 'id_objet='.(int) $id_objet |
|
| 1867 | 1867 | ]; |
| 1868 | 1868 | if (!empty($cond)) { |
| 1869 | 1869 | if (is_array($cond)) { |
@@ -43,13 +43,13 @@ discard block |
||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | if (is_null($liste_langues)) { |
| 46 | - $liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '') . ',' . ($GLOBALS['meta']['langues_multilingue'] ?? ''); |
|
| 46 | + $liste_langues = ($GLOBALS['meta']['langues_proposees'] ?? '').','.($GLOBALS['meta']['langues_multilingue'] ?? ''); |
|
| 47 | 47 | } else { |
| 48 | 48 | if (is_array($liste_langues)) { |
| 49 | 49 | $liste_langues = implode(',', $liste_langues); |
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | - $liste_langues = ',' . $liste_langues . ','; |
|
| 52 | + $liste_langues = ','.$liste_langues.','; |
|
| 53 | 53 | |
| 54 | 54 | // Si la langue demandee n'existe pas, on essaie d'autres variantes |
| 55 | 55 | // Exemple : 'pt-br' => 'pt_br' => 'pt' |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | foreach ($langues as $l) { |
| 193 | 193 | $selected = ($l == $default) ? ' selected=\'selected\'' : ''; |
| 194 | - $ret .= "<option value='$l'$selected>[" . $l . '] ' . traduire_nom_langue($l) . "</option>\n"; |
|
| 194 | + $ret .= "<option value='$l'$selected>[".$l.'] '.traduire_nom_langue($l)."</option>\n"; |
|
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | if (!test_espace_prive()) { |
@@ -209,21 +209,20 @@ discard block |
||
| 209 | 209 | $base, |
| 210 | 210 | $cible, |
| 211 | 211 | (select_langues($nom_select, $change, $ret) |
| 212 | - . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='" . _T('bouton_changer') . "' /></div></noscript>"), |
|
| 212 | + . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='"._T('bouton_changer')."' /></div></noscript>"), |
|
| 213 | 213 | " method='post'" |
| 214 | 214 | ); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | function select_langues($nom_select, $change, $options, $label = '') { |
| 218 | 218 | static $cpt = 0; |
| 219 | - $id = 'menu_langues' . $cpt++; |
|
| 219 | + $id = 'menu_langues'.$cpt++; |
|
| 220 | 220 | |
| 221 | 221 | return |
| 222 | - "<label for='$id'>" . ($label ?: _T('info_langues')) . '</label> ' . |
|
| 222 | + "<label for='$id'>".($label ?: _T('info_langues')).'</label> '. |
|
| 223 | 223 | "<select name='$nom_select' id='$id' " |
| 224 | 224 | . ((test_espace_prive()) ? |
| 225 | - (($nom_select == 'var_lang_ecrire' ? "class='lang_ecrire'" : "class='fondl'")) : |
|
| 226 | - ("class='forml menu_langues'")) |
|
| 225 | + (($nom_select == 'var_lang_ecrire' ? "class='lang_ecrire'" : "class='fondl'")) : ("class='forml menu_langues'")) |
|
| 227 | 226 | . $change |
| 228 | 227 | . ">\n" |
| 229 | 228 | . $options |
@@ -346,7 +345,7 @@ discard block |
||
| 346 | 345 | isset($GLOBALS['meta']['langue_site']) |
| 347 | 346 | && (!isset($GLOBALS['spip_lang']) || $GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site']) |
| 348 | 347 | ) { |
| 349 | - return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues);//@:install |
|
| 348 | + return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues); //@:install |
|
| 350 | 349 | } |
| 351 | 350 | // en theorie là, la globale est définie, sinon c'est un problème. |
| 352 | 351 | if (!isset($GLOBALS['spip_lang'])) { |
@@ -458,7 +457,7 @@ discard block |
||
| 458 | 457 | if (!isset($GLOBALS['meta']['langue_site'])) { |
| 459 | 458 | // Initialisation : le francais si dispo, sinon la premiere langue trouvee |
| 460 | 459 | $GLOBALS['meta']['langue_site'] = $tout = |
| 461 | - (!$all_langs || str_contains(',' . _LANGUE_PAR_DEFAUT . ',', (string) ",$all_langs,")) |
|
| 460 | + (!$all_langs || str_contains(','._LANGUE_PAR_DEFAUT.',', (string) ",$all_langs,")) |
|
| 462 | 461 | ? _LANGUE_PAR_DEFAUT |
| 463 | 462 | : substr((string) $all_langs, 0, strpos((string) $all_langs, ',')); |
| 464 | 463 | ecrire_meta('langue_site', $tout); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - return $x . $texte; |
|
| 66 | + return $x.$texte; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | if (!str_contains(substr($texte, 0, $pos), '<!-- insert_head -->')) { |
| 141 | - $insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n"; |
|
| 141 | + $insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n"; |
|
| 142 | 142 | $texte = substr_replace($texte, $insert, $pos, 0); |
| 143 | 143 | } |
| 144 | 144 | |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | $texte = substr_replace($texte, $x, $pos, 0); |
| 172 | 172 | // pas de preview en fenetre enfant |
| 173 | - $x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='" . addslashes((string) $GLOBALS['meta']['adresse_site']) . "';}</script>"; |
|
| 173 | + $x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes((string) $GLOBALS['meta']['adresse_site'])."';}</script>"; |
|
| 174 | 174 | if ((!$pos = stripos($texte, '<head')) || (!$pos = strpos($texte, '>', $pos))) { |
| 175 | 175 | $pos = -1; |
| 176 | 176 | } |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | // inserer avant le </body> fermant si on peut, a la fin de la page sinon |
| 243 | 243 | if (($p = strpos($texte, '</body>')) !== false) { |
| 244 | - $texte = substr($texte, 0, $p) . $code . substr($texte, $p); |
|
| 244 | + $texte = substr($texte, 0, $p).$code.substr($texte, $p); |
|
| 245 | 245 | } else { |
| 246 | 246 | $texte .= $code; |
| 247 | 247 | } |
@@ -106,12 +106,12 @@ discard block |
||
| 106 | 106 | foreach (['script', 'iframe'] as $tag) { |
| 107 | 107 | if ( |
| 108 | 108 | stripos($t, (string) "<$tag") !== false |
| 109 | - && preg_match_all(',<' . $tag . '.*?($|</' . $tag . '.),isS', $t, $r, PREG_SET_ORDER) |
|
| 109 | + && preg_match_all(',<'.$tag.'.*?($|</'.$tag.'.),isS', $t, $r, PREG_SET_ORDER) |
|
| 110 | 110 | ) { |
| 111 | 111 | foreach ($r as $regs) { |
| 112 | 112 | $t = str_replace( |
| 113 | 113 | $regs[0], |
| 114 | - "<code$class>" . nl2br(spip_htmlspecialchars($regs[0])) . '</code>', |
|
| 114 | + "<code$class>".nl2br(spip_htmlspecialchars($regs[0])).'</code>', |
|
| 115 | 115 | $t |
| 116 | 116 | ); |
| 117 | 117 | } |
@@ -164,10 +164,10 @@ discard block |
||
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // echapper les tags asp/php |
| 167 | - $t = str_replace('<' . '%', '<%', $arg); |
|
| 167 | + $t = str_replace('<'.'%', '<%', $arg); |
|
| 168 | 168 | |
| 169 | 169 | // echapper le php |
| 170 | - $t = str_replace('<' . '?', '<?', $t); |
|
| 170 | + $t = str_replace('<'.'?', '<?', $t); |
|
| 171 | 171 | |
| 172 | 172 | // echapper le < script language=php > |
| 173 | 173 | $t = preg_replace(',<(script\b[^>]+\blanguage\b[^\w>]+php\b),UimsS', '<\1', $t); |
@@ -189,10 +189,10 @@ discard block |
||
| 189 | 189 | |
| 190 | 190 | // Reinserer les echappements des modeles |
| 191 | 191 | if (defined('_PROTEGE_JS_MODELES')) { |
| 192 | - $t = echappe_retour($t, 'javascript' . _PROTEGE_JS_MODELES); |
|
| 192 | + $t = echappe_retour($t, 'javascript'._PROTEGE_JS_MODELES); |
|
| 193 | 193 | } |
| 194 | 194 | if (defined('_PROTEGE_PHP_MODELES')) { |
| 195 | - $t = echappe_retour($t, 'php' . _PROTEGE_PHP_MODELES); |
|
| 195 | + $t = echappe_retour($t, 'php'._PROTEGE_PHP_MODELES); |
|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | return $dejavu[$mode_filtre][$arg] = $t; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | define('_TYPO_PROTEGER', "!':;?~%-"); |
| 291 | 291 | define('_TYPO_PROTECTEUR', "\x1\x2\x3\x4\x5\x6\x7\x8"); |
| 292 | 292 | |
| 293 | -define('_TYPO_BALISE', ',</?[a-z!][^<>]*[' . preg_quote(_TYPO_PROTEGER) . '][^<>]*>,imsS'); |
|
| 293 | +define('_TYPO_BALISE', ',</?[a-z!][^<>]*['.preg_quote(_TYPO_PROTEGER).'][^<>]*>,imsS'); |
|
| 294 | 294 | |
| 295 | 295 | /** |
| 296 | 296 | * Corrige la typographie |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | function spip_setcookie( |
| 53 | 53 | string $name = '', |
| 54 | 54 | string $value = '', |
| 55 | - int|array $expires_or_options = 0, |
|
| 55 | + int | array $expires_or_options = 0, |
|
| 56 | 56 | string $path = '', |
| 57 | 57 | string $domain = '', |
| 58 | 58 | bool $secure = false, |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | // in fine renommer le prefixe si besoin |
| 103 | 103 | if (str_starts_with($name, 'spip_')) { |
| 104 | - $name = $GLOBALS['cookie_prefix'] . '_' . substr($name, 5); |
|
| 104 | + $name = $GLOBALS['cookie_prefix'].'_'.substr($name, 5); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | #spip_log("cookie('$name', '$value', " . json_encode($options, true) . ")", "cookies"); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | } |
| 160 | 160 | foreach ($_COOKIE as $name => $value) { |
| 161 | 161 | if (substr($name, 0, $prefix_long) == $cookie_prefix) { |
| 162 | - $spipname = preg_replace('/^' . $cookie_prefix . '_/', 'spip_', $name); |
|
| 162 | + $spipname = preg_replace('/^'.$cookie_prefix.'_/', 'spip_', $name); |
|
| 163 | 163 | $_COOKIE[$spipname] = $value; |
| 164 | 164 | $GLOBALS[$spipname] = $value; |
| 165 | 165 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | // confirmation du deplacement |
| 117 | 117 | if ( |
| 118 | 118 | sql_table_exists('spip_breves') |
| 119 | - && ($contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . (int) $id_objet)) |
|
| 119 | + && ($contient_breves = sql_countsel('spip_breves', 'id_rubrique='.(int) $id_objet)) |
|
| 120 | 120 | && $contient_breves > 0 |
| 121 | 121 | ) { |
| 122 | 122 | // FIXME: utiliser singulier_ou_pluriel, migrer dans plugin Brèves |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | ); |
| 131 | 131 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 132 | 132 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 133 | - . $scb . |
|
| 133 | + . $scb. |
|
| 134 | 134 | "</label></div></div>\n"; |
| 135 | 135 | } else { |
| 136 | 136 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -139,11 +139,11 @@ discard block |
||
| 139 | 139 | $form .= $confirm; |
| 140 | 140 | if ($actionable) { |
| 141 | 141 | if (str_contains($form, '<select')) { |
| 142 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 143 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 142 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 143 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 144 | 144 | . '</div>'; |
| 145 | 145 | } |
| 146 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 146 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 147 | 147 | if ($action = charger_fonction("editer_$objet", 'action', true)) { |
| 148 | 148 | $form = generer_action_auteur( |
| 149 | 149 | "editer_$objet", |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | include_spip('inc/presentation'); |
| 171 | 171 | |
| 172 | - return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur(); |
|
| 172 | + return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur(); |
|
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | if ($statut == 'nouveau') { |
| 246 | 246 | if ($attente) { |
| 247 | 247 | $statut = $attente; |
| 248 | - $plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')'; |
|
| 248 | + $plus = ' ('._T('info_statut_auteur_a_confirmer').')'; |
|
| 249 | 249 | } else { |
| 250 | 250 | return _T('info_statut_auteur_a_confirmer'); |
| 251 | 251 | } |
@@ -258,16 +258,16 @@ discard block |
||
| 258 | 258 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 259 | 259 | ]; |
| 260 | 260 | if (isset($recom[$statut])) { |
| 261 | - return $recom[$statut] . $plus; |
|
| 261 | + return $recom[$statut].$plus; |
|
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | // retrouver directement par le statut sinon |
| 265 | 265 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 266 | 266 | if (isset($recom[$t])) { |
| 267 | - return $recom[$t] . $plus; |
|
| 267 | + return $recom[$t].$plus; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - return _T($t) . $plus; |
|
| 270 | + return _T($t).$plus; |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | |
| 388 | 388 | if (!$id_rubrique && defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') && _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 389 | 389 | $in = (is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0) |
| 390 | - ? ' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']) |
|
| 390 | + ? ' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique']) |
|
| 391 | 391 | : ''; |
| 392 | 392 | |
| 393 | 393 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
@@ -426,13 +426,13 @@ discard block |
||
| 426 | 426 | $parts = parse_url($virtuel); |
| 427 | 427 | if (!empty($parts['query']) && str_contains($parts['query'], ']')) { |
| 428 | 428 | $query = str_replace(['[', ']'], [urlencode('['), urlencode(']')], $parts['query']); |
| 429 | - $virtuel = str_replace('?' . $parts['query'], "?$query", $virtuel); |
|
| 429 | + $virtuel = str_replace('?'.$parts['query'], "?$query", $virtuel); |
|
| 430 | 430 | } |
| 431 | 431 | if ($virtuel !== $joli) { |
| 432 | - $joli = propre('[' . $joli . ' -> ' . $virtuel . ']'); |
|
| 432 | + $joli = propre('['.$joli.' -> '.$virtuel.']'); |
|
| 433 | 433 | } |
| 434 | 434 | else { |
| 435 | - $joli = propre('[->' . $virtuel . ']'); |
|
| 435 | + $joli = propre('[->'.$virtuel.']'); |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return $joli; |
@@ -462,7 +462,7 @@ discard block |
||
| 462 | 462 | $clic = http_img_pack('rss-16.png', 'RSS', '', $title); |
| 463 | 463 | |
| 464 | 464 | $url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true); |
| 465 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 465 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 466 | 466 | } |
| 467 | 467 | |
| 468 | 468 | |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | ); |
| 535 | 535 | |
| 536 | 536 | if ($alertes = array_filter($alertes)) { |
| 537 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 537 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 538 | 538 | implode(' | ', $alertes) |
| 539 | 539 | . '</div></div>'; |
| 540 | 540 | } |
@@ -570,13 +570,13 @@ discard block |
||
| 570 | 570 | */ |
| 571 | 571 | function afficher_plus_info($lien, $titre = '+', $titre_lien = '') { |
| 572 | 572 | $titre = attribut_html($titre); |
| 573 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 574 | - http_img_pack('information-16.png', $titre) . '</a>'; |
|
| 573 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 574 | + http_img_pack('information-16.png', $titre).'</a>'; |
|
| 575 | 575 | |
| 576 | 576 | if (!$titre_lien) { |
| 577 | 577 | return $icone; |
| 578 | 578 | } else { |
| 579 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 579 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 580 | 580 | } |
| 581 | 581 | } |
| 582 | 582 | |