@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if ($objet == 'rubrique') { |
| 115 | 115 | // si c'est une rubrique-secteur contenant des breves, demander la |
| 116 | 116 | // confirmation du deplacement |
| 117 | - $contient_breves = sql_countsel('spip_breves', 'id_rubrique=' . intval($id_objet)); |
|
| 117 | + $contient_breves = sql_countsel('spip_breves', 'id_rubrique='.intval($id_objet)); |
|
| 118 | 118 | |
| 119 | 119 | if ($contient_breves > 0) { |
| 120 | 120 | $scb = ($contient_breves > 1 ? 's' : ''); |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ); |
| 128 | 128 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 129 | 129 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 130 | - . $scb . |
|
| 130 | + . $scb. |
|
| 131 | 131 | "</label></div></div>\n"; |
| 132 | 132 | } else { |
| 133 | 133 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -136,11 +136,11 @@ discard block |
||
| 136 | 136 | $form .= $confirm; |
| 137 | 137 | if ($actionable) { |
| 138 | 138 | if (strpos($form, '<select') !== false) { |
| 139 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 140 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 139 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 140 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 141 | 141 | . '</div>'; |
| 142 | 142 | } |
| 143 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 143 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 144 | 144 | if ($action = charger_fonction("editer_$objet", 'action', true)) { |
| 145 | 145 | $form = generer_action_auteur( |
| 146 | 146 | "editer_$objet", |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | |
| 167 | 167 | include_spip('inc/presentation'); |
| 168 | 168 | |
| 169 | - return debut_cadre_couleur($logo, true, '', $titre) . $form . fin_cadre_couleur(); |
|
| 169 | + return debut_cadre_couleur($logo, true, '', $titre).$form.fin_cadre_couleur(); |
|
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if ($statut == 'nouveau') { |
| 243 | 243 | if ($attente) { |
| 244 | 244 | $statut = $attente; |
| 245 | - $plus = ' (' . _T('info_statut_auteur_a_confirmer') . ')'; |
|
| 245 | + $plus = ' ('._T('info_statut_auteur_a_confirmer').')'; |
|
| 246 | 246 | } else { |
| 247 | 247 | return _T('info_statut_auteur_a_confirmer'); |
| 248 | 248 | } |
@@ -255,16 +255,16 @@ discard block |
||
| 255 | 255 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 256 | 256 | ]; |
| 257 | 257 | if (isset($recom[$statut])) { |
| 258 | - return $recom[$statut] . $plus; |
|
| 258 | + return $recom[$statut].$plus; |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | // retrouver directement par le statut sinon |
| 262 | 262 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 263 | 263 | if (isset($recom[$t])) { |
| 264 | - return $recom[$t] . $plus; |
|
| 264 | + return $recom[$t].$plus; |
|
| 265 | 265 | } |
| 266 | 266 | |
| 267 | - return _T($t) . $plus; |
|
| 267 | + return _T($t).$plus; |
|
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 389 | 389 | $in = !(is_countable($GLOBALS['connect_id_rubrique']) ? count($GLOBALS['connect_id_rubrique']) : 0) |
| 390 | 390 | ? '' |
| 391 | - : (' AND ' . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 391 | + : (' AND '.sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 392 | 392 | |
| 393 | 393 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
| 394 | 394 | if ($objet == 'rubrique') { |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | return ''; |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - return propre('[->' . $virtuel . ']'); |
|
| 425 | + return propre('[->'.$virtuel.']'); |
|
| 426 | 426 | } |
| 427 | 427 | |
| 428 | 428 | |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | $clic = http_img_pack('rss-16.png', 'RSS', '', $title); |
| 450 | 450 | |
| 451 | 451 | $url = generer_url_api_low_sec('transmettre', 'rss', $op, '', http_build_query($args), false, true); |
| 452 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 452 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | ); |
| 526 | 526 | |
| 527 | 527 | if ($alertes = array_filter($alertes)) { |
| 528 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 528 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 529 | 529 | join(' | ', $alertes) |
| 530 | 530 | . '</div></div>'; |
| 531 | 531 | } |
@@ -559,13 +559,13 @@ discard block |
||
| 559 | 559 | */ |
| 560 | 560 | function afficher_plus_info($lien, $titre = '+', $titre_lien = '') { |
| 561 | 561 | $titre = attribut_html($titre); |
| 562 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 563 | - http_img_pack('information-16.png', $titre) . '</a>'; |
|
| 562 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 563 | + http_img_pack('information-16.png', $titre).'</a>'; |
|
| 564 | 564 | |
| 565 | 565 | if (!$titre_lien) { |
| 566 | 566 | return $icone; |
| 567 | 567 | } else { |
| 568 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 568 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 569 | 569 | } |
| 570 | 570 | } |
| 571 | 571 | |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | krsort($items); |
| 18 | - $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte); |
|
| 18 | + $texte = str_replace($placeholder, implode("\n\t", $items)."\n", $texte); |
|
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | return $texte; |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | if ($changer_lang != 'herit') { |
| 46 | 46 | $set['lang'] = $changer_lang; |
| 47 | - sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 47 | + sql_updateq($table_objet_sql, $set, "$id_table_objet=".intval($id), [], $serveur); |
|
| 48 | 48 | include_spip('inc/rubriques'); // pour calculer_langues_rubriques et calculer_langues_utilisees |
| 49 | 49 | if ($table_objet_sql == 'spip_rubriques') { |
| 50 | 50 | calculer_langues_rubriques(); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $langues = calculer_langues_utilisees($serveur); |
| 53 | 53 | ecrire_meta('langues_utilisees', $langues); |
| 54 | 54 | } else { |
| 55 | - $langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 55 | + $langue_parent = sql_getfetsel('lang', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 56 | 56 | if (!$langue_parent) { |
| 57 | 57 | $langue_parent = $GLOBALS['meta']['langue_site']; |
| 58 | 58 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | if (isset($set['langue_choisie'])) { |
| 62 | 62 | $set['langue_choisie'] = 'non'; |
| 63 | 63 | } |
| 64 | - sql_updateq($table_objet_sql, $set, "$id_table_objet=" . intval($id), [], $serveur); |
|
| 64 | + sql_updateq($table_objet_sql, $set, "$id_table_objet=".intval($id), [], $serveur); |
|
| 65 | 65 | if ($table_objet_sql == 'spip_rubriques') { |
| 66 | 66 | include_spip('inc/rubriques'); |
| 67 | 67 | calculer_langues_rubriques(); |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | if ($GLOBALS['spip_version_base'] != $GLOBALS['meta']['version_installee']) { |
| 57 | 57 | if (!is_numeric(_request('reinstall'))) { |
| 58 | 58 | include_spip('base/create'); |
| 59 | - spip_log('recree les tables eventuellement disparues', 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 59 | + spip_log('recree les tables eventuellement disparues', 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 60 | 60 | creer_base(); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | - spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 72 | + spip_log('Fin de mise a jour SQL. Debut m-a-j acces et config', 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 73 | 73 | |
| 74 | 74 | // supprimer quelques fichiers temporaires qui peuvent se retrouver invalides |
| 75 | 75 | @spip_unlink(_CACHE_RUBRIQUES); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | @spip_unlink(_CACHE_PLUGINS_OPT); |
| 79 | 79 | @spip_unlink(_CACHE_PLUGINS_FCT); |
| 80 | 80 | @spip_unlink(_CACHE_CHEMIN); |
| 81 | - @spip_unlink(_DIR_TMP . 'plugin_xml_cache.gz'); |
|
| 81 | + @spip_unlink(_DIR_TMP.'plugin_xml_cache.gz'); |
|
| 82 | 82 | |
| 83 | 83 | include_spip('inc/auth'); |
| 84 | 84 | auth_synchroniser_distant(); |
@@ -117,8 +117,8 @@ discard block |
||
| 117 | 117 | $version_installee = $GLOBALS['meta']['version_installee'] ?? null; |
| 118 | 118 | |
| 119 | 119 | spip_log( |
| 120 | - "Version anterieure: $version_installee. Courante: " . $GLOBALS['spip_version_base'], |
|
| 121 | - 'maj.' . _LOG_INFO_IMPORTANTE |
|
| 120 | + "Version anterieure: $version_installee. Courante: ".$GLOBALS['spip_version_base'], |
|
| 121 | + 'maj.'._LOG_INFO_IMPORTANTE |
|
| 122 | 122 | ); |
| 123 | 123 | if (!$version_installee or ($GLOBALS['spip_version_base'] < $version_installee)) { |
| 124 | 124 | sql_replace( |
@@ -151,9 +151,9 @@ discard block |
||
| 151 | 151 | $res = maj_while($version_installee, $cible, $GLOBALS['maj'], 'version_installee', 'meta', $redirect, $debut_page); |
| 152 | 152 | if ($res) { |
| 153 | 153 | if (!is_array($res)) { |
| 154 | - spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_ERREUR); |
|
| 154 | + spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_ERREUR); |
|
| 155 | 155 | } else { |
| 156 | - echo _T('avis_operation_echec') . ' ' . join(' ', $res); |
|
| 156 | + echo _T('avis_operation_echec').' '.join(' ', $res); |
|
| 157 | 157 | echo install_fin_html(); |
| 158 | 158 | } |
| 159 | 159 | } |
@@ -241,9 +241,9 @@ discard block |
||
| 241 | 241 | $res = maj_while($current_version, $version_cible, $maj, $nom_meta_base_version, $table_meta, $redirect); |
| 242 | 242 | if ($res) { |
| 243 | 243 | if (!is_array($res)) { |
| 244 | - spip_log("Pb d'acces SQL a la mise a jour", 'maj.' . _LOG_ERREUR); |
|
| 244 | + spip_log("Pb d'acces SQL a la mise a jour", 'maj.'._LOG_ERREUR); |
|
| 245 | 245 | } else { |
| 246 | - echo '<p>' . _T('avis_operation_echec') . ' ' . join(' ', $res) . '</p>'; |
|
| 246 | + echo '<p>'._T('avis_operation_echec').' '.join(' ', $res).'</p>'; |
|
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | } |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | echo(install_debut_html($titre)); |
| 300 | 300 | // script de rechargement auto sur timeout |
| 301 | 301 | $redirect = generer_url_ecrire('upgrade', "reinstall=$installee&meta=$meta&table=$table", true); |
| 302 | - echo http_script("window.setTimeout('location.href=\"" . $redirect . "\";'," . ($timeout * 1000) . ')'); |
|
| 302 | + echo http_script("window.setTimeout('location.href=\"".$redirect."\";',".($timeout * 1000).')'); |
|
| 303 | 303 | echo "<div style='text-align: left'>\n"; |
| 304 | 304 | if (ob_get_level()) { |
| 305 | 305 | ob_flush(); |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | return [$v, $etape]; |
| 389 | 389 | } |
| 390 | 390 | $n = time() - $time; |
| 391 | - spip_log("$table $meta: $v en $n secondes", 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 391 | + spip_log("$table $meta: $v en $n secondes", 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 392 | 392 | if ($meta) { |
| 393 | 393 | ecrire_meta($meta, $installee = $v, 'oui', $table); |
| 394 | 394 | } |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | if ($meta) { |
| 405 | 405 | ecrire_meta($meta, $cible, 'oui', $table); |
| 406 | 406 | } |
| 407 | - spip_log("MAJ terminee. $meta: $installee", 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 407 | + spip_log("MAJ terminee. $meta: $installee", 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 408 | 408 | |
| 409 | 409 | return []; |
| 410 | 410 | } |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | * @return int |
| 430 | 430 | */ |
| 431 | 431 | function serie_alter($serie, $q = [], $meta = '', $table = 'meta', $redirect = '') { |
| 432 | - $meta2 = $meta . '_maj_' . $serie; |
|
| 432 | + $meta2 = $meta.'_maj_'.$serie; |
|
| 433 | 433 | $etape = 0; |
| 434 | 434 | if (isset($GLOBALS[$table][$meta2])) { |
| 435 | 435 | $etape = intval($GLOBALS[$table][$meta2]); |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | and function_exists($f = array_shift($r)) |
| 443 | 443 | ) { |
| 444 | 444 | // note: $r (arguments de la fonction $f) peut avoir des données tabulaires |
| 445 | - spip_log("$msg: $f " . @join(',', $r), 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 445 | + spip_log("$msg: $f ".@join(',', $r), 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 446 | 446 | // pour les fonctions atomiques sql_xx |
| 447 | 447 | // on enregistre le meta avant de lancer la fonction, |
| 448 | 448 | // de maniere a eviter de boucler sur timeout |
@@ -460,12 +460,12 @@ discard block |
||
| 460 | 460 | relance_maj($meta, $table, $redirect); |
| 461 | 461 | } |
| 462 | 462 | ecrire_meta($meta2, $i + 1, 'non', $table); |
| 463 | - spip_log("$meta2: ok", 'maj.' . _LOG_INFO_IMPORTANTE); |
|
| 463 | + spip_log("$meta2: ok", 'maj.'._LOG_INFO_IMPORTANTE); |
|
| 464 | 464 | } else { |
| 465 | 465 | if (!is_array($r)) { |
| 466 | - spip_log("maj $i format incorrect", 'maj.' . _LOG_ERREUR); |
|
| 466 | + spip_log("maj $i format incorrect", 'maj.'._LOG_ERREUR); |
|
| 467 | 467 | } else { |
| 468 | - spip_log("maj $i fonction $f non definie", 'maj.' . _LOG_ERREUR); |
|
| 468 | + spip_log("maj $i fonction $f non definie", 'maj.'._LOG_ERREUR); |
|
| 469 | 469 | } |
| 470 | 470 | // en cas d'erreur serieuse, on s'arrete |
| 471 | 471 | // mais on permet de passer par dessus en rechargeant la page. |
@@ -99,9 +99,9 @@ discard block |
||
| 99 | 99 | include_spip('inc/lang'); |
| 100 | 100 | |
| 101 | 101 | if ($GLOBALS['spip_lang'] <> $default) { |
| 102 | - $opt = lang_select($default); # et remplace |
|
| 102 | + $opt = lang_select($default); # et remplace |
|
| 103 | 103 | if ($GLOBALS['spip_lang'] <> $default) { |
| 104 | - $default = ''; # annule tout choix par defaut |
|
| 104 | + $default = ''; # annule tout choix par defaut |
|
| 105 | 105 | if ($opt) { |
| 106 | 106 | lang_select(); |
| 107 | 107 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | |
| 111 | 111 | # lien a partir de / |
| 112 | 112 | $cible = parametre_url(self(), 'lang', '', '&'); |
| 113 | - $post = generer_url_action('converser', 'redirect=' . rawurlencode($cible), true); |
|
| 113 | + $post = generer_url_action('converser', 'redirect='.rawurlencode($cible), true); |
|
| 114 | 114 | |
| 115 | 115 | return [ |
| 116 | 116 | 'formulaires/menu_lang', |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | static $t1 = ['&', '<', '>']; |
| 121 | 121 | static $t2 = ['&', '<', '>']; |
| 122 | 122 | |
| 123 | - return '<pre>' . str_replace($t1, $t2, (string) $t) . '</pre>'; |
|
| 123 | + return '<pre>'.str_replace($t1, $t2, (string) $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 | |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | // Pourquoi SafeHtml transforme-t-il en texte les scripts dans Body ? |
| 190 | - $t = safehtml(preg_replace(',<script' . '.*?</script>,is', '', $t)); |
|
| 190 | + $t = safehtml(preg_replace(',<script'.'.*?</script>,is', '', $t)); |
|
| 191 | 191 | |
| 192 | - return (!$style ? '' : "\n<style>" . $style . '</style>') . $t; |
|
| 192 | + return (!$style ? '' : "\n<style>".$style.'</style>').$t; |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $champ = preg_replace(',[\s]+,ms', ' ', $champ); |
| 39 | 39 | $champ = str_replace('"', '""', $champ); |
| 40 | 40 | |
| 41 | - return '"' . $champ . '"'; |
|
| 41 | + return '"'.$champ.'"'; |
|
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if ($callback) { |
| 59 | 59 | $ligne = $callback($nb, $ligne, $delim, $importer_charset); |
| 60 | 60 | } |
| 61 | - $output = join($delim, array_map('exporter_csv_champ', $ligne)) . "\r\n"; |
|
| 61 | + $output = join($delim, array_map('exporter_csv_champ', $ligne))."\r\n"; |
|
| 62 | 62 | if ($importer_charset) { |
| 63 | 63 | $output = str_replace('’', '\'', $output); |
| 64 | 64 | $output = unicode2charset(html2unicode(charset2unicode($output)), $importer_charset); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | $fichier = 'php://output'; |
| 176 | 176 | } |
| 177 | 177 | else { |
| 178 | - $fichier = sous_repertoire(_DIR_CACHE, 'export') . $filename; |
|
| 178 | + $fichier = sous_repertoire(_DIR_CACHE, 'export').$filename; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | $fp = fopen($fichier, 'w'); |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | |
| 94 | 94 | $res = ltrim($res['texte']); |
| 95 | 95 | if (empty($res)) { |
| 96 | - spip_log("$arg $qs resultat vide", 'transmettre' . _LOG_INFO_IMPORTANTE); |
|
| 96 | + spip_log("$arg $qs resultat vide", 'transmettre'._LOG_INFO_IMPORTANTE); |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | echo $res; |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | if (!defined('_ECRIRE_INC_VERSION')) { |
| 19 | 19 | return; |
| 20 | 20 | } |
| 21 | -require_once _ROOT_RESTREINT . 'base/objets.php'; |
|
| 21 | +require_once _ROOT_RESTREINT.'base/objets.php'; |
|
| 22 | 22 | |
| 23 | 23 | |
| 24 | 24 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $f = (!preg_match('/^[\w\.]*$/', $serveur)) |
| 60 | 60 | ? '' // nom de serveur mal ecrit |
| 61 | 61 | : ($serveur ? |
| 62 | - (_DIR_CONNECT . $serveur . '.php') // serveur externe |
|
| 62 | + (_DIR_CONNECT.$serveur.'.php') // serveur externe |
|
| 63 | 63 | : (_FILE_CONNECT ?: ($install ? _FILE_CONNECT_TMP // init du serveur principal |
| 64 | 64 | : ''))); // installation pas faite |
| 65 | 65 | |
@@ -101,9 +101,9 @@ discard block |
||
| 101 | 101 | // chargement de la version du jeu de fonctions |
| 102 | 102 | // si pas dans le fichier par defaut |
| 103 | 103 | $type = $GLOBALS['db_ok']['type']; |
| 104 | - $jeu = 'spip_' . $type . '_functions_' . $version; |
|
| 104 | + $jeu = 'spip_'.$type.'_functions_'.$version; |
|
| 105 | 105 | if (!isset($GLOBALS[$jeu])) { |
| 106 | - if (!find_in_path($type . '_' . $version . '.php', 'req/', true)) { |
|
| 106 | + if (!find_in_path($type.'_'.$version.'.php', 'req/', true)) { |
|
| 107 | 107 | spip_log("spip_connect: serveur $index version '$version' non defini pour '$type'", _LOG_HS); |
| 108 | 108 | |
| 109 | 109 | // ne plus reessayer |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | $connexion = spip_connect($serveur); |
| 166 | 166 | $e = sql_errno($serveur); |
| 167 | 167 | $t = ($connexion['type'] ?? 'sql'); |
| 168 | - $m = "Erreur $e de $t: " . sql_error($serveur) . "\nin " . sql_error_backtrace() . "\n" . trim($connexion['last']); |
|
| 169 | - $f = $t . $serveur; |
|
| 170 | - spip_log($m, $f . '.' . _LOG_ERREUR); |
|
| 168 | + $m = "Erreur $e de $t: ".sql_error($serveur)."\nin ".sql_error_backtrace()."\n".trim($connexion['last']); |
|
| 169 | + $f = $t.$serveur; |
|
| 170 | + spip_log($m, $f.'.'._LOG_ERREUR); |
|
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | // si en cours d'installation ou si db=@test@ on ne pose rien |
| 254 | 254 | // car c'est un test de connexion |
| 255 | 255 | if (!defined('_ECRIRE_INSTALL') and $db !== '@test@') { |
| 256 | - $f = _DIR_TMP . $type . '.' . substr(md5($host . $port . $db), 0, 8) . '.out'; |
|
| 256 | + $f = _DIR_TMP.$type.'.'.substr(md5($host.$port.$db), 0, 8).'.out'; |
|
| 257 | 257 | } elseif ($db == '@test@') { |
| 258 | 258 | $db = ''; |
| 259 | 259 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | // En cas d'indisponibilite du serveur, eviter de le bombarder |
| 293 | 293 | if ($f) { |
| 294 | 294 | @touch($f); |
| 295 | - spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type . '.' . _LOG_HS); |
|
| 295 | + spip_log("Echec connexion serveur $type : host[$host] port[$port] login[$login] base[$db]", $type.'.'._LOG_HS); |
|
| 296 | 296 | } |
| 297 | 297 | return null; |
| 298 | 298 | } |
@@ -390,11 +390,11 @@ discard block |
||
| 390 | 390 | } elseif (is_array($a)) { |
| 391 | 391 | return join(',', array_map('_q', $a)); |
| 392 | 392 | } elseif (is_scalar($a)) { |
| 393 | - return ("'" . addslashes($a) . "'"); |
|
| 393 | + return ("'".addslashes($a)."'"); |
|
| 394 | 394 | } elseif ($a === null) { |
| 395 | 395 | return "''"; |
| 396 | 396 | } |
| 397 | - throw new \RuntimeException('Can’t use _q with ' . gettype($a)); |
|
| 397 | + throw new \RuntimeException('Can’t use _q with '.gettype($a)); |
|
| 398 | 398 | } |
| 399 | 399 | |
| 400 | 400 | /** |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | $next = reset($textes); |
| 446 | 446 | if ( |
| 447 | 447 | strpos($next, "'") === 0 |
| 448 | - and strpos($query_echappees, $part . $next, $currentpos) === $nextpos |
|
| 448 | + and strpos($query_echappees, $part.$next, $currentpos) === $nextpos |
|
| 449 | 449 | ) { |
| 450 | 450 | $part .= array_shift($textes); |
| 451 | 451 | } |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | $parts[$k] = [ |
| 458 | 458 | 'texte' => $part, |
| 459 | 459 | 'position' => $nextpos, |
| 460 | - 'placeholder' => '%' . $k . '$s', |
|
| 460 | + 'placeholder' => '%'.$k.'$s', |
|
| 461 | 461 | ]; |
| 462 | 462 | $currentpos = $nextpos + strlen($part); |
| 463 | 463 | } |