@@ -416,7 +416,7 @@ |
||
| 416 | 416 | $h = generer_action_auteur("instituer_objet", "$type-$id-$statut"); |
| 417 | 417 | $t = supprimer_tags($titre); |
| 418 | 418 | |
| 419 | - return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>" . http_img_pack($img, $t) . "</a>"; |
|
| 419 | + return "<a href=\"#\" data-puce-id=\"$id\" data-puce-type=\"$type\" data-puce-decal=\"$n\" data-puce-action=\"$h\" title=\"$t\"$act>".http_img_pack($img, $t)."</a>"; |
|
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | // compat |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | if (!$fonc) { |
| 148 | 148 | $fonc = $GLOBALS['debug_objets']['principal']; |
| 149 | 149 | } |
| 150 | - $titre = !$mode ? $fonc : ($mode . (isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? " " . $GLOBALS['debug_objets']['sourcefile'][$fonc] : "")); |
|
| 150 | + $titre = !$mode ? $fonc : ($mode.(isset($GLOBALS['debug_objets']['sourcefile'][$fonc]) ? " ".$GLOBALS['debug_objets']['sourcefile'][$fonc] : "")); |
|
| 151 | 151 | } |
| 152 | 152 | if ($message === false) { |
| 153 | 153 | lang_select(); |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | $fond = isset($GLOBALS['fond']) ? $GLOBALS['fond'] : ""; |
| 177 | 177 | // une erreur critique sort $message en array |
| 178 | 178 | $debug = is_array($msg) ? $msg[1] : $msg; |
| 179 | - spip_log("Debug: " . $debug . " (" . $fond . ")"); |
|
| 179 | + spip_log("Debug: ".$debug." (".$fond.")"); |
|
| 180 | 180 | |
| 181 | 181 | return $msg; |
| 182 | 182 | } |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | function debusquer_bandeau($erreurs) { |
| 185 | 185 | |
| 186 | 186 | if (!empty($erreurs)) { |
| 187 | - $n = array(count($erreurs) . ' ' . _T('zbug_erreur_squelette')); |
|
| 187 | + $n = array(count($erreurs).' '._T('zbug_erreur_squelette')); |
|
| 188 | 188 | |
| 189 | 189 | return debusquer_navigation($erreurs, $n); |
| 190 | 190 | } elseif (!empty($GLOBALS['tableau_des_temps'])) { |
@@ -217,25 +217,25 @@ discard block |
||
| 217 | 217 | $valeur_simple = array(); |
| 218 | 218 | foreach ($valeur as $v) { |
| 219 | 219 | if (is_array($v)) { |
| 220 | - $valeur_simple[] = 'array:' . count($v); |
|
| 220 | + $valeur_simple[] = 'array:'.count($v); |
|
| 221 | 221 | } elseif (is_object($v)) { |
| 222 | 222 | $valeur_simple[] = get_class($v); |
| 223 | 223 | } elseif (is_string($v)) { |
| 224 | - $valeur_simple[] = "'" . $v . "'"; |
|
| 224 | + $valeur_simple[] = "'".$v."'"; |
|
| 225 | 225 | } else { |
| 226 | 226 | $valeur_simple[] = $v; |
| 227 | 227 | } |
| 228 | 228 | } |
| 229 | 229 | $n = count($valeur); |
| 230 | - $valeur = (($n > 3) ? 'array:' . $n . ' ' : ''); |
|
| 231 | - $valeur .= '[' . join(', ', $valeur_simple) . ']'; |
|
| 230 | + $valeur = (($n > 3) ? 'array:'.$n.' ' : ''); |
|
| 231 | + $valeur .= '['.join(', ', $valeur_simple).']'; |
|
| 232 | 232 | } elseif (is_object($valeur)) { |
| 233 | 233 | $valeur = get_class($valeur); |
| 234 | 234 | } elseif (is_string($valeur)) { |
| 235 | - $valeur = "'" . $valeur . "'"; |
|
| 235 | + $valeur = "'".$valeur."'"; |
|
| 236 | 236 | } |
| 237 | - $res .= "\n<tr><td><strong>" . nl2br(entites_html($nom)) |
|
| 238 | - . "</strong></td><td>: " . nl2br(entites_html($valeur)) |
|
| 237 | + $res .= "\n<tr><td><strong>".nl2br(entites_html($nom)) |
|
| 238 | + . "</strong></td><td>: ".nl2br(entites_html($valeur)) |
|
| 239 | 239 | . "</td></tr>\n"; |
| 240 | 240 | } |
| 241 | 241 | |
@@ -263,10 +263,10 @@ discard block |
||
| 263 | 263 | $nom_code = $lieu->descr['nom']; |
| 264 | 264 | $skel = $lieu->descr['sourcefile']; |
| 265 | 265 | $h2 = parametre_url($href, 'var_mode_objet', $nom_code); |
| 266 | - $h3 = parametre_url($h2, 'var_mode_affiche', 'squelette') . '#L' . $ligne; |
|
| 266 | + $h3 = parametre_url($h2, 'var_mode_affiche', 'squelette').'#L'.$ligne; |
|
| 267 | 267 | $skel = "<a href='$h3'><b>$skel</b></a>"; |
| 268 | 268 | if ($boucle) { |
| 269 | - $h3 = parametre_url($h2 . $boucle, 'var_mode_affiche', 'boucle'); |
|
| 269 | + $h3 = parametre_url($h2.$boucle, 'var_mode_affiche', 'boucle'); |
|
| 270 | 270 | $boucle = "<a href='$h3'><b>$boucle</b></a>"; |
| 271 | 271 | } |
| 272 | 272 | } |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | |
| 355 | 355 | // Requete erronee |
| 356 | - $err = "<b>" . _T('avis_erreur_mysql') . " $errno</b><br /><tt>\n" |
|
| 356 | + $err = "<b>"._T('avis_erreur_mysql')." $errno</b><br /><tt>\n" |
|
| 357 | 357 | . spip_htmlspecialchars($msg) |
| 358 | 358 | . "\n<br /><span style='color: red'><b>" |
| 359 | 359 | . spip_htmlspecialchars($query) |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | // https://code.spip.net/@trouve_boucle_debug |
| 369 | 369 | function trouve_boucle_debug($n, $nom, $debut = 0, $boucle = "") { |
| 370 | 370 | |
| 371 | - $id = $nom . $boucle; |
|
| 371 | + $id = $nom.$boucle; |
|
| 372 | 372 | if (is_array($GLOBALS['debug_objets']['sequence'][$id])) { |
| 373 | 373 | foreach ($GLOBALS['debug_objets']['sequence'][$id] as $v) { |
| 374 | 374 | |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | } |
| 420 | 420 | } |
| 421 | 421 | } |
| 422 | - $incl = ',' . $reg[1] . '[.]\w$,'; |
|
| 422 | + $incl = ','.$reg[1].'[.]\w$,'; |
|
| 423 | 423 | |
| 424 | 424 | foreach ($GLOBALS['debug_objets']['sourcefile'] as $k => $v) { |
| 425 | 425 | if (preg_match($incl, $v)) { |
@@ -435,16 +435,13 @@ discard block |
||
| 435 | 435 | list($skel, $boucle, $ligne) = trouve_boucle_debug($n, $nom); |
| 436 | 436 | |
| 437 | 437 | if (!$boucle) { |
| 438 | - return !$ligne ? "" : |
|
| 439 | - (" (" . |
|
| 440 | - (($nom != $skel) ? _T('squelette_inclus_ligne') : |
|
| 441 | - _T('squelette_ligne')) . |
|
| 438 | + return !$ligne ? "" : (" (". |
|
| 439 | + (($nom != $skel) ? _T('squelette_inclus_ligne') : _T('squelette_ligne')). |
|
| 442 | 440 | " <a href='$self&var_mode_objet=$skel&var_mode_affiche=squelette&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)"); |
| 443 | 441 | } else { |
| 444 | 442 | $self .= "&var_mode_objet=$skel$boucle&var_mode_affiche=boucle"; |
| 445 | 443 | |
| 446 | - return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" : |
|
| 447 | - " (boucle $boucle ligne\n<a href='$self&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)"; |
|
| 444 | + return !$ligne ? " (boucle\n<a href='$self#$skel$boucle'>$boucle</a>)" : " (boucle $boucle ligne\n<a href='$self&var_mode_ligne=$ligne#L$ligne'>$ligne</a>)"; |
|
| 448 | 445 | } |
| 449 | 446 | } |
| 450 | 447 | |
@@ -466,13 +463,13 @@ discard block |
||
| 466 | 463 | } |
| 467 | 464 | |
| 468 | 465 | $s = preg_replace(',<(\w[^<>]*)>([^<]*)<br />([^<]*)</\1>,', |
| 469 | - '<\1>\2</\1><br />' . "\n" . '<\1>\3</\1>', |
|
| 466 | + '<\1>\2</\1><br />'."\n".'<\1>\3</\1>', |
|
| 470 | 467 | $s); |
| 471 | 468 | |
| 472 | 469 | |
| 473 | 470 | $tableau = explode("<br />", $s); |
| 474 | 471 | |
| 475 | - $format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: " . ($nocpt ? 'hidden' : 'visible') . ";%s' href='#T%s' title=\"%s\">%0" . strval(@strlen(count($tableau))) . "d</a></span> %s<br />\n"; |
|
| 472 | + $format = "<span style='float:left;display:block;width:50px;height:1px'><a id='L%d' style='background-color: white; visibility: ".($nocpt ? 'hidden' : 'visible').";%s' href='#T%s' title=\"%s\">%0".strval(@strlen(count($tableau)))."d</a></span> %s<br />\n"; |
|
| 476 | 473 | |
| 477 | 474 | $format10 = str_replace('white', 'lightgrey', $format); |
| 478 | 475 | $formaterr = "color: red;"; |
@@ -516,7 +513,7 @@ discard block |
||
| 516 | 513 | . '" style="cursor: pointer;">' |
| 517 | 514 | . ($nocpt ? '' : _T('info_numero_abbreviation')) |
| 518 | 515 | . "</div> |
| 519 | - " . $res . "</div>\n"; |
|
| 516 | + " . $res."</div>\n"; |
|
| 520 | 517 | } |
| 521 | 518 | |
| 522 | 519 | // l'environnement graphique du debuggueur |
@@ -537,14 +534,14 @@ discard block |
||
| 537 | 534 | if (!empty($GLOBALS['debug_objets'][$mode][$fonc])) { |
| 538 | 535 | list($legend, $texte, $res2) = debusquer_source($fonc, $mode); |
| 539 | 536 | $texte .= $res2; |
| 540 | - } elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc . 'tout'])) { |
|
| 541 | - $legend = _T('zbug_' . $mode); |
|
| 542 | - $texte = $GLOBALS['debug_objets'][$mode][$fonc . 'tout']; |
|
| 537 | + } elseif (!empty($GLOBALS['debug_objets'][$mode][$fonc.'tout'])) { |
|
| 538 | + $legend = _T('zbug_'.$mode); |
|
| 539 | + $texte = $GLOBALS['debug_objets'][$mode][$fonc.'tout']; |
|
| 543 | 540 | $texte = ancre_texte($texte, array('', '')); |
| 544 | 541 | } |
| 545 | 542 | } else { |
| 546 | 543 | if (strlen(trim($res))) { |
| 547 | - return "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"; |
|
| 544 | + return "<img src='".chemin_image('debug-xx.svg')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res</div>"; |
|
| 548 | 545 | } else { |
| 549 | 546 | // cas de l'appel sur erreur: montre la page |
| 550 | 547 | return isset($GLOBALS['debug_objets']['resultat']['tout']) |
@@ -554,7 +551,7 @@ discard block |
||
| 554 | 551 | } |
| 555 | 552 | } else { |
| 556 | 553 | $valider = charger_fonction('valider', 'xml'); |
| 557 | - $val = $valider($GLOBALS['debug_objets']['validation'][$fonc . 'tout']); |
|
| 554 | + $val = $valider($GLOBALS['debug_objets']['validation'][$fonc.'tout']); |
|
| 558 | 555 | // Si erreur, signaler leur nombre dans le formulaire admin |
| 559 | 556 | $GLOBALS['debug_objets']['validation'] = $val->err ? count($val->err) : ''; |
| 560 | 557 | list($texte, $err) = emboite_texte($val, $fonc, $self); |
@@ -565,14 +562,14 @@ discard block |
||
| 565 | 562 | } else { |
| 566 | 563 | $err = ": $err"; |
| 567 | 564 | } |
| 568 | - $legend = _T('validation') . ' ' . $err; |
|
| 565 | + $legend = _T('validation').' '.$err; |
|
| 569 | 566 | $res = $id = ''; |
| 570 | 567 | } |
| 571 | 568 | |
| 572 | 569 | return !trim($texte) ? '' : ( |
| 573 | - "<img src='" . chemin_image('debug-xx.svg') . "' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res" |
|
| 570 | + "<img src='".chemin_image('debug-xx.svg')."' alt='afficher-masquer le debug' id='spip-debug-toggle' onclick=\"var x = document.getElementById('spip-debug'); (x.style.display == '' ? x.style.display = 'none' : x.style.display = '');\" /><div id='spip-debug'>$res" |
|
| 574 | 571 | . "<div id='debug_boucle'><fieldset$id><legend>" |
| 575 | - . "<a href='" . $self . "#f_" . substr($fonc, 0, 37) . "'> ↑ " |
|
| 572 | + . "<a href='".$self."#f_".substr($fonc, 0, 37)."'> ↑ " |
|
| 576 | 573 | . ($legend ? $legend : $mode) |
| 577 | 574 | . "</a></legend>" |
| 578 | 575 | . $texte |
@@ -584,7 +581,7 @@ discard block |
||
| 584 | 581 | // https://code.spip.net/@emboite_texte |
| 585 | 582 | function emboite_texte($res, $fonc = '', $self = '') { |
| 586 | 583 | $errs = $res->err; |
| 587 | - $texte = $res->entete . ($errs ? '' : $res->page); |
|
| 584 | + $texte = $res->entete.($errs ? '' : $res->page); |
|
| 588 | 585 | |
| 589 | 586 | if (!$texte and !$errs) { |
| 590 | 587 | return array(ancre_texte('', array('', '')), false); |
@@ -641,7 +638,7 @@ discard block |
||
| 641 | 638 | $err = "<h2 style='text-align: center'>" |
| 642 | 639 | . $i |
| 643 | 640 | . "<a href='#fin_err'>" |
| 644 | - . " " . _T('erreur_texte') |
|
| 641 | + . " "._T('erreur_texte') |
|
| 645 | 642 | . "</a></h2><table id='debut_err' style='width: 100%'>" |
| 646 | 643 | . $err |
| 647 | 644 | . " </table><a id='fin_err'></a>"; |
@@ -651,9 +648,9 @@ discard block |
||
| 651 | 648 | list($msg, $fermant, $ouvrant) = $errs[0]; |
| 652 | 649 | $rf = reference_boucle_debug($fermant, $fonc, $self); |
| 653 | 650 | $ro = reference_boucle_debug($ouvrant, $fonc, $self); |
| 654 | - $err = $msg . |
|
| 655 | - "<a href='#L" . $fermant . "'>$fermant</a>$rf<br />" . |
|
| 656 | - "<a href='#L" . $ouvrant . "'>$ouvrant</a>$ro"; |
|
| 651 | + $err = $msg. |
|
| 652 | + "<a href='#L".$fermant."'>$fermant</a>$rf<br />". |
|
| 653 | + "<a href='#L".$ouvrant."'>$ouvrant</a>$ro"; |
|
| 657 | 654 | |
| 658 | 655 | return array(ancre_texte($texte, array(array($ouvrant), array($fermant))), $err); |
| 659 | 656 | } |
@@ -685,7 +682,7 @@ discard block |
||
| 685 | 682 | $temps = !isset($GLOBALS['debug_objets']['profile'][$sourcefile]) ? '' : _T('zbug_profile', |
| 686 | 683 | array('time' => $GLOBALS['debug_objets']['profile'][$sourcefile])); |
| 687 | 684 | |
| 688 | - $res .= "<fieldset id='f_" . $nom . "'><legend>" |
|
| 685 | + $res .= "<fieldset id='f_".$nom."'><legend>" |
|
| 689 | 686 | . $t_skel |
| 690 | 687 | . ' ' |
| 691 | 688 | . $sourcefile |
@@ -700,7 +697,7 @@ discard block |
||
| 700 | 697 | . "'>" |
| 701 | 698 | . _T('zbug_calcul') |
| 702 | 699 | . "</a></legend>" |
| 703 | - . (!$temps ? '' : ("\n<span style='display:block;float:" . $GLOBALS['spip_lang_right'] . "'>$temps</span><br />")) |
|
| 700 | + . (!$temps ? '' : ("\n<span style='display:block;float:".$GLOBALS['spip_lang_right']."'>$temps</span><br />")) |
|
| 704 | 701 | . debusquer_contexte($contexte[$sourcefile]) |
| 705 | 702 | . (!$nav ? '' : ("<table width='100%'>\n$nav</table>\n")) |
| 706 | 703 | . "</fieldset>\n"; |
@@ -721,33 +718,33 @@ discard block |
||
| 721 | 718 | $nom = $boucle->id_boucle; |
| 722 | 719 | $req = $boucle->type_requete; |
| 723 | 720 | $crit = public_decompiler($boucle, $gram, 0, 'criteres'); |
| 724 | - $self2 = $self . "&var_mode_objet=" . $objet; |
|
| 725 | - |
|
| 726 | - $res .= "\n<tr style='background-color: " . |
|
| 727 | - ($i % 2 ? '#e0e0f0' : '#f8f8ff') . |
|
| 728 | - "'><td align='right'>$i</td><td>\n" . |
|
| 729 | - "<a class='debug_link_boucle' href='" . |
|
| 730 | - $self2 . |
|
| 731 | - "&var_mode_affiche=boucle#f_$nom_skel'>" . |
|
| 732 | - _T('zbug_boucle') . |
|
| 733 | - "</a></td><td>\n<a class='debug_link_boucle' href='" . |
|
| 734 | - $self2 . |
|
| 735 | - "&var_mode_affiche=resultat#f_$nom_skel'>" . |
|
| 736 | - _T('zbug_resultat') . |
|
| 737 | - "</a></td><td>\n<a class='debug_link_resultat' href='" . |
|
| 738 | - $self2 . |
|
| 739 | - "&var_mode_affiche=code#f_$nom_skel'>" . |
|
| 740 | - _T('zbug_code') . |
|
| 741 | - "</a></td><td>\n<a class='debug_link_resultat' href='" . |
|
| 742 | - str_replace('var_mode=', 'var_profile=', $self2) . |
|
| 743 | - "'>" . |
|
| 744 | - _T('zbug_calcul') . |
|
| 745 | - "</a></td><td>\n" . |
|
| 746 | - (($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom) . |
|
| 747 | - "</td><td>\n" . |
|
| 748 | - $req . |
|
| 749 | - "</td><td>\n" . |
|
| 750 | - spip_htmlspecialchars($crit) . |
|
| 721 | + $self2 = $self."&var_mode_objet=".$objet; |
|
| 722 | + |
|
| 723 | + $res .= "\n<tr style='background-color: ". |
|
| 724 | + ($i % 2 ? '#e0e0f0' : '#f8f8ff'). |
|
| 725 | + "'><td align='right'>$i</td><td>\n". |
|
| 726 | + "<a class='debug_link_boucle' href='". |
|
| 727 | + $self2. |
|
| 728 | + "&var_mode_affiche=boucle#f_$nom_skel'>". |
|
| 729 | + _T('zbug_boucle'). |
|
| 730 | + "</a></td><td>\n<a class='debug_link_boucle' href='". |
|
| 731 | + $self2. |
|
| 732 | + "&var_mode_affiche=resultat#f_$nom_skel'>". |
|
| 733 | + _T('zbug_resultat'). |
|
| 734 | + "</a></td><td>\n<a class='debug_link_resultat' href='". |
|
| 735 | + $self2. |
|
| 736 | + "&var_mode_affiche=code#f_$nom_skel'>". |
|
| 737 | + _T('zbug_code'). |
|
| 738 | + "</a></td><td>\n<a class='debug_link_resultat' href='". |
|
| 739 | + str_replace('var_mode=', 'var_profile=', $self2). |
|
| 740 | + "'>". |
|
| 741 | + _T('zbug_calcul'). |
|
| 742 | + "</a></td><td>\n". |
|
| 743 | + (($var_mode_objet == $objet) ? "<b>$nom</b>" : $nom). |
|
| 744 | + "</td><td>\n". |
|
| 745 | + $req. |
|
| 746 | + "</td><td>\n". |
|
| 747 | + spip_htmlspecialchars($crit). |
|
| 751 | 748 | "</td></tr>"; |
| 752 | 749 | } |
| 753 | 750 | } |
@@ -774,7 +771,7 @@ discard block |
||
| 774 | 771 | } |
| 775 | 772 | // permettre le copier/coller facile |
| 776 | 773 | // $res = ancre_texte($req, array(), true); |
| 777 | - $res = "<div id='T" . md5($req) . "'>\n<pre>\n" . $req . "</pre>\n</div>\n"; |
|
| 774 | + $res = "<div id='T".md5($req)."'>\n<pre>\n".$req."</pre>\n</div>\n"; |
|
| 778 | 775 | // formatage et affichage des resultats bruts de la requete |
| 779 | 776 | $ress_req = spip_query($req); |
| 780 | 777 | $brut_sql = ''; |
@@ -784,10 +781,10 @@ discard block |
||
| 784 | 781 | $max_aff = defined('_MAX_DEBUG_AFF') ? _MAX_DEBUG_AFF : 50; |
| 785 | 782 | while ($retours_sql = sql_fetch($ress_req)) { |
| 786 | 783 | if ($num <= $max_aff) { |
| 787 | - $brut_sql .= "<h3>" . ($num == 1 ? $num . " sur " . sql_count($ress_req) : $num) . "</h3>"; |
|
| 784 | + $brut_sql .= "<h3>".($num == 1 ? $num." sur ".sql_count($ress_req) : $num)."</h3>"; |
|
| 788 | 785 | $brut_sql .= "<p>"; |
| 789 | 786 | foreach ($retours_sql as $key => $val) { |
| 790 | - $brut_sql .= "<strong>" . $key . "</strong> => " . spip_htmlspecialchars(couper($val, 150)) . "<br />\n"; |
|
| 787 | + $brut_sql .= "<strong>".$key."</strong> => ".spip_htmlspecialchars(couper($val, 150))."<br />\n"; |
|
| 791 | 788 | } |
| 792 | 789 | $brut_sql .= "</p>"; |
| 793 | 790 | } |
@@ -798,15 +795,15 @@ discard block |
||
| 798 | 795 | // ne pas afficher les $contexte_inclus |
| 799 | 796 | $view = preg_replace(",<\?php.+\?[>],Uims", "", $view); |
| 800 | 797 | if ($view) { |
| 801 | - $res2 .= "\n<br /><fieldset>" . interdire_scripts($view) . "</fieldset>"; |
|
| 798 | + $res2 .= "\n<br /><fieldset>".interdire_scripts($view)."</fieldset>"; |
|
| 802 | 799 | } |
| 803 | 800 | } |
| 804 | 801 | |
| 805 | 802 | } elseif ($affiche == 'code') { |
| 806 | 803 | $legend = $nom; |
| 807 | - $res = ancre_texte("<" . "?php\n" . $quoi . "\n?" . ">"); |
|
| 804 | + $res = ancre_texte("<"."?php\n".$quoi."\n?".">"); |
|
| 808 | 805 | } elseif ($affiche == 'boucle') { |
| 809 | - $legend = _T('zbug_boucle') . ' ' . $nom; |
|
| 806 | + $legend = _T('zbug_boucle').' '.$nom; |
|
| 810 | 807 | // Le compilateur prefixe le nom des boucles par l'extension du fichier source. |
| 811 | 808 | $gram = preg_match('/^([^_]+)_/', $objet, $r) ? $r[1] : ''; |
| 812 | 809 | $res = ancre_texte(public_decompiler($quoi, $gram, 0, 'boucle')); |
@@ -825,23 +822,23 @@ discard block |
||
| 825 | 822 | include_spip('public/assembler'); // pour inclure_balise_dynamique |
| 826 | 823 | include_spip('inc/texte'); // pour corriger_typo |
| 827 | 824 | |
| 828 | - return _DOCTYPE_ECRIRE . |
|
| 829 | - html_lang_attributes() . |
|
| 830 | - "<head>\n<title>" . |
|
| 831 | - ('SPIP ' . $GLOBALS['spip_version_affichee'] . ' ' . |
|
| 832 | - _T('admin_debug') . ' ' . $titre . ' (' . |
|
| 833 | - supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))) . |
|
| 834 | - ")</title>\n" . |
|
| 835 | - "<meta http-equiv='Content-Type' content='text/html" . |
|
| 836 | - (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : '') . |
|
| 837 | - "' />\n" . |
|
| 825 | + return _DOCTYPE_ECRIRE. |
|
| 826 | + html_lang_attributes(). |
|
| 827 | + "<head>\n<title>". |
|
| 828 | + ('SPIP '.$GLOBALS['spip_version_affichee'].' '. |
|
| 829 | + _T('admin_debug').' '.$titre.' ('. |
|
| 830 | + supprimer_tags(corriger_typo($GLOBALS['meta']['nom_site']))). |
|
| 831 | + ")</title>\n". |
|
| 832 | + "<meta http-equiv='Content-Type' content='text/html". |
|
| 833 | + (($c = $GLOBALS['meta']['charset']) ? "; charset=$c" : ''). |
|
| 834 | + "' />\n". |
|
| 838 | 835 | http_script('', 'jquery.js') |
| 839 | - . "<link rel='stylesheet' href='" . url_absolue(find_in_path('spip_admin.css')) |
|
| 840 | - . "' type='text/css' />" . |
|
| 841 | - "</head>\n" . |
|
| 842 | - "<body style='margin:0 10px;'>\n" . |
|
| 843 | - "<div id='spip-debug-header'>" . |
|
| 844 | - $corps . |
|
| 845 | - inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false) . |
|
| 836 | + . "<link rel='stylesheet' href='".url_absolue(find_in_path('spip_admin.css')) |
|
| 837 | + . "' type='text/css' />". |
|
| 838 | + "</head>\n". |
|
| 839 | + "<body style='margin:0 10px;'>\n". |
|
| 840 | + "<div id='spip-debug-header'>". |
|
| 841 | + $corps. |
|
| 842 | + inclure_balise_dynamique(balise_FORMULAIRE_ADMIN_dyn('spip-admin-float', $GLOBALS['debug_objets']), false). |
|
| 846 | 843 | '</div></body></html>'; |
| 847 | 844 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $texte = $x . $texte; |
|
| 67 | + $texte = $x.$texte; |
|
| 68 | 68 | |
| 69 | 69 | return $texte; |
| 70 | 70 | } |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | if (isset($_SERVER['HTTP_REFERER'])) { |
| 102 | 102 | $_SERVER['HTTP_REFERER'] = preg_replace(',[^\w\,/#&;:-]+,', ' ', $_SERVER['HTTP_REFERER']); |
| 103 | 103 | } |
| 104 | - if ($rech){ |
|
| 104 | + if ($rech) { |
|
| 105 | 105 | $rech = preg_replace(',[^\w\,/#&;:-]+,', ' ', $rech); |
| 106 | 106 | } |
| 107 | 107 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | || ($pos = 0); |
| 177 | 177 | |
| 178 | 178 | if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) { |
| 179 | - $insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n"; |
|
| 179 | + $insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n"; |
|
| 180 | 180 | $texte = substr_replace($texte, $insert, $pos, 0); |
| 181 | 181 | } |
| 182 | 182 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) { |
| 213 | 213 | $pos = -1; |
| 214 | 214 | } |
| 215 | - $texte = substr_replace($texte, $x, $pos+1, 0); |
|
| 215 | + $texte = substr_replace($texte, $x, $pos + 1, 0); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | if (isset($GLOBALS['affiche_boutons_admin']) and $GLOBALS['affiche_boutons_admin']) { |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | |
| 279 | 279 | // inserer avant le </body> fermant si on peut, a la fin de la page sinon |
| 280 | 280 | if (($p = strpos($texte, '</body>')) !== false) { |
| 281 | - $texte = substr($texte, 0, $p) . $code . substr($texte, $p); |
|
| 281 | + $texte = substr($texte, 0, $p).$code.substr($texte, $p); |
|
| 282 | 282 | } else { |
| 283 | 283 | $texte .= $code; |
| 284 | 284 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | // si id numerique et un seul objet possible, pas d'ambiguite |
| 160 | 160 | if (is_numeric($ref) and count($objets) === 1) { |
| 161 | - $ref = reset($objets) . $ref; |
|
| 161 | + $ref = reset($objets).$ref; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // Si la référence ne correspond à rien, c'est fini |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | return json_export(false); |
| 167 | 167 | } |
| 168 | 168 | // Sinon on récupère les infos utiles |
| 169 | - @list($type, , $id, , , , ) = $match; |
|
| 169 | + @list($type,, $id,,,,) = $match; |
|
| 170 | 170 | |
| 171 | 171 | // On regarde si le type trouvé fait partie des objets sélectionnables |
| 172 | 172 | if (!in_array(table_objet($type), $objets)) { |
@@ -211,8 +211,8 @@ discard block |
||
| 211 | 211 | $types = (is_array($types) ? array_filter($types) : array()); |
| 212 | 212 | |
| 213 | 213 | // recuperer tous les freres et soeurs de la rubrique visee |
| 214 | - $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique=' . intval($id_rubrique)); |
|
| 215 | - $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent=' . intval($id_parent)); |
|
| 214 | + $id_parent = sql_getfetsel('id_parent', 'spip_rubriques', 'id_rubrique='.intval($id_rubrique)); |
|
| 215 | + $fratrie = sql_allfetsel('id_rubrique', 'spip_rubriques', 'id_parent='.intval($id_parent)); |
|
| 216 | 216 | $fratrie = array_column($fratrie, 'id_rubrique'); |
| 217 | 217 | $has = sql_allfetsel('DISTINCT id_parent', 'spip_rubriques', sql_in('id_parent', $fratrie)); |
| 218 | 218 | $has = array_column($has, 'id_parent'); |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | * string : La langue qui a été utilisée si trouvée |
| 38 | 38 | * false : aucune langue ne correspondait à la demande |
| 39 | 39 | **/ |
| 40 | -function changer_langue($lang, $liste_langues=null) { |
|
| 40 | +function changer_langue($lang, $liste_langues = null) { |
|
| 41 | 41 | |
| 42 | 42 | if (is_null($liste_langues)) { |
| 43 | - $liste_langues = @$GLOBALS['meta']['langues_proposees'] . ',' . @$GLOBALS['meta']['langues_multilingue']; |
|
| 43 | + $liste_langues = @$GLOBALS['meta']['langues_proposees'].','.@$GLOBALS['meta']['langues_multilingue']; |
|
| 44 | 44 | } |
| 45 | 45 | else { |
| 46 | 46 | if (is_array($liste_langues)) { |
| 47 | 47 | $liste_langues = implode(',', $liste_langues); |
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | - $liste_langues = ',' . $liste_langues . ','; |
|
| 50 | + $liste_langues = ','.$liste_langues.','; |
|
| 51 | 51 | |
| 52 | 52 | // Si la langue demandee n'existe pas, on essaie d'autres variantes |
| 53 | 53 | // Exemple : 'pt-br' => 'pt_br' => 'pt' |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | } |
| 199 | 199 | foreach ($langues as $l) { |
| 200 | 200 | $selected = ($l == $default) ? ' selected=\'selected\'' : ''; |
| 201 | - $ret .= "<option value='$l'$selected>[" . $l . "] " . traduire_nom_langue($l) . "</option>\n"; |
|
| 201 | + $ret .= "<option value='$l'$selected>[".$l."] ".traduire_nom_langue($l)."</option>\n"; |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if (!test_espace_prive()) { |
@@ -213,23 +213,21 @@ discard block |
||
| 213 | 213 | |
| 214 | 214 | return generer_action_auteur('converser', $base, $cible, |
| 215 | 215 | (select_langues($nom_select, $change, $ret) |
| 216 | - . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='" . _T('bouton_changer') . "' /></div></noscript>"), |
|
| 216 | + . "<noscript><div style='display:inline'><input type='submit' class='fondo' value='"._T('bouton_changer')."' /></div></noscript>"), |
|
| 217 | 217 | " method='post'"); |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | // https://code.spip.net/@select_langues |
| 221 | 221 | function select_langues($nom_select, $change, $options, $label = "") { |
| 222 | 222 | static $cpt = 0; |
| 223 | - $id = "menu_langues" . $cpt++; |
|
| 223 | + $id = "menu_langues".$cpt++; |
|
| 224 | 224 | |
| 225 | 225 | return |
| 226 | - "<label for='$id'>" . ($label ? $label : _T('info_langues')) . "</label> " . |
|
| 226 | + "<label for='$id'>".($label ? $label : _T('info_langues'))."</label> ". |
|
| 227 | 227 | "<select name='$nom_select' id='$id' " |
| 228 | 228 | . ((!test_espace_prive()) ? |
| 229 | - ("class='forml menu_langues'") : |
|
| 230 | - (($nom_select == 'var_lang_ecrire') ? |
|
| 231 | - ("class='lang_ecrire'") : |
|
| 232 | - "class='fondl'")) |
|
| 229 | + ("class='forml menu_langues'") : (($nom_select == 'var_lang_ecrire') ? |
|
| 230 | + ("class='lang_ecrire'") : "class='fondl'")) |
|
| 233 | 231 | . $change |
| 234 | 232 | . ">\n" |
| 235 | 233 | . $options |
@@ -353,7 +351,7 @@ discard block |
||
| 353 | 351 | and (!isset($GLOBALS['spip_lang']) |
| 354 | 352 | or $GLOBALS['spip_lang'] != $GLOBALS['meta']['langue_site']) |
| 355 | 353 | ) { |
| 356 | - return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues);//@:install |
|
| 354 | + return changer_langue($GLOBALS['meta']['langue_site'], $liste_langues); //@:install |
|
| 357 | 355 | } |
| 358 | 356 | // en theorie là, la globale est définie, sinon c'est un problème. |
| 359 | 357 | if (!isset($GLOBALS['spip_lang'])) { |
@@ -456,7 +454,7 @@ discard block |
||
| 456 | 454 | if (!isset($GLOBALS['meta']['langue_site'])) { |
| 457 | 455 | // Initialisation : le francais si dispo, sinon la premiere langue trouvee |
| 458 | 456 | $GLOBALS['meta']['langue_site'] = $tout = |
| 459 | - (!$all_langs or (strpos(',' . _LANGUE_PAR_DEFAUT . ',', ",$all_langs,") !== false)) |
|
| 457 | + (!$all_langs or (strpos(','._LANGUE_PAR_DEFAUT.',', ",$all_langs,") !== false)) |
|
| 460 | 458 | ? _LANGUE_PAR_DEFAUT : substr($all_langs, 0, strpos($all_langs, ',')); |
| 461 | 459 | ecrire_meta('langue_site', $tout); |
| 462 | 460 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $_id_table = id_table_objet($objet); |
| 37 | 37 | |
| 38 | 38 | // recuperer le logo |
| 39 | - $chercher_logo = charger_fonction('chercher_logo','inc'); |
|
| 39 | + $chercher_logo = charger_fonction('chercher_logo', 'inc'); |
|
| 40 | 40 | include_spip('action/editer_logo'); |
| 41 | 41 | foreach (array('on', 'off') as $etat) { |
| 42 | 42 | $logo = $chercher_logo($id_trad, $_id_table, $etat); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | // dupliquer certains champs |
| 49 | - $trouver_table = charger_fonction('trouver_table','base'); |
|
| 49 | + $trouver_table = charger_fonction('trouver_table', 'base'); |
|
| 50 | 50 | $desc = $trouver_table(table_objet_sql($objet)); |
| 51 | 51 | $champs = $set = array(); |
| 52 | 52 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $champs[] = 'virtuel'; |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - $data = sql_fetsel('*', $desc['table'], $_id_table . '=' . intval($id_trad)); |
|
| 58 | + $data = sql_fetsel('*', $desc['table'], $_id_table.'='.intval($id_trad)); |
|
| 59 | 59 | |
| 60 | 60 | foreach ($champs as $c) { |
| 61 | 61 | $set[$c] = $data[$c]; |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | foreach ($debug['sourcefile'] as $k => $v) { |
| 103 | 103 | if (strpos($v, 'administration.') !== false) { |
| 104 | - if (isset($debug['resultat'][$k . 'tout'])) { |
|
| 105 | - return $debug['resultat'][$k . 'tout']; |
|
| 104 | + if (isset($debug['resultat'][$k.'tout'])) { |
|
| 105 | + return $debug['resultat'][$k.'tout']; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -179,12 +179,12 @@ discard block |
||
| 179 | 179 | and $id = intval($id) |
| 180 | 180 | and $desc = $trouver_table(table_objet_sql($type)) |
| 181 | 181 | ) { |
| 182 | - $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=" . intval($id)); |
|
| 182 | + $id = sql_getfetsel($_id_type, table_objet_sql($type), "$_id_type=".intval($id)); |
|
| 183 | 183 | if ($id) { |
| 184 | 184 | $env[$_id_type] = $id; |
| 185 | 185 | $env['objet'] = $type; |
| 186 | 186 | $env['id_objet'] = $id; |
| 187 | - $env['voir_' . $obj] = |
|
| 187 | + $env['voir_'.$obj] = |
|
| 188 | 188 | str_replace('&', '&', generer_url_entite($id, $obj, '', '', false)); |
| 189 | 189 | if (isset($desc['field']['id_rubrique']) |
| 190 | 190 | and $type != 'rubrique' |
@@ -237,10 +237,10 @@ discard block |
||
| 237 | 237 | $notpub = sql_in("statut", array('prop', 'prive')); |
| 238 | 238 | |
| 239 | 239 | if ($type == 'article' and $GLOBALS['meta']['post_dates'] != 'oui') { |
| 240 | - $notpub .= " OR (statut='publie' AND date>" . sql_quote(date('Y-m-d H:i:s')) . ")"; |
|
| 240 | + $notpub .= " OR (statut='publie' AND date>".sql_quote(date('Y-m-d H:i:s')).")"; |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - return sql_fetsel('1', table_objet_sql($type), id_table_objet($type) . "=" . $id . " AND ($notpub)"); |
|
| 243 | + return sql_fetsel('1', table_objet_sql($type), id_table_objet($type)."=".$id." AND ($notpub)"); |
|
| 244 | 244 | } |
| 245 | 245 | |
| 246 | 246 | |
@@ -254,9 +254,9 @@ discard block |
||
| 254 | 254 | $alang = ''; |
| 255 | 255 | if (!empty($_COOKIE['spip_admin'])) { |
| 256 | 256 | $email_or_login = preg_replace(',^@,', '', $_COOKIE['spip_admin']); |
| 257 | - $alang = sql_getfetsel('lang', 'spip_auteurs', "email=" . sql_quote($email_or_login)); |
|
| 257 | + $alang = sql_getfetsel('lang', 'spip_auteurs', "email=".sql_quote($email_or_login)); |
|
| 258 | 258 | if (!$alang) { |
| 259 | - $alang = sql_getfetsel('lang', 'spip_auteurs', "login=" . sql_quote($email_or_login)); |
|
| 259 | + $alang = sql_getfetsel('lang', 'spip_auteurs', "login=".sql_quote($email_or_login)); |
|
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | 262 | if (!$alang) { |
@@ -281,9 +281,8 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | return ((!isset($GLOBALS['xhtml']) or $GLOBALS['xhtml'] !== 'true') ? |
| 283 | 283 | (parametre_url(self(), 'var_mode', 'debug', '&') |
| 284 | - . '&var_mode_affiche=validation') : |
|
| 285 | - ('http://validator.w3.org/check?uri=' |
|
| 286 | - . rawurlencode("http://" . $_SERVER['HTTP_HOST'] . nettoyer_uri()))); |
|
| 284 | + . '&var_mode_affiche=validation') : ('http://validator.w3.org/check?uri=' |
|
| 285 | + . rawurlencode("http://".$_SERVER['HTTP_HOST'].nettoyer_uri()))); |
|
| 287 | 286 | } |
| 288 | 287 | |
| 289 | 288 | /** |
@@ -75,12 +75,12 @@ discard block |
||
| 75 | 75 | * @return mixed|string |
| 76 | 76 | */ |
| 77 | 77 | function objet_modifier($objet, $id, $set = null) { |
| 78 | - if (($t=objet_type($objet)) !== $objet) { |
|
| 79 | - spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", "editer" . _LOG_INFO_IMPORTANTE); |
|
| 78 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 79 | + spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", "editer"._LOG_INFO_IMPORTANTE); |
|
| 80 | 80 | $objet = $t; |
| 81 | 81 | } |
| 82 | - if (include_spip('action/editer_' . $objet) |
|
| 83 | - and function_exists($modifier = $objet . "_modifier") |
|
| 82 | + if (include_spip('action/editer_'.$objet) |
|
| 83 | + and function_exists($modifier = $objet."_modifier") |
|
| 84 | 84 | ) { |
| 85 | 85 | return $modifier($id, $set); |
| 86 | 86 | } |
@@ -163,12 +163,12 @@ discard block |
||
| 163 | 163 | * @return bool|int |
| 164 | 164 | */ |
| 165 | 165 | function objet_inserer($objet, $id_parent = null, $set = null) { |
| 166 | - if (($t=objet_type($objet)) !== $objet) { |
|
| 167 | - spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", "editer" . _LOG_INFO_IMPORTANTE); |
|
| 166 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 167 | + spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", "editer"._LOG_INFO_IMPORTANTE); |
|
| 168 | 168 | $objet = $t; |
| 169 | 169 | } |
| 170 | - if (include_spip('action/editer_' . $objet) |
|
| 171 | - and function_exists($inserer = $objet . "_inserer") |
|
| 170 | + if (include_spip('action/editer_'.$objet) |
|
| 171 | + and function_exists($inserer = $objet."_inserer") |
|
| 172 | 172 | ) { |
| 173 | 173 | return $inserer($id_parent, $set); |
| 174 | 174 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $row = sql_fetsel("id_rubrique, id_secteur, lang", "spip_rubriques", "id_parent=0", '', '0+titre,titre', "1"); |
| 190 | 190 | $id_rubrique = $row['id_rubrique']; |
| 191 | 191 | } else { |
| 192 | - $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=" . intval($id_rubrique)); |
|
| 192 | + $row = sql_fetsel("lang, id_secteur", "spip_rubriques", "id_rubrique=".intval($id_rubrique)); |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | $champs['id_rubrique'] = $id_rubrique; |
@@ -297,12 +297,12 @@ discard block |
||
| 297 | 297 | * @return string |
| 298 | 298 | */ |
| 299 | 299 | function objet_instituer($objet, $id, $c, $calcul_rub = true) { |
| 300 | - if (($t=objet_type($objet)) !== $objet) { |
|
| 301 | - spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", "editer" . _LOG_INFO_IMPORTANTE); |
|
| 300 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 301 | + spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", "editer"._LOG_INFO_IMPORTANTE); |
|
| 302 | 302 | $objet = $t; |
| 303 | 303 | } |
| 304 | - if (include_spip('action/editer_' . $objet) |
|
| 305 | - and function_exists($instituer = $objet . "_instituer") |
|
| 304 | + if (include_spip('action/editer_'.$objet) |
|
| 305 | + and function_exists($instituer = $objet."_instituer") |
|
| 306 | 306 | ) { |
| 307 | 307 | return $instituer($id, $c, $calcul_rub); |
| 308 | 308 | } |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
| 332 | 332 | $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : "0 as id_rubrique"); |
| 333 | 333 | |
| 334 | - $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . intval($id)); |
|
| 334 | + $row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.intval($id)); |
|
| 335 | 335 | |
| 336 | 336 | $id_rubrique = $row['id_rubrique']; |
| 337 | 337 | $statut_ancien = $statut = $row['statut']; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | if ($s != 'publie' and autoriser('modifier', $objet, $id)) { |
| 354 | 354 | $statut = $champs['statut'] = $s; |
| 355 | 355 | } else { |
| 356 | - spip_log("editer_objet $id refus " . join(' ', $c)); |
|
| 356 | + spip_log("editer_objet $id refus ".join(' ', $c)); |
|
| 357 | 357 | } |
| 358 | 358 | } |
| 359 | 359 | |
@@ -381,7 +381,7 @@ discard block |
||
| 381 | 381 | and isset($c['id_parent']) |
| 382 | 382 | and $id_parent = $c['id_parent'] |
| 383 | 383 | and $id_parent != $id_rubrique |
| 384 | - and (sql_fetsel('1', "spip_rubriques", "id_rubrique=" . intval($id_parent))) |
|
| 384 | + and (sql_fetsel('1', "spip_rubriques", "id_rubrique=".intval($id_parent))) |
|
| 385 | 385 | ) { |
| 386 | 386 | $champs['id_rubrique'] = $id_parent; |
| 387 | 387 | |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | // changer aussi son secteur et sa langue (si heritee) |
| 477 | 477 | if (isset($champs['id_rubrique'])) { |
| 478 | 478 | |
| 479 | - $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=" . sql_quote($champs['id_rubrique'])); |
|
| 479 | + $row_rub = sql_fetsel("id_secteur, lang", "spip_rubriques", "id_rubrique=".sql_quote($champs['id_rubrique'])); |
|
| 480 | 480 | $langue = $row_rub['lang']; |
| 481 | 481 | |
| 482 | 482 | if (isset($desc['field']['id_secteur'])) { |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | |
| 486 | 486 | if (isset($desc['field']['lang']) and isset($desc['field']['langue_choisie'])) { |
| 487 | 487 | if (sql_fetsel('1', $table_sql, |
| 488 | - id_table_objet($objet) . "=" . intval($id) . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue))) { |
|
| 488 | + id_table_objet($objet)."=".intval($id)." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue))) { |
|
| 489 | 489 | $champs['lang'] = $langue; |
| 490 | 490 | } |
| 491 | 491 | } |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | if (!$champs) { |
| 495 | 495 | return; |
| 496 | 496 | } |
| 497 | - sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . intval($id)); |
|
| 497 | + sql_updateq($table_sql, $champs, id_table_objet($objet).'='.intval($id)); |
|
| 498 | 498 | |
| 499 | 499 | // Changer le statut des rubriques concernees |
| 500 | 500 | if ($cond) { |
@@ -531,8 +531,8 @@ discard block |
||
| 531 | 531 | * string|int : valeur du champ demande pour l'objet demande |
| 532 | 532 | */ |
| 533 | 533 | function objet_lire($objet, $valeur_id, $options = array()) { |
| 534 | - if (($t=objet_type($objet)) !== $objet) { |
|
| 535 | - spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", "editer" . _LOG_INFO_IMPORTANTE); |
|
| 534 | + if (($t = objet_type($objet)) !== $objet) { |
|
| 535 | + spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", "editer"._LOG_INFO_IMPORTANTE); |
|
| 536 | 536 | $objet = $t; |
| 537 | 537 | } |
| 538 | 538 | |
@@ -552,7 +552,7 @@ discard block |
||
| 552 | 552 | or (isset($options['force']) and $options['force'])) { |
| 553 | 553 | // Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet. |
| 554 | 554 | if ( |
| 555 | - include_spip('action/editer_' . $objet) |
|
| 555 | + include_spip('action/editer_'.$objet) |
|
| 556 | 556 | and function_exists($lire = "${objet}_lire_champs") |
| 557 | 557 | ) { |
| 558 | 558 | $valeurs = $lire($objet, $valeur_id, $champ_id); |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | |
| 563 | 563 | // La condition est appliquée sur le champ désigné par l'utilisateur. |
| 564 | 564 | $where = array( |
| 565 | - "${champ_id}=" . sql_quote($valeur_id) |
|
| 565 | + "${champ_id}=".sql_quote($valeur_id) |
|
| 566 | 566 | ); |
| 567 | 567 | |
| 568 | 568 | // Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide. |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | */ |
| 364 | 364 | function balise_DOSSIER_SQUELETTE_dist($p) { |
| 365 | 365 | $code = substr(addslashes(dirname($p->descr['sourcefile'])), strlen(_DIR_RACINE)); |
| 366 | - $p->code = "_DIR_RACINE . '$code'" . |
|
| 366 | + $p->code = "_DIR_RACINE . '$code'". |
|
| 367 | 367 | $p->interdire_scripts = false; |
| 368 | 368 | |
| 369 | 369 | return $p; |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | */ |
| 383 | 383 | function balise_SQUELETTE_dist($p) { |
| 384 | 384 | $code = addslashes($p->descr['sourcefile']); |
| 385 | - $p->code = "'$code'" . |
|
| 385 | + $p->code = "'$code'". |
|
| 386 | 386 | $p->interdire_scripts = false; |
| 387 | 387 | |
| 388 | 388 | return $p; |
@@ -434,9 +434,9 @@ discard block |
||
| 434 | 434 | **/ |
| 435 | 435 | function balise_NOM_SITE_dist($p) { |
| 436 | 436 | if (!$p->etoile) { |
| 437 | - $p->code = "supprimer_numero(calculer_url(" . |
|
| 438 | - champ_sql('url_site', $p) . "," . |
|
| 439 | - champ_sql('nom_site', $p) . |
|
| 437 | + $p->code = "supprimer_numero(calculer_url(". |
|
| 438 | + champ_sql('url_site', $p).",". |
|
| 439 | + champ_sql('nom_site', $p). |
|
| 440 | 440 | ", 'titre', \$connect, false))"; |
| 441 | 441 | } else { |
| 442 | 442 | $p->code = champ_sql('nom_site', $p); |
@@ -587,8 +587,8 @@ discard block |
||
| 587 | 587 | * Pile complétée par le code à générer |
| 588 | 588 | **/ |
| 589 | 589 | function balise_POPULARITE_ABSOLUE_dist($p) { |
| 590 | - $p->code = 'ceil(' . |
|
| 591 | - champ_sql('popularite', $p) . |
|
| 590 | + $p->code = 'ceil('. |
|
| 591 | + champ_sql('popularite', $p). |
|
| 592 | 592 | ')'; |
| 593 | 593 | $p->interdire_scripts = false; |
| 594 | 594 | |
@@ -666,9 +666,9 @@ discard block |
||
| 666 | 666 | **/ |
| 667 | 667 | function balise_VALEUR_dist($p) { |
| 668 | 668 | $b = $p->nom_boucle ? $p->nom_boucle : $p->id_boucle; |
| 669 | - $p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b);; |
|
| 669 | + $p->code = index_pile($p->id_boucle, 'valeur', $p->boucles, $b); ; |
|
| 670 | 670 | if (($v = interprete_argument_balise(1, $p)) !== null) { |
| 671 | - $p->code = 'table_valeur(' . $p->code . ', ' . $v . ')'; |
|
| 671 | + $p->code = 'table_valeur('.$p->code.', '.$v.')'; |
|
| 672 | 672 | } |
| 673 | 673 | $p->interdire_scripts = true; |
| 674 | 674 | |
@@ -824,8 +824,8 @@ discard block |
||
| 824 | 824 | $_suite = 'null'; |
| 825 | 825 | $_longueur = $longueur_defaut; |
| 826 | 826 | if (($v = interprete_argument_balise(1, $p)) !== null) { |
| 827 | - $_longueur = 'is_numeric(' . $v . ')?intval(' . $v . '):' . $longueur_defaut; |
|
| 828 | - $_suite = '!is_numeric(' . $v . ')?' . $v . ':null'; |
|
| 827 | + $_longueur = 'is_numeric('.$v.')?intval('.$v.'):'.$longueur_defaut; |
|
| 828 | + $_suite = '!is_numeric('.$v.')?'.$v.':null'; |
|
| 829 | 829 | } |
| 830 | 830 | if (($v2 = interprete_argument_balise(2, $p)) !== null) { |
| 831 | 831 | $_suite = $v2; |
@@ -913,10 +913,10 @@ discard block |
||
| 913 | 913 | $c = memoriser_contexte_compil($p); |
| 914 | 914 | |
| 915 | 915 | $p->code = sprintf(CODE_RECUPERER_FOND, "'modeles/lesauteurs'", |
| 916 | - "array('objet'=>'" . $objet . |
|
| 917 | - "','id_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 918 | - ",'$id_table_objet' => " . champ_sql($id_table_objet, $p) . |
|
| 919 | - ($objet == 'article' ? "" : ",'id_article' => " . champ_sql('id_article', $p)) . |
|
| 916 | + "array('objet'=>'".$objet. |
|
| 917 | + "','id_objet' => ".champ_sql($id_table_objet, $p). |
|
| 918 | + ",'$id_table_objet' => ".champ_sql($id_table_objet, $p). |
|
| 919 | + ($objet == 'article' ? "" : ",'id_article' => ".champ_sql('id_article', $p)). |
|
| 920 | 920 | ")", |
| 921 | 921 | "'trim'=>true, 'compil'=>array($c)", |
| 922 | 922 | _q($connect)); |
@@ -984,7 +984,7 @@ discard block |
||
| 984 | 984 | $m = trim($m); |
| 985 | 985 | if ($m != "''") { |
| 986 | 986 | if (!preg_match(",\W,", $m)) { |
| 987 | - $m = $boucle->id_table . ".$m"; |
|
| 987 | + $m = $boucle->id_table.".$m"; |
|
| 988 | 988 | } |
| 989 | 989 | |
| 990 | 990 | $m .= " AS titre_rang"; |
@@ -1008,8 +1008,8 @@ discard block |
||
| 1008 | 1008 | $_primary = champ_sql($id_table_objet, $p, '', false); |
| 1009 | 1009 | $_env = '$Pile[0]'; |
| 1010 | 1010 | |
| 1011 | - if (!$_titre) {$_titre = "''";} |
|
| 1012 | - if (!$_primary) {$_primary = "''";} |
|
| 1011 | + if (!$_titre) {$_titre = "''"; } |
|
| 1012 | + if (!$_primary) {$_primary = "''"; } |
|
| 1013 | 1013 | $_rang = "calculer_rang_smart($_titre, '$objet', $_primary, $_env)"; |
| 1014 | 1014 | |
| 1015 | 1015 | } |
@@ -1142,7 +1142,7 @@ discard block |
||
| 1142 | 1142 | $f_pagination = chercher_filtre('pagination'); |
| 1143 | 1143 | $type = $p->boucles[$b]->modificateur['debut_nom']; |
| 1144 | 1144 | $modif = ($type[0] !== "'") ? "'debut'.$type" |
| 1145 | - : ("'debut" . substr($type, 1)); |
|
| 1145 | + : ("'debut".substr($type, 1)); |
|
| 1146 | 1146 | |
| 1147 | 1147 | $p->code = sprintf(CODE_PAGINATION, $f_pagination, $b, $type, $modif, $pas, $liste, |
| 1148 | 1148 | ((isset($__modele) and $__modele) ? $__modele : "''"), _q($connect), $code_contexte); |
@@ -1276,7 +1276,7 @@ discard block |
||
| 1276 | 1276 | $msg = array('zbug_balise_sans_argument', array('balise' => ' CHEMIN')); |
| 1277 | 1277 | erreur_squelette($msg, $p); |
| 1278 | 1278 | } else { |
| 1279 | - $p->code = 'find_in_path(' . $arg . ')'; |
|
| 1279 | + $p->code = 'find_in_path('.$arg.')'; |
|
| 1280 | 1280 | } |
| 1281 | 1281 | |
| 1282 | 1282 | $p->interdire_scripts = false; |
@@ -1311,7 +1311,7 @@ discard block |
||
| 1311 | 1311 | $msg = array('zbug_balise_sans_argument', array('balise' => ' CHEMIN_IMAGE')); |
| 1312 | 1312 | erreur_squelette($msg, $p); |
| 1313 | 1313 | } else { |
| 1314 | - $p->code = 'chemin_image(' . $arg . ')'; |
|
| 1314 | + $p->code = 'chemin_image('.$arg.')'; |
|
| 1315 | 1315 | } |
| 1316 | 1316 | |
| 1317 | 1317 | $p->interdire_scripts = false; |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | // cas de #ENV sans argument : on retourne le serialize() du tableau |
| 1366 | 1366 | // une belle fonction [(#ENV|affiche_env)] serait pratique |
| 1367 | 1367 | if ($src) { |
| 1368 | - $p->code = '(is_array($a = (' . $src . ')) ? serialize($a) : "")'; |
|
| 1368 | + $p->code = '(is_array($a = ('.$src.')) ? serialize($a) : "")'; |
|
| 1369 | 1369 | } else { |
| 1370 | 1370 | $p->code = '@serialize($Pile[0])'; |
| 1371 | 1371 | } |
@@ -1418,8 +1418,8 @@ discard block |
||
| 1418 | 1418 | $_sinon = interprete_argument_balise(2, $p); |
| 1419 | 1419 | $_unserialize = sinon(interprete_argument_balise(3, $p), "false"); |
| 1420 | 1420 | |
| 1421 | - $p->code = '(include_spip(\'inc/config\')?lire_config(' . $arg . ',' . |
|
| 1422 | - ($_sinon && $_sinon != "''" ? $_sinon : 'null') . ',' . $_unserialize . "):'')"; |
|
| 1421 | + $p->code = '(include_spip(\'inc/config\')?lire_config('.$arg.','. |
|
| 1422 | + ($_sinon && $_sinon != "''" ? $_sinon : 'null').','.$_unserialize."):'')"; |
|
| 1423 | 1423 | |
| 1424 | 1424 | return $p; |
| 1425 | 1425 | } |
@@ -1512,7 +1512,7 @@ discard block |
||
| 1512 | 1512 | $err_b_s_a = array('zbug_balise_sans_argument', array('balise' => 'SESSION_SET')); |
| 1513 | 1513 | erreur_squelette($err_b_s_a, $p); |
| 1514 | 1514 | } else { |
| 1515 | - $p->code = '(include_spip("inc/session") AND session_set(' . $_nom . ',' . $_val . '))'; |
|
| 1515 | + $p->code = '(include_spip("inc/session") AND session_set('.$_nom.','.$_val.'))'; |
|
| 1516 | 1516 | } |
| 1517 | 1517 | |
| 1518 | 1518 | $p->interdire_scripts = false; |
@@ -1555,7 +1555,7 @@ discard block |
||
| 1555 | 1555 | if (preg_match(",^([[:space:]]*//[^\n]*\n)'([^']+)'$,ms", |
| 1556 | 1556 | $php, $r)) { |
| 1557 | 1557 | $p->code = /* $r[1]. */ |
| 1558 | - '(' . $r[2] . ')'; |
|
| 1558 | + '('.$r[2].')'; |
|
| 1559 | 1559 | } else { |
| 1560 | 1560 | $p->code = "eval('return '.$php.';')"; |
| 1561 | 1561 | } |
@@ -1815,9 +1815,9 @@ discard block |
||
| 1815 | 1815 | |
| 1816 | 1816 | // noter la duree du cache dans un entete proprietaire |
| 1817 | 1817 | |
| 1818 | - $code = "'<'.'" . '?php header("X-Spip-Cache: ' |
|
| 1818 | + $code = "'<'.'".'?php header("X-Spip-Cache: ' |
|
| 1819 | 1819 | . $duree |
| 1820 | - . '"); ?' . "'.'>'"; |
|
| 1820 | + . '"); ?'."'.'>'"; |
|
| 1821 | 1821 | |
| 1822 | 1822 | // Remplir le header Cache-Control |
| 1823 | 1823 | // cas #CACHE{0} |
@@ -1837,9 +1837,9 @@ discard block |
||
| 1837 | 1837 | if ($pa == 'cache-client' |
| 1838 | 1838 | and $duree > 0 |
| 1839 | 1839 | ) { |
| 1840 | - $code .= ".'<'.'" . '?php header("Cache-Control: max-age=' |
|
| 1840 | + $code .= ".'<'.'".'?php header("Cache-Control: max-age=' |
|
| 1841 | 1841 | . $duree |
| 1842 | - . '"); ?' . "'.'>'"; |
|
| 1842 | + . '"); ?'."'.'>'"; |
|
| 1843 | 1843 | // il semble logique, si on cache-client, de ne pas invalider |
| 1844 | 1844 | $pa = 'statique'; |
| 1845 | 1845 | } |
@@ -1847,7 +1847,7 @@ discard block |
||
| 1847 | 1847 | if ($pa == 'statique' |
| 1848 | 1848 | and $duree > 0 |
| 1849 | 1849 | ) { |
| 1850 | - $code .= ".'<'.'" . '?php header("X-Spip-Statique: oui"); ?' . "'.'>'"; |
|
| 1850 | + $code .= ".'<'.'".'?php header("X-Spip-Statique: oui"); ?'."'.'>'"; |
|
| 1851 | 1851 | } |
| 1852 | 1852 | } |
| 1853 | 1853 | } else { |
@@ -2012,9 +2012,9 @@ discard block |
||
| 2012 | 2012 | if ($p->etoile) { |
| 2013 | 2013 | $_options[] = "'etoile'=>true"; |
| 2014 | 2014 | } |
| 2015 | - $_options[] = "'compil'=>array(" . memoriser_contexte_compil($p) . ")"; |
|
| 2015 | + $_options[] = "'compil'=>array(".memoriser_contexte_compil($p).")"; |
|
| 2016 | 2016 | |
| 2017 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2017 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2018 | 2018 | if ($flag_env) { |
| 2019 | 2019 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2020 | 2020 | } |
@@ -2025,7 +2025,7 @@ discard block |
||
| 2025 | 2025 | $msg = array('zbug_balise_sans_argument', array('balise' => ' INCLURE')); |
| 2026 | 2026 | erreur_squelette($msg, $p); |
| 2027 | 2027 | } else { |
| 2028 | - $p->code = 'charge_scripts(' . $_contexte[1] . ',false)'; |
|
| 2028 | + $p->code = 'charge_scripts('.$_contexte[1].',false)'; |
|
| 2029 | 2029 | } |
| 2030 | 2030 | |
| 2031 | 2031 | $p->interdire_scripts = false; // la securite est assuree par recuperer_fond |
@@ -2073,7 +2073,7 @@ discard block |
||
| 2073 | 2073 | unset($_contexte[1]); |
| 2074 | 2074 | |
| 2075 | 2075 | if (preg_match("/^\s*'[^']*'/s", $nom)) { |
| 2076 | - $nom = "'modeles/" . substr($nom, 1); |
|
| 2076 | + $nom = "'modeles/".substr($nom, 1); |
|
| 2077 | 2077 | } else { |
| 2078 | 2078 | $nom = "'modeles/' . $nom"; |
| 2079 | 2079 | } |
@@ -2090,8 +2090,8 @@ discard block |
||
| 2090 | 2090 | $primary = $p->boucles[$p->id_boucle]->primary; |
| 2091 | 2091 | if (!strpos($primary, ',')) { |
| 2092 | 2092 | $id = champ_sql($primary, $p); |
| 2093 | - $_contexte[] = "'$primary'=>" . $id; |
|
| 2094 | - $_contexte[] = "'id'=>" . $id; |
|
| 2093 | + $_contexte[] = "'$primary'=>".$id; |
|
| 2094 | + $_contexte[] = "'id'=>".$id; |
|
| 2095 | 2095 | } |
| 2096 | 2096 | } |
| 2097 | 2097 | $_contexte[] = "'recurs'=>(++\$recurs)"; |
@@ -2103,11 +2103,11 @@ discard block |
||
| 2103 | 2103 | $_options = memoriser_contexte_compil($p); |
| 2104 | 2104 | $_options = "'compil'=>array($_options), 'trim'=>true"; |
| 2105 | 2105 | if (isset($_contexte['ajax'])) { |
| 2106 | - $_options .= ", " . preg_replace(",=>(.*)$,ims", '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2106 | + $_options .= ", ".preg_replace(",=>(.*)$,ims", '=> ($v=(\\1))?$v:true', $_contexte['ajax']); |
|
| 2107 | 2107 | unset($_contexte['ajax']); |
| 2108 | 2108 | } |
| 2109 | 2109 | |
| 2110 | - $_l = 'array(' . join(",\n\t", $_contexte) . ')'; |
|
| 2110 | + $_l = 'array('.join(",\n\t", $_contexte).')'; |
|
| 2111 | 2111 | if ($flag_env) { |
| 2112 | 2112 | $_l = "array_merge(\$Pile[0],$_l)"; |
| 2113 | 2113 | } |
@@ -2217,12 +2217,12 @@ discard block |
||
| 2217 | 2217 | function balise_DOUBLONS_dist($p) { |
| 2218 | 2218 | if ($type = interprete_argument_balise(1, $p)) { |
| 2219 | 2219 | if ($famille = interprete_argument_balise(2, $p)) { |
| 2220 | - $type .= '.' . $famille; |
|
| 2220 | + $type .= '.'.$famille; |
|
| 2221 | 2221 | } |
| 2222 | - $p->code = '(isset($doublons[' . $type . ']) ? $doublons[' . $type . '] : "")'; |
|
| 2222 | + $p->code = '(isset($doublons['.$type.']) ? $doublons['.$type.'] : "")'; |
|
| 2223 | 2223 | if (!$p->etoile) { |
| 2224 | 2224 | $p->code = 'array_filter(array_map("intval",explode(",",' |
| 2225 | - . $p->code . ')))'; |
|
| 2225 | + . $p->code.')))'; |
|
| 2226 | 2226 | } |
| 2227 | 2227 | } else { |
| 2228 | 2228 | $p->code = '$doublons'; |
@@ -2351,7 +2351,7 @@ discard block |
||
| 2351 | 2351 | $_code[] = "$_key => $_val"; |
| 2352 | 2352 | } |
| 2353 | 2353 | } while ($_key && $_val); |
| 2354 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2354 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2355 | 2355 | $p->interdire_scripts = false; |
| 2356 | 2356 | |
| 2357 | 2357 | return $p; |
@@ -2378,7 +2378,7 @@ discard block |
||
| 2378 | 2378 | while ($_val = interprete_argument_balise($n++, $p)) { |
| 2379 | 2379 | $_code[] = $_val; |
| 2380 | 2380 | } |
| 2381 | - $p->code = 'array(' . join(', ', $_code) . ')'; |
|
| 2381 | + $p->code = 'array('.join(', ', $_code).')'; |
|
| 2382 | 2382 | $p->interdire_scripts = false; |
| 2383 | 2383 | |
| 2384 | 2384 | return $p; |
@@ -2423,8 +2423,8 @@ discard block |
||
| 2423 | 2423 | $_code[] = $_v; |
| 2424 | 2424 | } |
| 2425 | 2425 | |
| 2426 | - $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser(' . join(', ', |
|
| 2427 | - $_code) . ')?" ":"")'; |
|
| 2426 | + $p->code = '((function_exists("autoriser")||include_spip("inc/autoriser"))&&autoriser('.join(', ', |
|
| 2427 | + $_code).')?" ":"")'; |
|
| 2428 | 2428 | $p->interdire_scripts = false; |
| 2429 | 2429 | |
| 2430 | 2430 | return $p; |
@@ -2457,7 +2457,7 @@ discard block |
||
| 2457 | 2457 | $type_info = isset($type_info) ? str_replace('\'', '"', $type_info) : '"est_actif"'; |
| 2458 | 2458 | |
| 2459 | 2459 | $f = chercher_filtre('info_plugin'); |
| 2460 | - $p->code = $f . '(' . $plugin . ', ' . $type_info . ')'; |
|
| 2460 | + $p->code = $f.'('.$plugin.', '.$type_info.')'; |
|
| 2461 | 2461 | |
| 2462 | 2462 | return $p; |
| 2463 | 2463 | } |
@@ -2481,7 +2481,7 @@ discard block |
||
| 2481 | 2481 | **/ |
| 2482 | 2482 | function balise_AIDER_dist($p) { |
| 2483 | 2483 | $_motif = interprete_argument_balise(1, $p); |
| 2484 | - $s = "'" . addslashes($p->descr['sourcefile']) . "'"; |
|
| 2484 | + $s = "'".addslashes($p->descr['sourcefile'])."'"; |
|
| 2485 | 2485 | $p->code = "((\$aider=charger_fonction('aide','inc',true))?\$aider($_motif,$s, \$Pile[0]):'')"; |
| 2486 | 2486 | |
| 2487 | 2487 | return $p; |
@@ -2698,12 +2698,12 @@ discard block |
||
| 2698 | 2698 | $_issens = "in_array($_champ,array('>','<'))"; |
| 2699 | 2699 | $_sens = "(strpos('< >',$_champ)-1)"; |
| 2700 | 2700 | |
| 2701 | - $_variable = "((\$s=$_issens)?'sens':'tri')." . $boucle->modificateur['tri_nom']; |
|
| 2701 | + $_variable = "((\$s=$_issens)?'sens':'tri').".$boucle->modificateur['tri_nom']; |
|
| 2702 | 2702 | $_url = "parametre_url(self(),$_variable,\$s?$_sens:$_champ)"; |
| 2703 | - $_url = "parametre_url($_url,'var_memotri',strncmp(" . $boucle->modificateur['tri_nom'] . ",'session',7)==0?$_variable:'')"; |
|
| 2704 | - $_on = "\$s?(" . $boucle->modificateur['tri_sens'] . "==$_sens" . '):(' . $boucle->modificateur['tri_champ'] . "==$_champ)"; |
|
| 2703 | + $_url = "parametre_url($_url,'var_memotri',strncmp(".$boucle->modificateur['tri_nom'].",'session',7)==0?$_variable:'')"; |
|
| 2704 | + $_on = "\$s?(".$boucle->modificateur['tri_sens']."==$_sens".'):('.$boucle->modificateur['tri_champ']."==$_champ)"; |
|
| 2705 | 2705 | |
| 2706 | - $p->code = "lien_ou_expose($_url,$_libelle,$_on" . ($_class ? ",$_class" : "") . ")"; |
|
| 2706 | + $p->code = "lien_ou_expose($_url,$_libelle,$_on".($_class ? ",$_class" : "").")"; |
|
| 2707 | 2707 | //$p->code = "''"; |
| 2708 | 2708 | $p->interdire_scripts = false; |
| 2709 | 2709 | |
@@ -2777,7 +2777,7 @@ discard block |
||
| 2777 | 2777 | $connect = $p->boucles[$p->id_boucle]->sql_serveur; |
| 2778 | 2778 | } |
| 2779 | 2779 | |
| 2780 | - $p->code = "(objet_test_si_publie(" . $_type . ",intval(" . $_id . ")," . _q($connect) . ")?' ':'')"; |
|
| 2780 | + $p->code = "(objet_test_si_publie(".$_type.",intval(".$_id."),"._q($connect).")?' ':'')"; |
|
| 2781 | 2781 | $p->interdire_scripts = false; |
| 2782 | 2782 | |
| 2783 | 2783 | return $p; |