@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if (isset($data[$root])) { # pas de racine sauf pour les rubriques |
| 143 | 143 | $r = "<option$selected value='$root' class='$class' style='$style'>$espace" |
| 144 | 144 | . $data[$root] |
| 145 | - . '</option>' . "\n"; |
|
| 145 | + . '</option>'."\n"; |
|
| 146 | 146 | } else { |
| 147 | 147 | $r = ''; |
| 148 | 148 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | } |
| 171 | 171 | |
| 172 | 172 | // et voila le travail |
| 173 | - return $r . $sous; |
|
| 173 | + return $r.$sous; |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | /** |
@@ -218,12 +218,12 @@ discard block |
||
| 218 | 218 | while ($r = sql_fetch($q)) { |
| 219 | 219 | if (autoriser('voir', 'rubrique', $r['id_rubrique'])) { |
| 220 | 220 | // titre largeur maxi a 50 |
| 221 | - $titre = couper(supprimer_tags(typo($r['titre'])) . ' ', 50); |
|
| 221 | + $titre = couper(supprimer_tags(typo($r['titre'])).' ', 50); |
|
| 222 | 222 | if ( |
| 223 | 223 | $GLOBALS['meta']['multi_rubriques'] == 'oui' |
| 224 | 224 | && ($r['langue_choisie'] == 'oui' || $r['id_parent'] == 0) |
| 225 | 225 | ) { |
| 226 | - $titre .= ' [' . traduire_nom_langue($r['lang']) . ']'; |
|
| 226 | + $titre .= ' ['.traduire_nom_langue($r['lang']).']'; |
|
| 227 | 227 | } |
| 228 | 228 | $data[$r['id_rubrique']] = $titre; |
| 229 | 229 | $enfants[$r['id_parent']][] = $r['id_rubrique']; |
@@ -250,9 +250,9 @@ discard block |
||
| 250 | 250 | $att = " id='id_parent' name='id_parent'\nclass='selecteur_parent verdana1'"; |
| 251 | 251 | |
| 252 | 252 | if (preg_match(',^<option[^<>]*value=.(\d*).[^<>]*>([^<]*)</option>$,', $opt, $r)) { |
| 253 | - $r = "<input$att type='hidden' value='" . $r[1] . "' />" . $r[2]; |
|
| 253 | + $r = "<input$att type='hidden' value='".$r[1]."' />".$r[2]; |
|
| 254 | 254 | } else { |
| 255 | - $r = '<select' . $att . " size='1'>\n$opt</select>\n"; |
|
| 255 | + $r = '<select'.$att." size='1'>\n$opt</select>\n"; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | # message pour neuneus (a supprimer ?) |
@@ -294,13 +294,13 @@ discard block |
||
| 294 | 294 | function selecteur_rubrique_ajax($id_rubrique, $type, $restreint, $idem = 0, $do = 'aff') { |
| 295 | 295 | |
| 296 | 296 | if ($id_rubrique) { |
| 297 | - $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 297 | + $titre = sql_getfetsel('titre', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 298 | 298 | } else { |
| 299 | 299 | $titre = $type == 'auteur' ? ' ' : _T('info_racine_site'); |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | 302 | $titre = str_replace('&', '&', (string) entites_html(textebrut(typo($titre)))); |
| 303 | - $init = " disabled='disabled' type='text' value=\"" . $titre . "\"\nstyle='width:300px;'"; |
|
| 303 | + $init = " disabled='disabled' type='text' value=\"".$titre."\"\nstyle='width:300px;'"; |
|
| 304 | 304 | |
| 305 | 305 | $url = generer_url_ecrire('selectionner', "id=$id_rubrique&type=$type&do=$do" |
| 306 | 306 | . ($idem ? "&exclus=$idem" : '') |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | . " jQuery(this).toggleClass('toggled'); " |
| 350 | 350 | . "return charger_node_url_si_vide('" |
| 351 | 351 | . $url |
| 352 | - . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='" . attribut_html(_T('titre_image_selecteur')) . "'>" |
|
| 352 | + . "', this.parentNode.nextSibling, this.nextSibling,'',event)\" title='".attribut_html(_T('titre_image_selecteur'))."'>" |
|
| 353 | 353 | . $img_icone |
| 354 | 354 | . "</a><img src='" |
| 355 | 355 | . chemin_image('loader.svg') |
@@ -313,9 +313,9 @@ |
||
| 313 | 313 | && ($e = $flux['args']['contexte']['_etape']) > 1 |
| 314 | 314 | && ($ext = $flux['args']['ext']) |
| 315 | 315 | && ($f = $flux['data']) |
| 316 | - && file_exists($f . "_$e.$ext") |
|
| 316 | + && file_exists($f."_$e.$ext") |
|
| 317 | 317 | ) { |
| 318 | - $flux['data'] = $f . "_$e"; |
|
| 318 | + $flux['data'] = $f."_$e"; |
|
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | return $flux; |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $class = ' blocreplie'; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - return '<div ' . ($id ? "id='$id' " : '') . "class='bloc_depliable$class'>"; |
|
| 55 | + return '<div '.($id ? "id='$id' " : '')."class='bloc_depliable$class'>"; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | function fin_block() { |
@@ -63,12 +63,12 @@ discard block |
||
| 63 | 63 | // $deplie : true (deplie) ou false (plie) ou -1 (inactif) ou 'incertain' pour que le bouton s'auto init au chargement de la page |
| 64 | 64 | // $ids : id des div lies au bouton (facultatif, par defaut c'est le div.bloc_depliable qui suit) |
| 65 | 65 | function bouton_block_depliable($texte, $deplie, $ids = '') { |
| 66 | - $bouton_id = 'b' . substr(md5($texte . microtime()), 0, 8); |
|
| 66 | + $bouton_id = 'b'.substr(md5($texte.microtime()), 0, 8); |
|
| 67 | 67 | |
| 68 | 68 | $class = ($deplie === true) ? ' deplie' : (($deplie == -1) ? ' impliable' : ' replie'); |
| 69 | 69 | if (strlen((string) $ids)) { |
| 70 | 70 | $cible = explode(',', (string) $ids); |
| 71 | - $cible = '#' . implode(',#', $cible); |
|
| 71 | + $cible = '#'.implode(',#', $cible); |
|
| 72 | 72 | } else { |
| 73 | 73 | $cible = "#$bouton_id + div.bloc_depliable"; |
| 74 | 74 | } |
@@ -69,17 +69,17 @@ |
||
| 69 | 69 | // compat < SPIP 3.3 |
| 70 | 70 | include_spip('inc/filtres_images_mini'); |
| 71 | 71 | $c['couleur_foncee'] = $c['couleur_theme']; |
| 72 | - $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5); |
|
| 72 | + $c['couleur_claire'] = '#'.couleur_eclaircir($c['couleur_theme'], .5); |
|
| 73 | 73 | |
| 74 | 74 | return |
| 75 | - 'couleur_theme=' . substr((string) $c['couleur_theme'], 1) |
|
| 75 | + 'couleur_theme='.substr((string) $c['couleur_theme'], 1) |
|
| 76 | 76 | // compat < SPIP 3.3 |
| 77 | - . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 78 | - . '&couleur_foncee=' . substr((string) $c['couleur_foncee'], 1); |
|
| 77 | + . '&couleur_claire='.substr($c['couleur_claire'], 1) |
|
| 78 | + . '&couleur_foncee='.substr((string) $c['couleur_foncee'], 1); |
|
| 79 | 79 | } else { |
| 80 | 80 | if (is_array($choix)) { |
| 81 | 81 | // compat < SPIP 3.3 |
| 82 | - $compat_spip_33 = function ($c) { |
|
| 82 | + $compat_spip_33 = function($c) { |
|
| 83 | 83 | if (!isset($c['couleur_theme'])) { |
| 84 | 84 | $c['couleur_theme'] = $c['couleur_foncee']; |
| 85 | 85 | unset($c['couleur_foncee']); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @return void |
| 43 | 43 | **/ |
| 44 | 44 | function install_fichier_connexion($nom, $texte) { |
| 45 | - $texte = '<' . "?php\n" |
|
| 45 | + $texte = '<'."?php\n" |
|
| 46 | 46 | . "if (!defined(\"_ECRIRE_INC_VERSION\")) return;\n" |
| 47 | 47 | . $texte; |
| 48 | 48 | |
@@ -114,10 +114,10 @@ discard block |
||
| 114 | 114 | return $regs; |
| 115 | 115 | } else { |
| 116 | 116 | $ar = '\s*\'([^\']*)\''; |
| 117 | - $r = '\s*,' . $ar; |
|
| 117 | + $r = '\s*,'.$ar; |
|
| 118 | 118 | $r = "#spip_connect_db[(]$ar$r$r$r$r(?:$r(?:$r(?:$r(?:$r)?)?)?)?#"; |
| 119 | 119 | if (preg_match($r, $s, $regs)) { |
| 120 | - $regs[2] = $regs[1] . ($regs[2] ? ':' . $regs[2] . ';' : ''); |
|
| 120 | + $regs[2] = $regs[1].($regs[2] ? ':'.$regs[2].';' : ''); |
|
| 121 | 121 | array_shift($regs); |
| 122 | 122 | array_shift($regs); |
| 123 | 123 | |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | // Si on n'a pas la bonne version de PHP, c'est la fin |
| 183 | 183 | if ($err) { |
| 184 | 184 | die("<div class='error'>" |
| 185 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>" |
|
| 185 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>" |
|
| 186 | 186 | . "<li><strong>{$err[0]}</strong></li>\n</ul></div>"); |
| 187 | 187 | } |
| 188 | 188 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | if ($err) { |
| 204 | 204 | echo "<div class='error'>" |
| 205 | - . '<h3>' . _T('avis_attention') . '</h3><p>' . _T('install_echec_annonce') . "</p><ul class='spip'>"; |
|
| 205 | + . '<h3>'._T('avis_attention').'</h3><p>'._T('install_echec_annonce')."</p><ul class='spip'>"; |
|
| 206 | 206 | foreach ($err as $e) { |
| 207 | 207 | echo "<li><strong>$e</strong></li>\n"; |
| 208 | 208 | } |
@@ -215,8 +215,8 @@ discard block |
||
| 215 | 215 | |
| 216 | 216 | |
| 217 | 217 | function info_etape($titre, $complement = '') { |
| 218 | - return '<h2>' . $titre . "</h2>\n" . |
|
| 219 | - ($complement ? '' . $complement . "\n" : ''); |
|
| 218 | + return '<h2>'.$titre."</h2>\n". |
|
| 219 | + ($complement ? ''.$complement."\n" : ''); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | /** |
@@ -230,18 +230,18 @@ discard block |
||
| 230 | 230 | $code = _T('bouton_suivant'); |
| 231 | 231 | } |
| 232 | 232 | static $suivant = 0; |
| 233 | - $id = 'suivant' . (($suivant > 0) ? (string) $suivant : ''); |
|
| 233 | + $id = 'suivant'.(($suivant > 0) ? (string) $suivant : ''); |
|
| 234 | 234 | $suivant += 1; |
| 235 | 235 | |
| 236 | - return "\n<p class='boutons suivant'><input id='" . $id . "' type='submit'\nvalue=\"" . |
|
| 237 | - $code . |
|
| 236 | + return "\n<p class='boutons suivant'><input id='".$id."' type='submit'\nvalue=\"". |
|
| 237 | + $code. |
|
| 238 | 238 | " >>\" /></p>\n"; |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | function info_progression_etape($en_cours, $phase, $dir, $erreur = false) { |
| 242 | 242 | $intitule_etat = []; |
| 243 | 243 | |
| 244 | - $liste = find_all_in_path($dir, $phase . '(([0-9])+|fin)[.]php$'); |
|
| 244 | + $liste = find_all_in_path($dir, $phase.'(([0-9])+|fin)[.]php$'); |
|
| 245 | 245 | $debut = 1; |
| 246 | 246 | $last = is_countable($liste) ? count($liste) : 0; |
| 247 | 247 | |
@@ -272,23 +272,23 @@ discard block |
||
| 272 | 272 | } |
| 273 | 273 | |
| 274 | 274 | $aff_etapes .= "<li class='$class'><div class='fond'>"; |
| 275 | - $aff_etapes .= '<em>' . _T('etape') . " </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 276 | - $aff_etapes .= '<' . (($debut == $en_cours) ? 'strong' : 'span') . ' class="label_etape">' . $intitule_etat["$phase"][$debut] . '</' . (($debut == $en_cours) ? 'strong' : 'span') . '>'; |
|
| 275 | + $aff_etapes .= '<em>'._T('etape')." </em><span class='numero_etape'>$debut</span><em> : </em>"; |
|
| 276 | + $aff_etapes .= '<'.(($debut == $en_cours) ? 'strong' : 'span').' class="label_etape">'.$intitule_etat["$phase"][$debut].'</'.(($debut == $en_cours) ? 'strong' : 'span').'>'; |
|
| 277 | 277 | $aff_etapes .= '</div></li>'; |
| 278 | 278 | } |
| 279 | 279 | $debut++; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | - return $aff_etapes . '</ul>'; |
|
| 282 | + return $aff_etapes.'</ul>'; |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | |
| 286 | 286 | function fieldset($legend, $champs = [], $apres = '', $avant = '') { |
| 287 | - return "<fieldset>\n" . |
|
| 288 | - $avant . |
|
| 289 | - ($legend ? '<legend>' . $legend . "</legend>\n" : '') . |
|
| 290 | - fieldset_champs($champs) . |
|
| 291 | - $apres . |
|
| 287 | + return "<fieldset>\n". |
|
| 288 | + $avant. |
|
| 289 | + ($legend ? '<legend>'.$legend."</legend>\n" : ''). |
|
| 290 | + fieldset_champs($champs). |
|
| 291 | + $apres. |
|
| 292 | 292 | "</fieldset>\n"; |
| 293 | 293 | } |
| 294 | 294 | |
@@ -298,18 +298,18 @@ discard block |
||
| 298 | 298 | $type = isset($contenu['hidden']) ? 'hidden' : (preg_match(',^pass,', (string) $nom) ? 'password' : 'text'); |
| 299 | 299 | $class = isset($contenu['hidden']) ? '' : "class='formo' size='40' "; |
| 300 | 300 | if (isset($contenu['alternatives'])) { |
| 301 | - $fieldset .= $contenu['label'] . "\n"; |
|
| 301 | + $fieldset .= $contenu['label']."\n"; |
|
| 302 | 302 | foreach ($contenu['alternatives'] as $valeur => $label) { |
| 303 | - $fieldset .= "<input type='radio' name='" . $nom . |
|
| 303 | + $fieldset .= "<input type='radio' name='".$nom. |
|
| 304 | 304 | "' id='$nom-$valeur' value='$valeur'" |
| 305 | 305 | . (($valeur == $contenu['valeur']) ? "\nchecked='checked'" : '') |
| 306 | 306 | . "/>\n"; |
| 307 | - $fieldset .= "<label for='$nom-$valeur'>" . $label . "</label>\n"; |
|
| 307 | + $fieldset .= "<label for='$nom-$valeur'>".$label."</label>\n"; |
|
| 308 | 308 | } |
| 309 | 309 | $fieldset .= "<br />\n"; |
| 310 | 310 | } else { |
| 311 | - $fieldset .= "<label for='" . $nom . "'>" . $contenu['label'] . "</label>\n"; |
|
| 312 | - $fieldset .= '<input ' . $class . "type='" . $type . "' id='" . $nom . "' name='" . $nom . "'\nvalue='" . $contenu['valeur'] . "'" |
|
| 311 | + $fieldset .= "<label for='".$nom."'>".$contenu['label']."</label>\n"; |
|
| 312 | + $fieldset .= '<input '.$class."type='".$type."' id='".$nom."' name='".$nom."'\nvalue='".$contenu['valeur']."'" |
|
| 313 | 313 | . (preg_match(',^(pass|login),', (string) $nom) ? " autocomplete='off'" : '') |
| 314 | 314 | . ((isset($contenu['required']) && $contenu['required']) ? " required='required'" : '') |
| 315 | 315 | . " />\n"; |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | function install_select_serveur() { |
| 323 | 323 | $options = []; |
| 324 | - $dir = _DIR_RESTREINT . 'req/'; |
|
| 324 | + $dir = _DIR_RESTREINT.'req/'; |
|
| 325 | 325 | $d = opendir($dir); |
| 326 | 326 | if (!$d) { |
| 327 | 327 | return []; |
@@ -329,17 +329,17 @@ discard block |
||
| 329 | 329 | while (($f = readdir($d)) !== false) { |
| 330 | 330 | if ( |
| 331 | 331 | preg_match('/^(.*)[.]php$/', $f, $s) |
| 332 | - && is_readable($f = $dir . $f) |
|
| 332 | + && is_readable($f = $dir.$f) |
|
| 333 | 333 | ) { |
| 334 | 334 | require_once($f); |
| 335 | 335 | $s = $s[1]; |
| 336 | - $v = 'spip_versions_' . $s; |
|
| 336 | + $v = 'spip_versions_'.$s; |
|
| 337 | 337 | if (function_exists($v) && $v()) { |
| 338 | 338 | $titre = _T("install_select_type_$s"); |
| 339 | 339 | // proposer mysql par defaut si dispo |
| 340 | 340 | $checked = ($s == 'mysql' ? " checked='checked'" : ''); |
| 341 | 341 | $options[$s] = "<li><input type='radio' id='$s' value='$s' name='server_db'$checked>" |
| 342 | - . "<label for='$s'>" . ($titre ?: $s) . '</label></li>'; |
|
| 342 | + . "<label for='$s'>".($titre ?: $s).'</label></li>'; |
|
| 343 | 343 | } else { |
| 344 | 344 | spip_log("$s: portage indisponible"); |
| 345 | 345 | } |
@@ -357,8 +357,8 @@ discard block |
||
| 357 | 357 | "\n<input type='hidden' name='etape' value='$etape' />" |
| 358 | 358 | . $hidden |
| 359 | 359 | . (_request('echec') ? |
| 360 | - ('<p><b>' . _T('avis_connexion_echec_1') . |
|
| 361 | - '</b></p><p>' . _T('avis_connexion_echec_2') . "</p><p style='font-size: small;'>" . _T('avis_connexion_echec_3') . '</p>') |
|
| 360 | + ('<p><b>'._T('avis_connexion_echec_1'). |
|
| 361 | + '</b></p><p>'._T('avis_connexion_echec_2')."</p><p style='font-size: small;'>"._T('avis_connexion_echec_3').'</p>') |
|
| 362 | 362 | : '') |
| 363 | 363 | |
| 364 | 364 | . ($jquery ? http_script('', 'jquery.js') : '') |
@@ -396,9 +396,9 @@ discard block |
||
| 396 | 396 | });') |
| 397 | 397 | |
| 398 | 398 | . ($server_db |
| 399 | - ? '<input type="hidden" name="server_db" value="' . $server_db . '" />' |
|
| 399 | + ? '<input type="hidden" name="server_db" value="'.$server_db.'" />' |
|
| 400 | 400 | . (($predef[0]) |
| 401 | - ? ('<h3>' . _T('install_serveur_hebergeur') . '</h3>') |
|
| 401 | + ? ('<h3>'._T('install_serveur_hebergeur').'</h3>') |
|
| 402 | 402 | : '') |
| 403 | 403 | : ('<fieldset><legend>' |
| 404 | 404 | . _T('install_select_type_db') |
@@ -413,9 +413,9 @@ discard block |
||
| 413 | 413 | . "\n</ul>\n</div></fieldset>") |
| 414 | 414 | ) |
| 415 | 415 | . '<div id="install_adresse_base_hebergeur">' |
| 416 | - . '<p>' . _T('texte_connexion_mysql') . '</p>' |
|
| 416 | + . '<p>'._T('texte_connexion_mysql').'</p>' |
|
| 417 | 417 | . ($predef[1] |
| 418 | - ? '<h3>' . _T('install_adresse_base_hebergeur') . '</h3>' |
|
| 418 | + ? '<h3>'._T('install_adresse_base_hebergeur').'</h3>' |
|
| 419 | 419 | : fieldset( |
| 420 | 420 | _T('entree_base_donnee_1'), |
| 421 | 421 | [ |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | . '<div id="install_login_base_hebergeur">' |
| 432 | 432 | . ($predef[2] |
| 433 | - ? '<h3>' . _T('install_login_base_hebergeur') . '</h3>' |
|
| 433 | + ? '<h3>'._T('install_login_base_hebergeur').'</h3>' |
|
| 434 | 434 | : fieldset( |
| 435 | 435 | _T('entree_login_connexion_1'), |
| 436 | 436 | [ |
@@ -445,7 +445,7 @@ discard block |
||
| 445 | 445 | |
| 446 | 446 | . '<div id="install_pass_base_hebergeur">' |
| 447 | 447 | . ($predef[3] |
| 448 | - ? '<h3>' . _T('install_pass_base_hebergeur') . '</h3>' |
|
| 448 | + ? '<h3>'._T('install_pass_base_hebergeur').'</h3>' |
|
| 449 | 449 | : fieldset( |
| 450 | 450 | _T('entree_mot_passe_1'), |
| 451 | 451 | [ |
@@ -467,20 +467,20 @@ discard block |
||
| 467 | 467 | function predef_ou_cache($adresse_db, $login_db, $pass_db, $server_db) { |
| 468 | 468 | return ((defined('_INSTALL_HOST_DB')) |
| 469 | 469 | ? '' |
| 470 | - : "\n<input type='hidden' name='adresse_db' value=\"" . spip_htmlspecialchars($adresse_db) . '" />' |
|
| 470 | + : "\n<input type='hidden' name='adresse_db' value=\"".spip_htmlspecialchars($adresse_db).'" />' |
|
| 471 | 471 | ) |
| 472 | 472 | . ((defined('_INSTALL_USER_DB')) |
| 473 | 473 | ? '' |
| 474 | - : "\n<input type='hidden' name='login_db' value=\"" . spip_htmlspecialchars($login_db) . '" />' |
|
| 474 | + : "\n<input type='hidden' name='login_db' value=\"".spip_htmlspecialchars($login_db).'" />' |
|
| 475 | 475 | ) |
| 476 | 476 | . ((defined('_INSTALL_PASS_DB')) |
| 477 | 477 | ? '' |
| 478 | - : "\n<input type='hidden' name='pass_db' value=\"" . spip_htmlspecialchars($pass_db) . '" />' |
|
| 478 | + : "\n<input type='hidden' name='pass_db' value=\"".spip_htmlspecialchars($pass_db).'" />' |
|
| 479 | 479 | ) |
| 480 | 480 | |
| 481 | 481 | . ((defined('_INSTALL_SERVER_DB')) |
| 482 | 482 | ? '' |
| 483 | - : "\n<input type='hidden' name='server_db' value=\"" . spip_htmlspecialchars($server_db) . '" />' |
|
| 483 | + : "\n<input type='hidden' name='server_db' value=\"".spip_htmlspecialchars($server_db).'" />' |
|
| 484 | 484 | ); |
| 485 | 485 | } |
| 486 | 486 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * Code HTML du formulaire |
| 78 | 78 | */ |
| 79 | 79 | function redirige_action_auteur($action, $arg, $ret, $gra = '', $mode = false, $atts = '', $public = false) { |
| 80 | - $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT) . generer_url_ecrire($ret, $gra, true, true); |
|
| 80 | + $r = ($public ? _DIR_RESTREINT_ABS : _DIR_RESTREINT).generer_url_ecrire($ret, $gra, true, true); |
|
| 81 | 81 | |
| 82 | 82 | return generer_action_auteur($action, $arg, $r, $mode, $atts, $public); |
| 83 | 83 | } |
@@ -104,9 +104,9 @@ discard block |
||
| 104 | 104 | * URL, code HTML du formulaire ou tableau (action, arg, hash) |
| 105 | 105 | */ |
| 106 | 106 | function redirige_action_post($action, $arg, $ret, $gra, $corps, $att = '') { |
| 107 | - $r = _DIR_RESTREINT . generer_url_ecrire($ret, $gra, false, true); |
|
| 107 | + $r = _DIR_RESTREINT.generer_url_ecrire($ret, $gra, false, true); |
|
| 108 | 108 | |
| 109 | - return generer_action_auteur($action, $arg, $r, $corps, $att . " method='post'"); |
|
| 109 | + return generer_action_auteur($action, $arg, $r, $corps, $att." method='post'"); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | } |
| 141 | 141 | |
| 142 | 142 | $c = $GLOBALS['meta']['charset']; |
| 143 | - header('Content-Type: ' . $content_type . '; charset=' . $c); |
|
| 144 | - $debut = (($xml && strlen(trim($corps))) ? '<' . "?xml version='1.0' encoding='" . $c . "'?" . ">\n" : ''); |
|
| 143 | + header('Content-Type: '.$content_type.'; charset='.$c); |
|
| 144 | + $debut = (($xml && strlen(trim($corps))) ? '<'."?xml version='1.0' encoding='".$c."'?".">\n" : ''); |
|
| 145 | 145 | $fin = ''; |
| 146 | 146 | |
| 147 | 147 | echo $debut, $corps, $fin, $e; |
@@ -46,15 +46,15 @@ discard block |
||
| 46 | 46 | $je_suis_poste = $flux['args']['je_suis_poste']; |
| 47 | 47 | |
| 48 | 48 | $cle_autosave = serialize($cle_autosave); |
| 49 | - $cle_autosave = $form . '_' . md5($cle_autosave); |
|
| 49 | + $cle_autosave = $form.'_'.md5($cle_autosave); |
|
| 50 | 50 | |
| 51 | 51 | // si on a un backup en session et qu'on est au premier chargement, non poste |
| 52 | 52 | // on restitue les donnees |
| 53 | 53 | if ( |
| 54 | - isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave]) |
|
| 54 | + isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave]) |
|
| 55 | 55 | && !$je_suis_poste |
| 56 | 56 | ) { |
| 57 | - parse_str((string) $GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave], $vars); |
|
| 57 | + parse_str((string) $GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave], $vars); |
|
| 58 | 58 | foreach ($vars as $key => $val) { |
| 59 | 59 | if (isset($flux['data'][$key])) { |
| 60 | 60 | $flux['data'][$key] = (is_string($val) ? autosave_clean_value($val) : array_map( |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | if ($je_suis_poste && _request('autosave') === $cle_autosave && function_exists('terminer_actualiser_sessions')) { |
| 71 | 71 | terminer_actualiser_sessions(); |
| 72 | 72 | // et verifions si jamais l'autosave a fait un come back, dans ce cas on le revide |
| 73 | - if (isset($GLOBALS['visiteur_session']['session_autosave_' . $cle_autosave])) { |
|
| 74 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 73 | + if (isset($GLOBALS['visiteur_session']['session_autosave_'.$cle_autosave])) { |
|
| 74 | + session_set('session_autosave_'.$cle_autosave, null); |
|
| 75 | 75 | // en court sleep pour etre certain que la concurrence est finie |
| 76 | 76 | sleep(1); |
| 77 | 77 | terminer_actualiser_sessions(); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | $flux['data']['_hidden'] .= "<input type='hidden' name='autosave' class='autosaveactive' value='$cle_autosave' />" |
| 86 | 86 | . '<script type="text/javascript">/*<![CDATA[*/if (window.jQuery) jQuery(function(){ |
| 87 | - $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'] . '/"}).addClass("autosaveon"); |
|
| 87 | + $("input.autosaveactive").closest("form:not(.autosaveon)").autosave({url:"' . $GLOBALS['meta']['adresse_site'].'/"}).addClass("autosaveon"); |
|
| 88 | 88 | });/*]]>*/</script>'; |
| 89 | 89 | } |
| 90 | 90 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | // on elimine les donnees de la session |
| 107 | 107 | if ($cle_autosave = _request('autosave')) { |
| 108 | 108 | include_spip('inc/session'); |
| 109 | - session_set('session_autosave_' . $cle_autosave, null); |
|
| 109 | + session_set('session_autosave_'.$cle_autosave, null); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | if (isset($GLOBALS['visiteur_session']) && $GLOBALS['visiteur_session']) { |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | $res = sql_select( |
| 34 | 34 | 'rub1.id_rubrique, rub1.titre, rub1.id_parent, rub1.lang, rub1.langue_choisie, rub2.id_rubrique AS id_enfant', |
| 35 | 35 | 'spip_rubriques AS rub1 LEFT JOIN spip_rubriques AS rub2 ON (rub1.id_rubrique = rub2.id_parent)', |
| 36 | - 'rub1.id_parent = ' . sql_quote($id_rubrique) . ' |
|
| 37 | - AND rub1.id_rubrique!=' . sql_quote($exclu) . ' |
|
| 38 | - AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu) . ')', |
|
| 36 | + 'rub1.id_parent = '.sql_quote($id_rubrique).' |
|
| 37 | + AND rub1.id_rubrique!=' . sql_quote($exclu).' |
|
| 38 | + AND (rub2.id_rubrique IS NULL OR rub2.id_rubrique!=' . sql_quote($exclu).')', |
|
| 39 | 39 | '', |
| 40 | 40 | '0+rub1.titre,rub1.titre' |
| 41 | 41 | ); |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | if ($row['langue_choisie'] != 'oui') { |
| 49 | 49 | $t .= ' <small title="' |
| 50 | 50 | . traduire_nom_langue($row['lang']) |
| 51 | - . '">[' . $row['lang'] . ']</small>'; |
|
| 51 | + . '">['.$row['lang'].']</small>'; |
|
| 52 | 52 | } |
| 53 | 53 | $ordre[$row['id_rubrique']] = $t; |
| 54 | 54 | } |
@@ -56,14 +56,14 @@ discard block |
||
| 56 | 56 | } |
| 57 | 57 | $next = $list[$col] ?? 0; |
| 58 | 58 | if ($ordre) { |
| 59 | - $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=" . ($col + 1)); |
|
| 59 | + $rec = generer_url_ecrire('plonger', "rac=$idom&exclus=$exclu&do=$do&col=".($col + 1)); |
|
| 60 | 60 | $info = generer_url_ecrire('informer', "type=rubrique&rac=$idom&do=$do&id="); |
| 61 | - $args = "'$idom',this,$col,'" . $GLOBALS['spip_lang_left'] . "','$info',event"; |
|
| 61 | + $args = "'$idom',this,$col,'".$GLOBALS['spip_lang_left']."','$info',event"; |
|
| 62 | 62 | |
| 63 | 63 | foreach ($ordre as $id => $titrebrut) { |
| 64 | 64 | $titre = supprimer_numero($titrebrut); |
| 65 | 65 | |
| 66 | - $classe1 = 'petit-item ' . ($id_rubrique ? 'petite-rubrique' : 'petit-secteur'); |
|
| 66 | + $classe1 = 'petit-item '.($id_rubrique ? 'petite-rubrique' : 'petit-secteur'); |
|
| 67 | 67 | if (isset($rub[$id]['enfants'])) { |
| 68 | 68 | $classe2 = " class='rub-ouverte'"; |
| 69 | 69 | $url = "\nhref='$rec&id=$id'"; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $url = "\nhref='javascript:void(0)'"; |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - $js_func = $do . '_selection_titre'; |
|
| 75 | + $js_func = $do.'_selection_titre'; |
|
| 76 | 76 | $click = "\nonclick=\"changerhighlight(this.parentNode.parentNode.parentNode);\nreturn " |
| 77 | 77 | . (is_array($list) ? "aff_selection_provisoire($id,$args)" : ' false') |
| 78 | 78 | # ce lien provoque la selection (directe) de la rubrique cliquee |
@@ -98,17 +98,17 @@ discard block |
||
| 98 | 98 | } |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | - $idom2 = $idom . '_col_' . ($col + 1); |
|
| 101 | + $idom2 = $idom.'_col_'.($col + 1); |
|
| 102 | 102 | $left = ($col * 250); |
| 103 | 103 | |
| 104 | 104 | return http_img_pack( |
| 105 | 105 | 'loader.svg', |
| 106 | 106 | '', |
| 107 | - "class='loader' style='visibility: hidden; position: absolute; " . $GLOBALS['spip_lang_left'] . ': ' |
|
| 107 | + "class='loader' style='visibility: hidden; position: absolute; ".$GLOBALS['spip_lang_left'].': ' |
|
| 108 | 108 | . ($left - 30) |
| 109 | 109 | . "px; top: 2px; z-index: 2;' id='img_$idom2'" |
| 110 | 110 | ) |
| 111 | - . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; " . $GLOBALS['spip_lang_left'] . ': ' |
|
| 111 | + . "<div style='width: 250px; height: 100%; overflow: auto; position: absolute; top: 0px; ".$GLOBALS['spip_lang_left'].': ' |
|
| 112 | 112 | . ($left - 250) |
| 113 | 113 | . "px;'>" |
| 114 | 114 | . $ret |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | if (str_starts_with($recherche, '/') && str_ends_with($recherche, '/') && strlen($recherche) > 2) { |
| 99 | 99 | // c'est une preg |
| 100 | 100 | $recherche_trans = translitteration($recherche); |
| 101 | - $preg = $recherche_trans . $options['preg_flags']; |
|
| 101 | + $preg = $recherche_trans.$options['preg_flags']; |
|
| 102 | 102 | $is_preg = true; |
| 103 | 103 | } else { |
| 104 | 104 | // s'il y a plusieurs mots il faut les chercher tous : oblige REGEXP, |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if (preg_match(',\s+,' . $u, $recherche_mod)) { |
|
| 121 | + if (preg_match(',\s+,'.$u, $recherche_mod)) { |
|
| 122 | 122 | $is_preg = true; |
| 123 | 123 | |
| 124 | 124 | $recherche_inter = '|'; |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | foreach ($recherche_mots as $mot) { |
| 129 | 129 | if (strlen($mot) >= $min_long) { |
| 130 | 130 | // echapper les caracteres de regexp qui sont eventuellement dans la recherche |
| 131 | - $recherche_inter .= preg_quote($mot) . ' '; |
|
| 131 | + $recherche_inter .= preg_quote($mot).' '; |
|
| 132 | 132 | $petits_mots = false; |
| 133 | 133 | } |
| 134 | 134 | } |
@@ -136,14 +136,14 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // mais on cherche quand même l'expression complète, même si elle |
| 138 | 138 | // comporte des mots de moins de quatre lettres |
| 139 | - $recherche = trim(preg_replace(',\s+,' . $u, '|', $recherche_inter), '|'); |
|
| 139 | + $recherche = trim(preg_replace(',\s+,'.$u, '|', $recherche_inter), '|'); |
|
| 140 | 140 | if (!$recherche || $petits_mots) { |
| 141 | 141 | $recherche = preg_quote($recherche_org); |
| 142 | 142 | } |
| 143 | 143 | $recherche_trans = translitteration($recherche); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - $preg = '/' . str_replace('/', '\\/', (string) $recherche_trans) . '/' . $options['preg_flags']; |
|
| 146 | + $preg = '/'.str_replace('/', '\\/', (string) $recherche_trans).'/'.$options['preg_flags']; |
|
| 147 | 147 | } |
| 148 | 148 | |
| 149 | 149 | // Si la chaine est inactive, on va utiliser LIKE pour aller plus vite |
@@ -180,11 +180,11 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | $q = sql_quote( |
| 182 | 182 | '%' |
| 183 | - . preg_replace(',\s+,' . $u, '%', $q) |
|
| 183 | + . preg_replace(',\s+,'.$u, '%', $q) |
|
| 184 | 184 | . '%' |
| 185 | 185 | ); |
| 186 | 186 | |
| 187 | - $preg = '/' . preg_replace(',\s+,' . $u, '.+', trim((string) $recherche_mod)) . '/' . $options['preg_flags']; |
|
| 187 | + $preg = '/'.preg_replace(',\s+,'.$u, '.+', trim((string) $recherche_mod)).'/'.$options['preg_flags']; |
|
| 188 | 188 | } else { |
| 189 | 189 | $methode = 'REGEXP'; |
| 190 | 190 | $q = sql_quote(trim($recherche, '/')); |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | foreach ($tables as $table => $champs) { |
| 304 | 304 | # lock via memoization, si dispo |
| 305 | 305 | if (function_exists('cache_lock')) { |
| 306 | - cache_lock($lock = _RECHERCHE_LOCK_KEY . ' ' . $table . ' ' . $recherche); |
|
| 306 | + cache_lock($lock = _RECHERCHE_LOCK_KEY.' '.$table.' '.$recherche); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | spip_timer('rech'); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | |
| 319 | 319 | |
| 320 | 320 | spip_log( |
| 321 | - "recherche $table ($recherche) : " . (is_countable($results[$table]) ? count($results[$table]) : 0) . ' resultats ' . spip_timer('rech'), |
|
| 321 | + "recherche $table ($recherche) : ".(is_countable($results[$table]) ? count($results[$table]) : 0).' resultats '.spip_timer('rech'), |
|
| 322 | 322 | 'recherche' |
| 323 | 323 | ); |
| 324 | 324 | |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | |
| 353 | 353 | $results = recherche_en_base($recherche, $tables, $options); |
| 354 | 354 | |
| 355 | - $preg = '/' . str_replace('/', '\\/', (string) $recherche) . '/' . $options['preg_flags']; |
|
| 355 | + $preg = '/'.str_replace('/', '\\/', (string) $recherche).'/'.$options['preg_flags']; |
|
| 356 | 356 | |
| 357 | 357 | foreach ($results as $table => $r) { |
| 358 | 358 | $_id_table = id_table_objet($table); |