@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | /** l'adresse du repertoire de telechargement et de decompactage des plugins */ |
| 24 | 24 | if (!defined('_DIR_PLUGINS_AUTO')) { |
| 25 | - define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS . 'auto/'); |
|
| 25 | + define('_DIR_PLUGINS_AUTO', _DIR_PLUGINS.'auto/'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | #include_spip('inc/texte'); // ????? Appelle public/parametrer trop tot avant la reconstruction du chemin des plugins. |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | if ($dir) { |
| 371 | 371 | $dir .= "/"; |
| 372 | 372 | } |
| 373 | - $dir .= "procure:" . $procure['nom']; |
|
| 373 | + $dir .= "procure:".$procure['nom']; |
|
| 374 | 374 | |
| 375 | 375 | $procure['etat'] = '?'; |
| 376 | 376 | $procure['dir_type'] = $resume['dir_type']; |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $plug = $resume['dir']; |
| 552 | 552 | $k = $infos[$dir_type][$plug]; |
| 553 | 553 | |
| 554 | - $plug = constant($dir_type) . $plug; |
|
| 554 | + $plug = constant($dir_type).$plug; |
|
| 555 | 555 | if (!isset($msg[$p])) { |
| 556 | 556 | if (isset($resume['erreur']) and $resume['erreur']) { |
| 557 | 557 | $msg[$p] = array($resume['erreur']); |
@@ -594,10 +594,10 @@ discard block |
||
| 594 | 594 | $list = $raw ? array() : $GLOBALS['meta']['plugin_erreur_activation']; |
| 595 | 595 | } elseif (!$raw) { |
| 596 | 596 | foreach ($list as $plug => $msg) { |
| 597 | - $list[$plug] = "<li>" . _T('plugin_impossible_activer', array('plugin' => $plug)) |
|
| 598 | - . "<ul><li>" . implode("</li><li>", $msg) . "</li></ul></li>"; |
|
| 597 | + $list[$plug] = "<li>"._T('plugin_impossible_activer', array('plugin' => $plug)) |
|
| 598 | + . "<ul><li>".implode("</li><li>", $msg)."</li></ul></li>"; |
|
| 599 | 599 | } |
| 600 | - $list = "<ul>" . join("\n", $list) . "</ul>"; |
|
| 600 | + $list = "<ul>".join("\n", $list)."</ul>"; |
|
| 601 | 601 | } |
| 602 | 602 | if ($raz) { |
| 603 | 603 | effacer_meta('plugin_erreur_activation'); |
@@ -711,13 +711,13 @@ discard block |
||
| 711 | 711 | if ($minimum_inclus and spip_version_compare($version, $minimum, '<')) { |
| 712 | 712 | return _T("plugin_${balise}_${type}", array( |
| 713 | 713 | 'plugin' => $nom, |
| 714 | - 'version' => ' ≥ ' . $minimum |
|
| 714 | + 'version' => ' ≥ '.$minimum |
|
| 715 | 715 | )); |
| 716 | 716 | } |
| 717 | 717 | if (!$minimum_inclus and spip_version_compare($version, $minimum, '<=')) { |
| 718 | 718 | return _T("plugin_${balise}_${type}", array( |
| 719 | 719 | 'plugin' => $nom, |
| 720 | - 'version' => ' > ' . $minimum |
|
| 720 | + 'version' => ' > '.$minimum |
|
| 721 | 721 | )); |
| 722 | 722 | } |
| 723 | 723 | } |
@@ -726,13 +726,13 @@ discard block |
||
| 726 | 726 | if ($maximum_inclus and spip_version_compare($version, $maximum, '>')) { |
| 727 | 727 | return _T("plugin_${balise}_${type}", array( |
| 728 | 728 | 'plugin' => $nom, |
| 729 | - 'version' => ' ≤ ' . $maximum |
|
| 729 | + 'version' => ' ≤ '.$maximum |
|
| 730 | 730 | )); |
| 731 | 731 | } |
| 732 | 732 | if (!$maximum_inclus and spip_version_compare($version, $maximum, '>=')) { |
| 733 | 733 | return _T("plugin_${balise}_plugin", array( |
| 734 | 734 | 'plugin' => $nom, |
| 735 | - 'version' => ' < ' . $maximum |
|
| 735 | + 'version' => ' < '.$maximum |
|
| 736 | 736 | )); |
| 737 | 737 | } |
| 738 | 738 | } |
@@ -751,7 +751,7 @@ discard block |
||
| 751 | 751 | include_spip('inc/charger_plugin'); |
| 752 | 752 | $url = '<br />' . bouton_telechargement_plugin($url, 'lib'); |
| 753 | 753 | }*/ |
| 754 | - return _T('plugin_necessite_lib', array('lib' => $lib)) . " <a href='$url'>$url</a>"; |
|
| 754 | + return _T('plugin_necessite_lib', array('lib' => $lib))." <a href='$url'>$url</a>"; |
|
| 755 | 755 | } |
| 756 | 756 | |
| 757 | 757 | |
@@ -850,7 +850,7 @@ discard block |
||
| 850 | 850 | foreach ($plugin_valides as $p => $resume) { |
| 851 | 851 | // Les headers ne doivent pas indiquer les versions des extensions PHP, ni la version PHP |
| 852 | 852 | if (0 !== strpos($p, 'PHP:') and $p !== 'PHP') { |
| 853 | - $header[] = $p . ($resume['version'] ? "(" . $resume['version'] . ")" : ""); |
|
| 853 | + $header[] = $p.($resume['version'] ? "(".$resume['version'].")" : ""); |
|
| 854 | 854 | } |
| 855 | 855 | if ($resume['dir']) { |
| 856 | 856 | foreach ($infos[$resume['dir_type']][$resume['dir']]['lib'] as $l) { |
@@ -874,10 +874,10 @@ discard block |
||
| 874 | 874 | ecrire_meta('plugin_attente', serialize($liste)); |
| 875 | 875 | $header = strtolower(implode(",", $header)); |
| 876 | 876 | if (!isset($GLOBALS['spip_header_silencieux']) or !$GLOBALS['spip_header_silencieux']) { |
| 877 | - ecrire_fichier(_DIR_VAR . "config.txt", |
|
| 878 | - (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP") . ' ' . $GLOBALS['spip_version_affichee'] . " @ www.spip.net + " . $header); |
|
| 877 | + ecrire_fichier(_DIR_VAR."config.txt", |
|
| 878 | + (defined('_HEADER_COMPOSED_BY') ? _HEADER_COMPOSED_BY : "Composed-By: SPIP").' '.$GLOBALS['spip_version_affichee']." @ www.spip.net + ".$header); |
|
| 879 | 879 | } else { |
| 880 | - @unlink(_DIR_VAR . "config.txt"); |
|
| 880 | + @unlink(_DIR_VAR."config.txt"); |
|
| 881 | 881 | } |
| 882 | 882 | // generer charger_plugins_chemin.php |
| 883 | 883 | plugins_precompile_chemin($plugin_valides, $ordre); |
@@ -931,7 +931,7 @@ discard block |
||
| 931 | 931 | // definir le plugin, donc le path avant l'include du fichier options |
| 932 | 932 | // permet de faire des include_spip pour attraper un inc_ du plugin |
| 933 | 933 | |
| 934 | - $dir = $dir_type . ".'" . $plug . "/'"; |
|
| 934 | + $dir = $dir_type.".'".$plug."/'"; |
|
| 935 | 935 | |
| 936 | 936 | $prefix = strtoupper(preg_replace(',\W,', '_', $info['prefix'])); |
| 937 | 937 | if ( |
@@ -942,11 +942,11 @@ discard block |
||
| 942 | 942 | if (!$info['chemin']) { |
| 943 | 943 | $chemins['public'][] = "_DIR_PLUGIN_$prefix"; |
| 944 | 944 | $chemins['prive'][] = "_DIR_PLUGIN_$prefix"; |
| 945 | - if (is_dir(constant($dir_type) . $plug . '/squelettes/')) { |
|
| 945 | + if (is_dir(constant($dir_type).$plug.'/squelettes/')) { |
|
| 946 | 946 | $chemins['public'][] = "_DIR_PLUGIN_{$prefix}.'squelettes/'"; |
| 947 | 947 | } |
| 948 | 948 | } |
| 949 | - else{ |
|
| 949 | + else { |
|
| 950 | 950 | foreach ($info['chemin'] as $chemin) { |
| 951 | 951 | if (!isset($chemin['version']) or plugin_version_compatible($chemin['version'], |
| 952 | 952 | $GLOBALS['spip_version_branche'], 'spip') |
@@ -959,13 +959,13 @@ discard block |
||
| 959 | 959 | $dir = ''; |
| 960 | 960 | } |
| 961 | 961 | if (strlen($dir)) { |
| 962 | - $dir = rtrim($dir, '/') . '/'; |
|
| 962 | + $dir = rtrim($dir, '/').'/'; |
|
| 963 | 963 | } |
| 964 | 964 | if (!isset($chemin['type']) or $chemin['type'] == 'public') { |
| 965 | - $chemins['public'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ""); |
|
| 965 | + $chemins['public'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ""); |
|
| 966 | 966 | } |
| 967 | 967 | if (!isset($chemin['type']) or $chemin['type'] == 'prive') { |
| 968 | - $chemins['prive'][] = "_DIR_PLUGIN_$prefix" . (strlen($dir) ? ".'$dir'" : ""); |
|
| 968 | + $chemins['prive'][] = "_DIR_PLUGIN_$prefix".(strlen($dir) ? ".'$dir'" : ""); |
|
| 969 | 969 | } |
| 970 | 970 | } |
| 971 | 971 | } |
@@ -974,9 +974,9 @@ discard block |
||
| 974 | 974 | } |
| 975 | 975 | } |
| 976 | 976 | if (count($chemins['public']) or count($chemins['prive'])) { |
| 977 | - $contenu .= "if (_DIR_RESTREINT) _chemin([" . implode(',', |
|
| 978 | - array_reverse($chemins['public'])) . "]);\n" |
|
| 979 | - . "else _chemin([" . implode(',', array_reverse($chemins['prive'])) . "]);\n"; |
|
| 977 | + $contenu .= "if (_DIR_RESTREINT) _chemin([".implode(',', |
|
| 978 | + array_reverse($chemins['public']))."]);\n" |
|
| 979 | + . "else _chemin([".implode(',', array_reverse($chemins['prive']))."]);\n"; |
|
| 980 | 980 | } |
| 981 | 981 | |
| 982 | 982 | ecrire_fichier_php(_CACHE_PLUGINS_PATH, $contenu); |
@@ -1024,7 +1024,7 @@ discard block |
||
| 1024 | 1024 | and strpos($dir, ":") === false // exclure le cas des procure: |
| 1025 | 1025 | and file_exists("$dir$plug/paquet.xml") // uniquement pour les paquet.xml |
| 1026 | 1026 | ) { |
| 1027 | - if (is_readable("$dir$plug/" . ($file = $info['prefix'] . "_" . $charge . ".php"))) { |
|
| 1027 | + if (is_readable("$dir$plug/".($file = $info['prefix']."_".$charge.".php"))) { |
|
| 1028 | 1028 | $info[$charge] = array($file); |
| 1029 | 1029 | } |
| 1030 | 1030 | } |
@@ -1040,7 +1040,7 @@ discard block |
||
| 1040 | 1040 | ) { |
| 1041 | 1041 | unset($info[$charge][$k]); |
| 1042 | 1042 | } else { |
| 1043 | - $_file = $root_dir_type . ".'$plug/$file'"; |
|
| 1043 | + $_file = $root_dir_type.".'$plug/$file'"; |
|
| 1044 | 1044 | $contenu[$charge] .= "include_once_check($_file);\n"; |
| 1045 | 1045 | } |
| 1046 | 1046 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
| 1050 | 1050 | } |
| 1051 | 1051 | } |
| 1052 | 1052 | |
| 1053 | - $contenu['options'] = "define('_PLUGINS_HASH','" . md5($sign) . "');\n" . $contenu['options']; |
|
| 1053 | + $contenu['options'] = "define('_PLUGINS_HASH','".md5($sign)."');\n".$contenu['options']; |
|
| 1054 | 1054 | $contenu['fonctions'] .= plugin_ongletbouton("boutons_plugins", $boutons) |
| 1055 | 1055 | . plugin_ongletbouton("onglets_plugins", $onglets); |
| 1056 | 1056 | |
@@ -1085,12 +1085,12 @@ discard block |
||
| 1085 | 1085 | define("_UPDATED_$nom", $val); |
| 1086 | 1086 | define("_UPDATED_md5_$nom", $md5); |
| 1087 | 1087 | } |
| 1088 | - $val = "unserialize('" . str_replace("'", "\'", $val) . "')"; |
|
| 1088 | + $val = "unserialize('".str_replace("'", "\'", $val)."')"; |
|
| 1089 | 1089 | |
| 1090 | 1090 | return |
| 1091 | 1091 | "if (!function_exists('$nom')) {\n" |
| 1092 | 1092 | . "function $nom(){return defined('_UPDATED_$nom')?unserialize(_UPDATED_$nom):$val;}\n" |
| 1093 | - . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'" . $md5 . "';}\n" |
|
| 1093 | + . "function md5_$nom(){return defined('_UPDATED_md5_$nom')?_UPDATED_md5_$nom:'".$md5."';}\n" |
|
| 1094 | 1094 | . "}\n"; |
| 1095 | 1095 | } |
| 1096 | 1096 | |
@@ -1113,7 +1113,7 @@ discard block |
||
| 1113 | 1113 | if (@is_readable(_CACHE_PLUGINS_OPT)) { |
| 1114 | 1114 | include_once(_CACHE_PLUGINS_OPT); |
| 1115 | 1115 | } else { |
| 1116 | - spip_log("pipelines desactives: impossible de produire " . _CACHE_PLUGINS_OPT); |
|
| 1116 | + spip_log("pipelines desactives: impossible de produire "._CACHE_PLUGINS_OPT); |
|
| 1117 | 1117 | } |
| 1118 | 1118 | } |
| 1119 | 1119 | |
@@ -1150,7 +1150,7 @@ discard block |
||
| 1150 | 1150 | $dir_type = $plugin_valides[$p]['dir_type']; |
| 1151 | 1151 | $root_dir_type = str_replace('_DIR_', '_ROOT_', $dir_type); |
| 1152 | 1152 | $plug = $plugin_valides[$p]['dir']; |
| 1153 | - $prefix = (($info['prefix'] == "spip") ? "" : $info['prefix'] . "_"); |
|
| 1153 | + $prefix = (($info['prefix'] == "spip") ? "" : $info['prefix']."_"); |
|
| 1154 | 1154 | if (isset($info['pipeline']) and is_array($info['pipeline'])) { |
| 1155 | 1155 | foreach ($info['pipeline'] as $pipe) { |
| 1156 | 1156 | $nom = $pipe['nom']; |
@@ -1180,7 +1180,7 @@ discard block |
||
| 1180 | 1180 | } |
| 1181 | 1181 | if (isset($pipe['inclure'])) { |
| 1182 | 1182 | $GLOBALS['spip_matrice']["$prefix$action"] = |
| 1183 | - "$root_dir_type:$plug/" . $pipe['inclure']; |
|
| 1183 | + "$root_dir_type:$plug/".$pipe['inclure']; |
|
| 1184 | 1184 | } |
| 1185 | 1185 | } |
| 1186 | 1186 | } |
@@ -1190,7 +1190,7 @@ discard block |
||
| 1190 | 1190 | $prepend_code['taches_generales_cron'] = ""; |
| 1191 | 1191 | } |
| 1192 | 1192 | foreach ($info['genie'] as $genie) { |
| 1193 | - $nom = $prefix . $genie['nom']; |
|
| 1193 | + $nom = $prefix.$genie['nom']; |
|
| 1194 | 1194 | $periode = max(60, intval($genie['periode'])); |
| 1195 | 1195 | if (charger_fonction($nom, "genie", true)) { |
| 1196 | 1196 | $prepend_code['taches_generales_cron'] .= "\$val['$nom'] = $periode;\n"; |
@@ -1208,13 +1208,13 @@ discard block |
||
| 1208 | 1208 | } |
| 1209 | 1209 | foreach ($info['style'] as $style) { |
| 1210 | 1210 | if (isset($style['path']) and $style['path']) { |
| 1211 | - $code = "if (\$f=timestamp(direction_css(find_in_path('" . addslashes($style['path']) . "')))) "; |
|
| 1211 | + $code = "if (\$f=timestamp(direction_css(find_in_path('".addslashes($style['path'])."')))) "; |
|
| 1212 | 1212 | } else { |
| 1213 | - $code = "if (\$f='" . addslashes($style['url']) . "') "; |
|
| 1213 | + $code = "if (\$f='".addslashes($style['url'])."') "; |
|
| 1214 | 1214 | } |
| 1215 | 1215 | $code .= "\$val .= '<link rel=\"stylesheet\" href=\"'.\$f.'\" type=\"text/css\""; |
| 1216 | 1216 | if (isset($style['media']) and strlen($style['media'])) { |
| 1217 | - $code .= " media=\"" . addslashes($style['media']) . "\""; |
|
| 1217 | + $code .= " media=\"".addslashes($style['media'])."\""; |
|
| 1218 | 1218 | } |
| 1219 | 1219 | $code .= "/>';\n"; |
| 1220 | 1220 | if ($style['type'] != 'prive') { |
@@ -1234,9 +1234,9 @@ discard block |
||
| 1234 | 1234 | if (isset($info['script']) and count($info['script'])) { |
| 1235 | 1235 | foreach ($info['script'] as $script) { |
| 1236 | 1236 | if (isset($script['path']) and $script['path']) { |
| 1237 | - $code = "if (\$f=timestamp(find_in_path('" . addslashes($script['path']) . "'))) "; |
|
| 1237 | + $code = "if (\$f=timestamp(find_in_path('".addslashes($script['path'])."'))) "; |
|
| 1238 | 1238 | } else { |
| 1239 | - $code = "if (\$f='" . addslashes($script['url']) . "') "; |
|
| 1239 | + $code = "if (\$f='".addslashes($script['url'])."') "; |
|
| 1240 | 1240 | } |
| 1241 | 1241 | $code .= "\$val .= '<script src=\"'.\$f.'\" type=\"text/javascript\"></script>';\n"; |
| 1242 | 1242 | if ($script['type'] != 'prive') { |
@@ -1299,10 +1299,10 @@ discard block |
||
| 1299 | 1299 | unset($GLOBALS['spip_pipeline']['all']); |
| 1300 | 1300 | $all_pipes = trim(array_shift($a)); |
| 1301 | 1301 | if ($all_pipes) { |
| 1302 | - $all_pipes = '|' . ltrim($all_pipes, '|'); |
|
| 1302 | + $all_pipes = '|'.ltrim($all_pipes, '|'); |
|
| 1303 | 1303 | } |
| 1304 | 1304 | if (count($a)) { |
| 1305 | - $all_pipes_end = '||' . array_shift($a); |
|
| 1305 | + $all_pipes_end = '||'.array_shift($a); |
|
| 1306 | 1306 | } |
| 1307 | 1307 | } |
| 1308 | 1308 | $content = ""; |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | // Eclater le pipeline en filtres et appliquer chaque filtre |
| 1320 | 1320 | foreach ($pipe as $fonc) { |
| 1321 | 1321 | $fonc = trim($fonc); |
| 1322 | - $s_call .= '$val = minipipe(\'' . $fonc . '\', $val);' . "\n"; |
|
| 1322 | + $s_call .= '$val = minipipe(\''.$fonc.'\', $val);'."\n"; |
|
| 1323 | 1323 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 1324 | 1324 | $file = $GLOBALS['spip_matrice'][$fonc]; |
| 1325 | 1325 | $file = "'$file'"; |
@@ -1330,7 +1330,7 @@ discard block |
||
| 1330 | 1330 | if (defined($root_dir)) { |
| 1331 | 1331 | $dir = $root_dir; |
| 1332 | 1332 | } |
| 1333 | - $file = str_replace($regs[0], "'." . $dir . ".'", $file); |
|
| 1333 | + $file = str_replace($regs[0], "'.".$dir.".'", $file); |
|
| 1334 | 1334 | $file = str_replace("''.", "", $file); |
| 1335 | 1335 | $file = str_replace(constant($dir), '', $file); |
| 1336 | 1336 | } |
@@ -1343,7 +1343,7 @@ discard block |
||
| 1343 | 1343 | $content .= "// Pipeline $action \n" |
| 1344 | 1344 | . "function execute_pipeline_$action(&\$val){\n" |
| 1345 | 1345 | . $s_inc |
| 1346 | - . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action]) . "\n" : '') |
|
| 1346 | + . ((isset($prepend_code[$action]) and strlen($prepend_code[$action])) ? trim($prepend_code[$action])."\n" : '') |
|
| 1347 | 1347 | . $s_call |
| 1348 | 1348 | . "return \$val;\n}\n"; |
| 1349 | 1349 | } |
@@ -1427,18 +1427,18 @@ discard block |
||
| 1427 | 1427 | $GLOBALS['fichier_php_compile_recent'] = 0; |
| 1428 | 1428 | } |
| 1429 | 1429 | |
| 1430 | - $contenu = '<' . '?php' . "\n" . $comment . "\nif (defined('_ECRIRE_INC_VERSION')) {\n" . $contenu . "}\n?" . '>'; |
|
| 1430 | + $contenu = '<'.'?php'."\n".$comment."\nif (defined('_ECRIRE_INC_VERSION')) {\n".$contenu."}\n?".'>'; |
|
| 1431 | 1431 | // si un fichier existe deja on verifie que son contenu change avant de l'ecraser |
| 1432 | 1432 | // si pas de modif on ne touche pas au fichier initial |
| 1433 | 1433 | if (file_exists($nom)) { |
| 1434 | 1434 | if (substr($nom, -4) == '.php') { |
| 1435 | - $fichier_tmp = substr($nom, 0, -4) . '.tmp.php'; |
|
| 1435 | + $fichier_tmp = substr($nom, 0, -4).'.tmp.php'; |
|
| 1436 | 1436 | } |
| 1437 | 1437 | else { |
| 1438 | - $fichier_tmp = $nom . '.tmp'; |
|
| 1438 | + $fichier_tmp = $nom.'.tmp'; |
|
| 1439 | 1439 | } |
| 1440 | 1440 | file_put_contents($fichier_tmp, $contenu); |
| 1441 | - if(md5_file($nom) == md5_file($fichier_tmp)) { |
|
| 1441 | + if (md5_file($nom) == md5_file($fichier_tmp)) { |
|
| 1442 | 1442 | $GLOBALS['fichier_php_compile_recent'] = max($GLOBALS['fichier_php_compile_recent'], filemtime($nom)); |
| 1443 | 1443 | @unlink($fichier_tmp); |
| 1444 | 1444 | return; |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if ($compil_info) { |
| 55 | 55 | $contexte_compil = array( |
| 56 | - $trace[0]['file'],// sourcefile |
|
| 56 | + $trace[0]['file'], // sourcefile |
|
| 57 | 57 | '', //nom |
| 58 | - (isset($trace[1]) ? $trace[1]['function'] . "(){\n" : '') |
|
| 59 | - . $trace[0]['function'] . "();" |
|
| 58 | + (isset($trace[1]) ? $trace[1]['function']."(){\n" : '') |
|
| 59 | + . $trace[0]['function']."();" |
|
| 60 | 60 | . (isset($trace[1]) ? "\n}" : ''), //id_boucle |
| 61 | 61 | $trace[0]['line'], // ligne |
| 62 | 62 | $GLOBALS['spip_lang'], // lang |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | return $contexte_compil; |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $message = count($trace) ? $trace[0]['file'] . " L" . $trace[0]['line'] : ""; |
|
| 68 | + $message = count($trace) ? $trace[0]['file']." L".$trace[0]['line'] : ""; |
|
| 69 | 69 | $f = array(); |
| 70 | 70 | while (count($trace) and $t = array_shift($trace)) { |
| 71 | 71 | if (in_array($t['function'], array('include_once', 'include_spip', 'find_in_path'))) { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $f[] = $t['function']; |
| 75 | 75 | } |
| 76 | 76 | if (count($f)) { |
| 77 | - $message .= " [" . implode("(),", $f) . "()]"; |
|
| 77 | + $message .= " [".implode("(),", $f)."()]"; |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | return $message; |
@@ -255,8 +255,8 @@ discard block |
||
| 255 | 255 | } |
| 256 | 256 | // le debug, c'est pour ce qui a ete produit par le compilateur |
| 257 | 257 | if (isset($GLOBALS['debug']['aucasou'])) { |
| 258 | - list($table, $id, ) = $GLOBALS['debug']['aucasou']; |
|
| 259 | - $nom = $GLOBALS['debug_objets']['courant'] . $id; |
|
| 258 | + list($table, $id,) = $GLOBALS['debug']['aucasou']; |
|
| 259 | + $nom = $GLOBALS['debug_objets']['courant'].$id; |
|
| 260 | 260 | $GLOBALS['debug_objets']['requete'][$nom] = $query; |
| 261 | 261 | } |
| 262 | 262 | $res = $f($select, $from, $where, $groupby, $orderby, $limit, $having, $serveur, true); |
@@ -1133,7 +1133,7 @@ discard block |
||
| 1133 | 1133 | // la globale n'est remplie qu'apres l'appel de sql_serveur. |
| 1134 | 1134 | if ($spip == null) { |
| 1135 | 1135 | $connexion = $GLOBALS['connexions'][$serveur ? strtolower($serveur) : 0]; |
| 1136 | - $spip = $connexion['prefixe'] . '\_%'; |
|
| 1136 | + $spip = $connexion['prefixe'].'\_%'; |
|
| 1137 | 1137 | } |
| 1138 | 1138 | |
| 1139 | 1139 | return $f($spip, $serveur, $option !== false); |
@@ -2017,7 +2017,7 @@ discard block |
||
| 2017 | 2017 | function sql_in($val, $valeurs, $not = '', $serveur = '', $option = true) { |
| 2018 | 2018 | if (!is_array($valeurs)) { |
| 2019 | 2019 | $valeurs = strval($valeurs); |
| 2020 | - if(isset($valeurs[0]) and $valeurs[0] === ',') { |
|
| 2020 | + if (isset($valeurs[0]) and $valeurs[0] === ',') { |
|
| 2021 | 2021 | $valeurs = substr($valeurs, 1); |
| 2022 | 2022 | } |
| 2023 | 2023 | // on explode en tableau pour pouvoir securiser le contenu |
@@ -2028,7 +2028,7 @@ discard block |
||
| 2028 | 2028 | return false; |
| 2029 | 2029 | } |
| 2030 | 2030 | // sql_quote produit une chaine dans tous les cas |
| 2031 | - $valeurs = array_filter($valeurs, function ($v) { return !is_array($v);}); |
|
| 2031 | + $valeurs = array_filter($valeurs, function($v) { return !is_array($v); }); |
|
| 2032 | 2032 | $valeurs = array_unique($valeurs); |
| 2033 | 2033 | $valeurs = $f($valeurs); |
| 2034 | 2034 | |
@@ -2223,9 +2223,9 @@ discard block |
||
| 2223 | 2223 | $jour = 0; |
| 2224 | 2224 | } |
| 2225 | 2225 | |
| 2226 | - return sprintf("%04u", $annee) . '-' . sprintf("%02u", $mois) . '-' |
|
| 2227 | - . sprintf("%02u", $jour) . ' ' . sprintf("%02u", $h) . ':' |
|
| 2228 | - . sprintf("%02u", $m) . ':' . sprintf("%02u", $s); |
|
| 2226 | + return sprintf("%04u", $annee).'-'.sprintf("%02u", $mois).'-' |
|
| 2227 | + . sprintf("%02u", $jour).' '.sprintf("%02u", $h).':' |
|
| 2228 | + . sprintf("%02u", $m).':'.sprintf("%02u", $s); |
|
| 2229 | 2229 | } |
| 2230 | 2230 | |
| 2231 | 2231 | |
@@ -2287,7 +2287,7 @@ discard block |
||
| 2287 | 2287 | */ |
| 2288 | 2288 | function prefixer_table_spip($table, $prefixe) { |
| 2289 | 2289 | if ($prefixe) { |
| 2290 | - $table = preg_replace('/^spip_/', $prefixe . '_', $table); |
|
| 2290 | + $table = preg_replace('/^spip_/', $prefixe.'_', $table); |
|
| 2291 | 2291 | } |
| 2292 | 2292 | return $table; |
| 2293 | 2293 | } |
| 2294 | 2294 | \ No newline at end of file |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | static $t1 = array('&', '<', '>'); |
| 121 | 121 | static $t2 = array('&', '<', '>'); |
| 122 | 122 | |
| 123 | - return '<pre>' . str_replace($t1, $t2, $t) . '</pre>'; |
|
| 123 | + return '<pre>'.str_replace($t1, $t2, $t).'</pre>'; |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | /** |
@@ -140,12 +140,12 @@ discard block |
||
| 140 | 140 | foreach ($lignes as &$l) { |
| 141 | 141 | $l = join('|', $l); |
| 142 | 142 | } |
| 143 | - $corps = join("\n", $lignes) . "\n"; |
|
| 144 | - $corps = $caption . |
|
| 145 | - "\n|{{" . |
|
| 146 | - join('}}|{{', $entete) . |
|
| 147 | - '}}|' . |
|
| 148 | - "\n|" . |
|
| 143 | + $corps = join("\n", $lignes)."\n"; |
|
| 144 | + $corps = $caption. |
|
| 145 | + "\n|{{". |
|
| 146 | + join('}}|{{', $entete). |
|
| 147 | + '}}|'. |
|
| 148 | + "\n|". |
|
| 149 | 149 | str_replace("\n", "|\n|", $corps); |
| 150 | 150 | include_spip('inc/texte'); |
| 151 | 151 | |
@@ -185,9 +185,9 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
| 188 | - $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 188 | + $t = safehtml(preg_replace(',<script'.'.*?</script>,is', '', $t)); |
|
| 189 | 189 | |
| 190 | - return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 190 | + return (!$style ? '' : "\n<style>".$style.'</style>').$t; |
|
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | /** |
@@ -70,24 +70,23 @@ discard block |
||
| 70 | 70 | list($fid, $dir, $nom, $format) = $logo; |
| 71 | 71 | $logo = image_recadre_avec_fallback("<img src='$fid' alt='' />", 70, 70); |
| 72 | 72 | if ($logo) { |
| 73 | - $logo = wrap(inserer_attribut($logo, 'class', 'logo'),'<span class="logo-carre">'); |
|
| 73 | + $logo = wrap(inserer_attribut($logo, 'class', 'logo'), '<span class="logo-carre">'); |
|
| 74 | 74 | } |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : |
|
| 79 | - http_img_pack( |
|
| 78 | + $lib_bouton = (!acces_restreint_rubrique($id_rubrique) ? '' : http_img_pack( |
|
| 80 | 79 | 'auteur-0minirezo-16.png', |
| 81 | 80 | '', |
| 82 | 81 | " width='16' height='16'", |
| 83 | 82 | _T('image_administrer_rubrique') |
| 84 | - )) . |
|
| 85 | - " <a class='titremlien' dir='$lang_dir'" . |
|
| 86 | - ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='" . $row['lang'] . "'" : '') . |
|
| 87 | - " href='" . |
|
| 88 | - generer_url_entite($id_rubrique, 'rubrique') . |
|
| 89 | - "'><span class='titre'>" . |
|
| 90 | - $rang . $titre |
|
| 83 | + )). |
|
| 84 | + " <a class='titremlien' dir='$lang_dir'". |
|
| 85 | + ($row['lang'] !== $GLOBALS['spip_lang'] ? " hreflang='".$row['lang']."'" : ''). |
|
| 86 | + " href='". |
|
| 87 | + generer_url_entite($id_rubrique, 'rubrique'). |
|
| 88 | + "'><span class='titre'>". |
|
| 89 | + $rang.$titre |
|
| 91 | 90 | . '</span>' |
| 92 | 91 | . (is_string($logo) ? $logo : '') |
| 93 | 92 | . '</a>'; |
@@ -97,8 +96,8 @@ discard block |
||
| 97 | 96 | ; |
| 98 | 97 | |
| 99 | 98 | $res[] = |
| 100 | - debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre) . |
|
| 101 | - $les_sous_enfants . |
|
| 99 | + debut_cadre_sous_rub(($id_parent ? 'rubrique-24.png' : 'secteur-24.png'), true, '', $titre). |
|
| 100 | + $les_sous_enfants. |
|
| 102 | 101 | fin_cadre_sous_rub(true); |
| 103 | 102 | } |
| 104 | 103 | } |
@@ -129,10 +128,10 @@ discard block |
||
| 129 | 128 | * Si > 500 on affiche une pagination |
| 130 | 129 | */ |
| 131 | 130 | if ($nb > $limite) { |
| 132 | - $debut = _request('debut_rubrique' . $collection2) ? _request('debut_rubrique' . $collection2) : $debut; |
|
| 131 | + $debut = _request('debut_rubrique'.$collection2) ? _request('debut_rubrique'.$collection2) : $debut; |
|
| 133 | 132 | $pagination = chercher_filtre('pagination'); |
| 134 | - $pagination = '<p class="pagination">' . $pagination($nb, '_rubrique' . $collection2, $debut, $limite, true, |
|
| 135 | - 'prive') . '</p>'; |
|
| 133 | + $pagination = '<p class="pagination">'.$pagination($nb, '_rubrique'.$collection2, $debut, $limite, true, |
|
| 134 | + 'prive').'</p>'; |
|
| 136 | 135 | $limite = $debut + $limite; |
| 137 | 136 | } |
| 138 | 137 | |
@@ -159,14 +158,14 @@ discard block |
||
| 159 | 158 | changer_typo($row['lang']); |
| 160 | 159 | $lang_dir = lang_dir($row['lang']); |
| 161 | 160 | if (autoriser('voir', 'rubrique', $id_rubrique2)) { |
| 162 | - $retour .= "\n<li class='item' dir='$lang_dir'><a href='" . generer_url_entite( |
|
| 161 | + $retour .= "\n<li class='item' dir='$lang_dir'><a href='".generer_url_entite( |
|
| 163 | 162 | $id_rubrique2, |
| 164 | 163 | 'rubrique' |
| 165 | - ) . "'>" . $rang2 . $titre2 . "</a></li>\n"; |
|
| 164 | + )."'>".$rang2.$titre2."</a></li>\n"; |
|
| 166 | 165 | } |
| 167 | 166 | } |
| 168 | 167 | |
| 169 | - $retour = $pagination . $retour . $pagination; |
|
| 168 | + $retour = $pagination.$retour.$pagination; |
|
| 170 | 169 | |
| 171 | 170 | if (!$retour) { |
| 172 | 171 | return ''; |
@@ -175,7 +174,7 @@ discard block |
||
| 175 | 174 | return debut_block_depliable($debut > 0 ? true : false, "enfants$collection2") |
| 176 | 175 | . "\n<ul class='liste-items sous-sous-rub'>\n" |
| 177 | 176 | . $retour |
| 178 | - . "</ul>\n" . fin_block() . "\n\n"; |
|
| 177 | + . "</ul>\n".fin_block()."\n\n"; |
|
| 179 | 178 | } |
| 180 | 179 | |
| 181 | 180 | /** |
@@ -197,10 +196,10 @@ discard block |
||
| 197 | 196 | $nb = sql_countsel('spip_rubriques', 'id_parent='.intval($id_rubrique)); |
| 198 | 197 | |
| 199 | 198 | if ($nb > $limite) { |
| 200 | - $debut = _request('debut_rubrique' . $id_rubrique) ? _request('debut_rubrique' . $id_rubrique) : $debut; |
|
| 199 | + $debut = _request('debut_rubrique'.$id_rubrique) ? _request('debut_rubrique'.$id_rubrique) : $debut; |
|
| 201 | 200 | $pagination = chercher_filtre('pagination'); |
| 202 | - $pagination = '<br class="nettoyeur"><p class="pagination">' . |
|
| 203 | - $pagination($nb, '_rubrique' . $id_rubrique, $debut, $limite, true, 'prive') . |
|
| 201 | + $pagination = '<br class="nettoyeur"><p class="pagination">'. |
|
| 202 | + $pagination($nb, '_rubrique'.$id_rubrique, $debut, $limite, true, 'prive'). |
|
| 204 | 203 | '</p>'; |
| 205 | 204 | } |
| 206 | 205 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | $GLOBALS['contexte'] = calculer_contexte(); |
| 39 | 39 | $page = array('contexte_implicite' => calculer_contexte_implicite()); |
| 40 | - $page['contexte_implicite']['cache'] = $fond . preg_replace(',\.[a-zA-Z0-9]*$,', '', |
|
| 40 | + $page['contexte_implicite']['cache'] = $fond.preg_replace(',\.[a-zA-Z0-9]*$,', '', |
|
| 41 | 41 | preg_replace('/[?].*$/', '', $GLOBALS['REQUEST_URI'])); |
| 42 | 42 | // Cette fonction est utilisee deux fois |
| 43 | 43 | $cacher = charger_fonction('cacher', 'public', true); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | $lastmodified, $connect); |
| 119 | 119 | if ($page === '') { |
| 120 | 120 | $erreur = _T('info_erreur_squelette2', |
| 121 | - array('fichier' => spip_htmlspecialchars($fond) . '.' . _EXTENSION_SQUELETTES)); |
|
| 121 | + array('fichier' => spip_htmlspecialchars($fond).'.'._EXTENSION_SQUELETTES)); |
|
| 122 | 122 | erreur_squelette($erreur); |
| 123 | 123 | // eviter des erreurs strictes ensuite sur $page['cle'] en PHP >= 5.4 |
| 124 | 124 | $page = array('texte' => '', 'erreur' => $erreur); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | and !isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) |
| 161 | 161 | and !isset($page['entetes']["Last-Modified"]) |
| 162 | 162 | ) { |
| 163 | - $page['entetes']["Last-Modified"] = gmdate("D, d M Y H:i:s", $lastmodified) . " GMT"; |
|
| 163 | + $page['entetes']["Last-Modified"] = gmdate("D, d M Y H:i:s", $lastmodified)." GMT"; |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | // fermer la connexion apres les headers si requete HEAD |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | 'spip_version_code' => $GLOBALS['spip_version_code'], |
| 226 | 226 | ); |
| 227 | 227 | if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { |
| 228 | - $contexte_implicite['host'] .= "|" . $_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 228 | + $contexte_implicite['host'] .= "|".$_SERVER['HTTP_X_FORWARDED_HOST']; |
|
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | return $contexte_implicite; |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | * et il ne doit etre utilise que pour trouver le id_xx si pas de $id fourni (cas appel depuis styliser) |
| 524 | 524 | * @return string |
| 525 | 525 | */ |
| 526 | -function styliser_modele($modele, $id, $contexte=null) { |
|
| 526 | +function styliser_modele($modele, $id, $contexte = null) { |
|
| 527 | 527 | static $styliseurs = null; |
| 528 | 528 | if (is_null($styliseurs)) { |
| 529 | 529 | $tables_objet = lister_tables_objets_sql(); |
@@ -549,7 +549,7 @@ discard block |
||
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | if (is_null($id)) { |
| 552 | - $msg = "modeles/$modele : " . _T('zbug_parametres_inclus_incorrects', array('param' => "id/$primary")); |
|
| 552 | + $msg = "modeles/$modele : "._T('zbug_parametres_inclus_incorrects', array('param' => "id/$primary")); |
|
| 553 | 553 | erreur_squelette($msg); |
| 554 | 554 | // on passe id=0 au routeur pour tomber sur le modele par defaut et eviter une seconde erreur sur un modele inexistant |
| 555 | 555 | $id = 0; |
@@ -596,7 +596,7 @@ discard block |
||
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | if (preg_match(',^[a-z0-9_]+$,', $soustype)) { |
| 599 | - if (!trouve_modele($fond = ($type . '_' . $soustype))) { |
|
| 599 | + if (!trouve_modele($fond = ($type.'_'.$soustype))) { |
|
| 600 | 600 | $fond = ''; |
| 601 | 601 | $class = $soustype; |
| 602 | 602 | } |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | |
| 612 | 612 | return false; |
| 613 | 613 | } |
| 614 | - $fond = 'modeles/' . $fond; |
|
| 614 | + $fond = 'modeles/'.$fond; |
|
| 615 | 615 | // Creer le contexte |
| 616 | 616 | $contexte = $env; |
| 617 | 617 | $contexte['dir_racine'] = _DIR_RACINE; # eviter de mixer un cache racine et un cache ecrire (meme si pour l'instant les modeles ne sont pas caches, le resultat etant different il faut que le contexte en tienne compte |
@@ -650,13 +650,13 @@ discard block |
||
| 650 | 650 | // Regarder si le modele tient compte des liens (il *doit* alors indiquer |
| 651 | 651 | // spip_lien_ok dans les classes de son conteneur de premier niveau ; |
| 652 | 652 | // sinon, s'il y a un lien, on l'ajoute classiquement |
| 653 | - if (strstr(' ' . ($classes = extraire_attribut($retour, 'class')) . ' ', |
|
| 653 | + if (strstr(' '.($classes = extraire_attribut($retour, 'class')).' ', |
|
| 654 | 654 | 'spip_lien_ok')) { |
| 655 | 655 | $retour = inserer_attribut($retour, 'class', |
| 656 | 656 | trim(str_replace(' spip_lien_ok ', ' ', " $classes "))); |
| 657 | 657 | } else { |
| 658 | 658 | if ($lien) { |
| 659 | - $retour = "<a href='" . $lien['href'] . "' class='" . $lien['class'] . "'>" . $retour . "</a>"; |
|
| 659 | + $retour = "<a href='".$lien['href']."' class='".$lien['class']."'>".$retour."</a>"; |
|
| 660 | 660 | } |
| 661 | 661 | } |
| 662 | 662 | |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | return $page; |
| 681 | 681 | } |
| 682 | 682 | // eval $page et affecte $res |
| 683 | - include _ROOT_RESTREINT . "public/evaluer_page.php"; |
|
| 683 | + include _ROOT_RESTREINT."public/evaluer_page.php"; |
|
| 684 | 684 | |
| 685 | 685 | // Lever un drapeau (global) si le fond utilise #SESSION |
| 686 | 686 | // a destination de public/parametrer |
@@ -739,24 +739,24 @@ discard block |
||
| 739 | 739 | } |
| 740 | 740 | } |
| 741 | 741 | |
| 742 | - if ($insert){ |
|
| 742 | + if ($insert) { |
|
| 743 | 743 | include_spip('inc/filtres_mini'); |
| 744 | 744 | // ajouter un base qui reglera tous les liens relatifs |
| 745 | 745 | $href_base = url_absolue('./'); |
| 746 | 746 | $base = "\n<base href=\"$href_base\" />"; |
| 747 | - if (($pos = strpos($head, '<head>'))!==false){ |
|
| 748 | - $head = substr_replace($head, $base, $pos+6, 0); |
|
| 747 | + if (($pos = strpos($head, '<head>')) !== false) { |
|
| 748 | + $head = substr_replace($head, $base, $pos + 6, 0); |
|
| 749 | 749 | } elseif (preg_match(",<head[^>]*>,i", $head, $r)) { |
| 750 | - $head = str_replace($r[0], $r[0] . $base, $head); |
|
| 750 | + $head = str_replace($r[0], $r[0].$base, $head); |
|
| 751 | 751 | } |
| 752 | - $texte = $head . substr($texte, $poshead); |
|
| 752 | + $texte = $head.substr($texte, $poshead); |
|
| 753 | 753 | } |
| 754 | 754 | if ($href_base) { |
| 755 | 755 | // gerer les ancres |
| 756 | 756 | $base = $_SERVER['REQUEST_URI']; |
| 757 | 757 | // pas de guillemets ni < dans l'URL qu'on insere dans le HTML |
| 758 | - if (strpos($base,"'") or strpos($base,'"') or strpos($base,'<')) { |
|
| 759 | - $base = str_replace(array("'",'"','<'),array("%27",'%22','%3C'), $base); |
|
| 758 | + if (strpos($base, "'") or strpos($base, '"') or strpos($base, '<')) { |
|
| 759 | + $base = str_replace(array("'", '"', '<'), array("%27", '%22', '%3C'), $base); |
|
| 760 | 760 | } |
| 761 | 761 | if (strpos($texte, "href='#") !== false) { |
| 762 | 762 | $texte = str_replace("href='#", "href='$base#", $texte); |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | |
| 91 | 91 | $titre = "<title>[" |
| 92 | 92 | . $nom_site_spip |
| 93 | - . "] " . $match |
|
| 93 | + . "] ".$match |
|
| 94 | 94 | . "</title>"; |
| 95 | 95 | |
| 96 | 96 | $texte = substr_replace($texte, $titre, $p + 6, 0); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | } elseif ($fond == "prive/squelettes/extra/$typepage") { |
| 149 | 149 | include_spip('inc/presentation_mini'); |
| 150 | 150 | $flux['data']['texte'] = pipeline('affiche_droite', |
| 151 | - array('args' => $flux['args']['contexte'], 'data' => $flux['data']['texte'])) . liste_objets_bloques($exec, |
|
| 151 | + array('args' => $flux['args']['contexte'], 'data' => $flux['data']['texte'])).liste_objets_bloques($exec, |
|
| 152 | 152 | $flux['args']['contexte']); |
| 153 | 153 | } elseif ($fond == "prive/squelettes/hierarchie/$typepage" and $o[$exec]) { |
| 154 | 154 | // id non defini sur les formulaire de nouveaux objets |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | ) { |
| 177 | 177 | // inserer le formulaire de traduction |
| 178 | 178 | $flux['data']['texte'] = str_replace("<!--affiche_milieu-->", recuperer_fond('prive/objets/editer/traductions', |
| 179 | - array('objet' => $objet, 'id_objet' => $id, 'espace_prive' => 1)) . "<!--affiche_milieu-->", $flux['data']['texte']); |
|
| 179 | + array('objet' => $objet, 'id_objet' => $id, 'espace_prive' => 1))."<!--affiche_milieu-->", $flux['data']['texte']); |
|
| 180 | 180 | $flux['data']['texte'] = pipeline('afficher_fiche_objet', array( |
| 181 | 181 | 'args' => array( |
| 182 | 182 | 'contexte' => $flux['args']['contexte'], |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | $full_marqueur = "$ouvrir$marqueur$fermer"; |
| 240 | 240 | |
| 241 | 241 | // Le marqueur est absent : on l'ajoute avant l'élément indiqué |
| 242 | - if ($marqueur_pos === false) { |
|
| 242 | + if ($marqueur_pos === false) { |
|
| 243 | 243 | $texte = preg_replace( |
| 244 | 244 | ",$inserer_avant,", |
| 245 | 245 | "$full_marqueur\\0", |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | } elseif ( |
| 252 | 252 | $marqueur_pos !== false |
| 253 | 253 | and $encapsuler |
| 254 | - and substr($texte, $marqueur_pos-strlen($ouvrir), strlen($ouvrir)) !== $ouvrir |
|
| 254 | + and substr($texte, $marqueur_pos - strlen($ouvrir), strlen($ouvrir)) !== $ouvrir |
|
| 255 | 255 | ) { |
| 256 | 256 | $texte = substr_replace( |
| 257 | 257 | $texte, |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | if ($res) { |
| 286 | - $flux['data'] = $res . $flux['data']; |
|
| 286 | + $flux['data'] = $res.$flux['data']; |
|
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | return $flux; |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | * Texte |
| 42 | 42 | */ |
| 43 | 43 | function sandbox_composer_texte($texte, &$p) { |
| 44 | - $code = "'" . str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte) . "'"; |
|
| 44 | + $code = "'".str_replace(array("\\", "'"), array("\\\\", "\\'"), $texte)."'"; |
|
| 45 | 45 | |
| 46 | 46 | return $code; |
| 47 | 47 | } |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | * Balise qui appelle ce filtre |
| 59 | 59 | * @return string |
| 60 | 60 | */ |
| 61 | -function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite=1000) : string { |
|
| 61 | +function sandbox_composer_filtre($fonc, $code, $arglist, &$p, $nb_arg_droite = 1000) : string { |
|
| 62 | 62 | if (isset($GLOBALS['spip_matrice'][$fonc])) { |
| 63 | 63 | $code = "filtrer('$fonc',$code$arglist)"; |
| 64 | 64 | } |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | $code = "$f($code$arglist)"; |
| 83 | 83 | $nb_arg_gauche = 1; // la balise à laquelle s'applique le filtre |
| 84 | 84 | } |
| 85 | - $nb_args_f = $nb_arg_gauche+$nb_arg_droite; |
|
| 85 | + $nb_args_f = $nb_arg_gauche + $nb_arg_droite; |
|
| 86 | 86 | $min_f = $refl->getNumberOfRequiredParameters(); |
| 87 | 87 | if (($nb_args_f < $min_f)) { |
| 88 | - $msg_args = ['filtre' => texte_script ($fonc), 'nb'=> $min_f - $nb_args_f]; |
|
| 89 | - erreur_squelette ([ 'zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 88 | + $msg_args = ['filtre' => texte_script($fonc), 'nb'=> $min_f - $nb_args_f]; |
|
| 89 | + erreur_squelette(['zbug_erreur_filtre_nbarg_min', $msg_args], $p); |
|
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | // le filtre n'existe pas, |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | */ |
| 172 | 172 | function sandbox_filtrer_squelette($skel, $corps, $filtres) { |
| 173 | 173 | $series_filtres = func_get_args(); |
| 174 | - array_shift($series_filtres);// skel |
|
| 175 | - array_shift($series_filtres);// corps |
|
| 174 | + array_shift($series_filtres); // skel |
|
| 175 | + array_shift($series_filtres); // corps |
|
| 176 | 176 | |
| 177 | 177 | // proteger les <INCLUDE> et tous les morceaux de php licites |
| 178 | 178 | if ($skel['process_ins'] == 'php') { |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | if (is_array($r)) { |
| 221 | 221 | $dst[] = $r[0]; |
| 222 | 222 | |
| 223 | - return $src[] = '___' . md5($r[0]) . '___'; |
|
| 223 | + return $src[] = '___'.md5($r[0]).'___'; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | // si on recoit pas un tableau, on renvoit les couples de substitution |
@@ -48,11 +48,11 @@ discard block |
||
| 48 | 48 | $_class = interprete_argument_balise(3, $p); |
| 49 | 49 | $_role = interprete_argument_balise(4, $p); |
| 50 | 50 | $_id = interprete_argument_balise(5, $p); |
| 51 | - $_texte = ($_texte ? $_texte : "''"); |
|
| 51 | + $_texte = ($_texte ? $_texte : "''"); |
|
| 52 | 52 | $_titre = ($_titre ? ", $_titre" : ', null'); |
| 53 | 53 | $_class = ($_class ? ", $_class" : ', null'); |
| 54 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 54 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 55 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 56 | 56 | |
| 57 | 57 | $f = chercher_filtre('message_alerte'); |
| 58 | 58 | $p->code = "$f($_texte$_titre$_class$_role$_id)"; |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | $_class = interprete_argument_balise(2, $p); |
| 91 | 91 | $_role = interprete_argument_balise(3, $p); |
| 92 | 92 | $_id = interprete_argument_balise(4, $p); |
| 93 | - $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 93 | + $_titre = ($_titre ? "$_titre" : 'null'); |
|
| 94 | 94 | $_class = ($_class ? ", $_class" : ', null'); |
| 95 | - $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | - $_id = ($_id ? ", $_id" : ', null'); |
|
| 95 | + $_role = ($_role ? ", $_role" : ', null'); |
|
| 96 | + $_id = ($_id ? ", $_id" : ', null'); |
|
| 97 | 97 | |
| 98 | 98 | $f = chercher_filtre('message_alerte_ouvrir'); |
| 99 | 99 | $p->code = "$f($_titre$_class$_role$_id)"; |
@@ -163,8 +163,8 @@ discard block |
||
| 163 | 163 | $message_alerte_ouvrir = chercher_filtre('message_alerte_ouvrir'); |
| 164 | 164 | $message_alerte_fermer = chercher_filtre('message_alerte_fermer'); |
| 165 | 165 | $message = |
| 166 | - $message_alerte_ouvrir($titre, $class, $role, $id) . |
|
| 167 | - $texte . |
|
| 166 | + $message_alerte_ouvrir($titre, $class, $role, $id). |
|
| 167 | + $texte. |
|
| 168 | 168 | $message_alerte_fermer(); |
| 169 | 169 | |
| 170 | 170 | return $message; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | ]; |
| 214 | 214 | $type = array_intersect(explode(' ', $class), $types); |
| 215 | 215 | $type = reset($type); |
| 216 | - $class = trim(str_replace($types, '', $class) . " $type"); |
|
| 216 | + $class = trim(str_replace($types, '', $class)." $type"); |
|
| 217 | 217 | |
| 218 | 218 | // Classes |
| 219 | 219 | $class_racine = 'msg-alert'; |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | |
| 239 | 239 | // Attributs |
| 240 | 240 | $attr_role = ($role ? "role=\"$role\"" : ''); |
| 241 | - $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 241 | + $attr_id = ($id ? "id=\"$id\"" : ''); |
|
| 242 | 242 | $attr_data = ($type ? "data-alert=\"$type\"" : ''); |
| 243 | 243 | |
| 244 | 244 | $message = |
@@ -34,9 +34,9 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | $res = sql_select("rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant", |
| 36 | 36 | "spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)", |
| 37 | - "rub1.id_parent = " . sql_quote($id_rubrique) . " |
|
| 38 | - AND rub1.id_rubrique!=" . sql_quote($exclu) . " |
|
| 39 | - AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu) . ")", "", "0+rub1.titre,rub1.titre"); |
|
| 37 | + "rub1.id_parent = ".sql_quote($id_rubrique)." |
|
| 38 | + AND rub1.id_rubrique!=" . sql_quote($exclu)." |
|
| 39 | + AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=" . sql_quote($exclu).")", "", "0+rub1.titre,rub1.titre"); |
|
| 40 | 40 | |
| 41 | 41 | while ($row = sql_fetch($res)) { |
| 42 | 42 | if (autoriser('voir', 'rubrique', $row['id_rubrique'])) { |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | if ($row['langue_choisie'] != 'oui') { |
| 47 | 47 | $t .= ' <small title="' |
| 48 | 48 | . traduire_nom_langue($row['lang']) |
| 49 | - . '">[' . $row['lang'] . ']</small>'; |
|
| 49 | + . '">['.$row['lang'].']</small>'; |
|
| 50 | 50 | } |
| 51 | 51 | $ordre[$row['id_rubrique']] = $t; |
| 52 | 52 | } |
@@ -54,14 +54,14 @@ discard block |
||
| 54 | 54 | } |
| 55 | 55 | $next = isset($list[$col]) ? $list[$col] : 0; |
| 56 | 56 | if ($ordre) { |
| 57 | - $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1)); |
|
| 57 | + $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1)); |
|
| 58 | 58 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 59 | - $args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event"; |
|
| 59 | + $args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event"; |
|
| 60 | 60 | |
| 61 | 61 | foreach ($ordre as $id => $titrebrut) { |
| 62 | 62 | $titre = supprimer_numero($titrebrut); |
| 63 | 63 | |
| 64 | - $classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : "petit-secteur"); |
|
| 64 | + $classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : "petit-secteur"); |
|
| 65 | 65 | if (isset($rub[$id]["enfants"])) { |
| 66 | 66 | $classe2 = " class='rub-ouverte'"; |
| 67 | 67 | $url = "\nhref='$rec&id=$id'"; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $url = "\nhref='javascript:void(0)'"; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $js_func = $do . '_selection_titre'; |
|
| 73 | + $js_func = $do.'_selection_titre'; |
|
| 74 | 74 | $click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " |
| 75 | 75 | . (!is_array($list) ? ' false' |
| 76 | 76 | : "aff_selection_provisoire($id,$args)") |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $idom2 = $idom . "_col_" . ($col + 1); |
|
| 100 | + $idom2 = $idom."_col_".($col + 1); |
|
| 101 | 101 | $left = ($col * 250); |
| 102 | 102 | |
| 103 | 103 | return http_img_pack("loader.svg", "", |
| 104 | - "class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ": " |
|
| 104 | + "class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].": " |
|
| 105 | 105 | . ($left - 30) |
| 106 | 106 | . "px; top: 2px; z-index: 2;' id='img_$idom2'") |
| 107 | - . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ": " |
|
| 107 | + . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].": " |
|
| 108 | 108 | . ($left - 250) |
| 109 | 109 | . "px;'>" |
| 110 | 110 | . $ret |