@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | if ($res) { |
| 55 | 55 | return $res; |
| 56 | 56 | } |
| 57 | - spip_log("meta: $script " . print_r($_POST, true)); |
|
| 57 | + spip_log("meta: $script ".print_r($_POST, true)); |
|
| 58 | 58 | ecrire_meta($script, serialize($_POST)); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | // on pourrait statuer automatiquement les webmestres a l'init d'une action auth par ftp ... ? |
| 124 | 124 | |
| 125 | - spip_log("admin $pref" . ($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 125 | + spip_log("admin $pref".($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 126 | 126 | |
| 127 | 127 | return ''; |
| 128 | 128 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if (autoriser('configurer')) { |
| 141 | 141 | return _DIR_TMP; |
| 142 | 142 | } else { |
| 143 | - return _DIR_TRANSFERT . $GLOBALS['visiteur_session']['login'] . '/'; |
|
| 143 | + return _DIR_TRANSFERT.$GLOBALS['visiteur_session']['login'].'/'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | * Nom du fichier |
| 159 | 159 | **/ |
| 160 | 160 | function fichier_admin($action, $pref = 'admin_') { |
| 161 | - return $pref . |
|
| 162 | - substr(md5($action . (time() & ~2047) . $GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 161 | + return $pref. |
|
| 162 | + substr(md5($action.(time() & ~2047).$GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | } else { |
| 193 | 193 | $dir = dir_admin(); |
| 194 | 194 | $signal = fichier_admin($script); |
| 195 | - if (@file_exists($dir . $signal)) { |
|
| 195 | + if (@file_exists($dir.$signal)) { |
|
| 196 | 196 | spip_log("Action admin: $action"); |
| 197 | 197 | |
| 198 | 198 | return ''; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | |
| 210 | 210 | return ''; |
| 211 | 211 | } |
| 212 | - $corps .= '<input type="hidden" name="validation_admin" value="' . $signal . '" />'; |
|
| 212 | + $corps .= '<input type="hidden" name="validation_admin" value="'.$signal.'" />'; |
|
| 213 | 213 | $suivant = _T('bouton_valider'); |
| 214 | 214 | $js = ''; |
| 215 | 215 | } else { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | . "</legend>\n<label for='fichier'>" |
| 225 | 225 | . _T('info_creer_repertoire') |
| 226 | 226 | . "</label>\n" |
| 227 | - . "<span id='signal' class='formo'>" . $signal . '</span>' |
|
| 227 | + . "<span id='signal' class='formo'>".$signal.'</span>' |
|
| 228 | 228 | . "<input type='hidden' id='fichier' name='fichier' value='" |
| 229 | 229 | . $signal |
| 230 | 230 | . "' />" |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | * Nom de l'action (en base) qui a été exécutée |
| 262 | 262 | **/ |
| 263 | 263 | function fin_admin($action) { |
| 264 | - $signal = dir_admin() . fichier_admin($action); |
|
| 264 | + $signal = dir_admin().fichier_admin($action); |
|
| 265 | 265 | spip_unlink($signal); |
| 266 | 266 | if ($action != 'delete_all') { |
| 267 | 267 | effacer_meta($action); |
@@ -289,8 +289,8 @@ discard block |
||
| 289 | 289 | include_spip('inc/filtres'); |
| 290 | 290 | foreach (array_merge($_POST, $_GET) as $n => $c) { |
| 291 | 291 | if (!in_array($n, array('fichier', 'exec', 'validation_admin')) and !is_array($c)) { |
| 292 | - $suite .= "\n<input type='hidden' name='" . spip_htmlspecialchars($n) . "' value='" . |
|
| 293 | - entites_html($c) . |
|
| 292 | + $suite .= "\n<input type='hidden' name='".spip_htmlspecialchars($n)."' value='". |
|
| 293 | + entites_html($c). |
|
| 294 | 294 | "' />"; |
| 295 | 295 | } |
| 296 | 296 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $res['message_ok'] = _T('info_modification_enregistree'); |
| 101 | 101 | if ($retour) { |
| 102 | 102 | if (strncmp($retour, 'javascript:', 11) == 0) { |
| 103 | - $res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/' . substr($retour, 11) . '/*]]>*/</script>'; |
|
| 103 | + $res['message_ok'] .= '<script type="text/javascript">/*<![CDATA[*/'.substr($retour, 11).'/*]]>*/</script>'; |
|
| 104 | 104 | $res['editable'] = true; |
| 105 | 105 | } else { |
| 106 | 106 | $res['redirect'] = parametre_url($retour, $id_table_objet, $id); |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | if (!isset($erreurs[$champ])) { |
| 141 | 141 | $erreurs[$champ] = ''; |
| 142 | 142 | } |
| 143 | - $erreurs[$champ] .= _T('alerte_modif_info_concourante') . "<br /><textarea readonly='readonly' class='forml'>" . entites_html($conflit['base']) . '</textarea>'; |
|
| 143 | + $erreurs[$champ] .= _T('alerte_modif_info_concourante')."<br /><textarea readonly='readonly' class='forml'>".entites_html($conflit['base']).'</textarea>'; |
|
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | 146 | } |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | // on accepte pas une fonction de config inconnue si elle vient d'un modele |
| 216 | 216 | if ($config_fonc |
| 217 | 217 | and !in_array($config_fonc, ['articles_edit_config', 'rubriques_edit_config', 'auteurs_edit_config']) |
| 218 | - and $config_fonc !== $table_objet . '_edit_config') { |
|
| 218 | + and $config_fonc !== $table_objet.'_edit_config') { |
|
| 219 | 219 | if ($args = test_formulaire_inclus_par_modele() |
| 220 | 220 | and in_array($config_fonc, $args)) { |
| 221 | 221 | $config_fonc = ''; |
@@ -227,12 +227,12 @@ discard block |
||
| 227 | 227 | // Appel direct dans un squelette |
| 228 | 228 | if (!$row) { |
| 229 | 229 | if (!$new or $lier_trad) { |
| 230 | - if ($select = charger_fonction('precharger_' . $type, 'inc', true)) { |
|
| 230 | + if ($select = charger_fonction('precharger_'.$type, 'inc', true)) { |
|
| 231 | 231 | $row = $select($id, $id_parent, $lier_trad); |
| 232 | 232 | // si on a une fonction precharger, elle pu faire un reglage de langue |
| 233 | 233 | $lang_default = (!empty($row['lang']) ? $row['lang'] : null); |
| 234 | 234 | } else { |
| 235 | - $row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . intval($id)); |
|
| 235 | + $row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.intval($id)); |
|
| 236 | 236 | } |
| 237 | 237 | if (!$new) { |
| 238 | 238 | $md5 = controles_md5($row); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | if ($config_fonc) { |
| 282 | 282 | $contexte['config'] = $config = $config_fonc($contexte); |
| 283 | 283 | if (!$lang_default) { |
| 284 | - $lang_default = $config['langue'] ?? session_get('lang') ; |
|
| 284 | + $lang_default = $config['langue'] ?? session_get('lang'); |
|
| 285 | 285 | } |
| 286 | 286 | } |
| 287 | 287 | $config = $config + array( |
@@ -305,13 +305,12 @@ discard block |
||
| 305 | 305 | unset($contexte['lang']); |
| 306 | 306 | } |
| 307 | 307 | |
| 308 | - $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" . |
|
| 309 | - (!$lier_trad ? '' : |
|
| 310 | - ("\n<input type='hidden' name='lier_trad' value='" . |
|
| 311 | - $lier_trad . |
|
| 312 | - "' />" . |
|
| 313 | - "\n<input type='hidden' name='changer_lang' value='" . |
|
| 314 | - $lang_default . |
|
| 308 | + $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n". |
|
| 309 | + (!$lier_trad ? '' : ("\n<input type='hidden' name='lier_trad' value='". |
|
| 310 | + $lier_trad. |
|
| 311 | + "' />". |
|
| 312 | + "\n<input type='hidden' name='changer_lang' value='". |
|
| 313 | + $lang_default. |
|
| 315 | 314 | "' />")) |
| 316 | 315 | . $hidden |
| 317 | 316 | . (isset($md5) ? $md5 : ''); |
@@ -325,8 +324,8 @@ discard block |
||
| 325 | 324 | $contexte['_action'] = array("editer_$type", $id); |
| 326 | 325 | |
| 327 | 326 | // et in fine placer l'autorisation |
| 328 | - if (intval($id)){ |
|
| 329 | - if (!autoriser('modifier', $type, intval($id))){ |
|
| 327 | + if (intval($id)) { |
|
| 328 | + if (!autoriser('modifier', $type, intval($id))) { |
|
| 330 | 329 | $valeurs['editable'] = ''; |
| 331 | 330 | } |
| 332 | 331 | } |
@@ -350,14 +349,14 @@ discard block |
||
| 350 | 349 | $aider = charger_fonction('aider', 'inc'); |
| 351 | 350 | if (strlen($texte) > 28 * 1024) { |
| 352 | 351 | $texte = str_replace("\r\n", "\n", $texte); |
| 353 | - $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 352 | + $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 354 | 353 | if ($pos > 0 and $pos < 32 * 1024) { |
| 355 | - $debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n"; |
|
| 354 | + $debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n"; |
|
| 356 | 355 | $suite = substr($texte, $pos + 2); |
| 357 | 356 | } else { |
| 358 | - $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 357 | + $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 359 | 358 | if (!($pos > 0 and $pos < 32 * 1024)) { |
| 360 | - $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 359 | + $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 361 | 360 | $decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere |
| 362 | 361 | } else { |
| 363 | 362 | $decalage = 1; |
@@ -387,13 +386,13 @@ discard block |
||
| 387 | 386 | } |
| 388 | 387 | |
| 389 | 388 | include_spip('inc/barre'); |
| 390 | - $textes_supplement = "<br /><span style='color: red'>" . _T('info_texte_long') . "</span>\n"; |
|
| 389 | + $textes_supplement = "<br /><span style='color: red'>"._T('info_texte_long')."</span>\n"; |
|
| 391 | 390 | $nombre = 0; |
| 392 | 391 | |
| 393 | 392 | while (strlen($texte) > 29 * 1024) { |
| 394 | 393 | $nombre++; |
| 395 | 394 | list($texte1, $texte) = coupe_trop_long($texte); |
| 396 | - $textes_supplement .= '<br />' . |
|
| 395 | + $textes_supplement .= '<br />'. |
|
| 397 | 396 | "<textarea id='texte$nombre' name='texte_plus[$nombre]'$att_text>$texte1</textarea>\n"; |
| 398 | 397 | } |
| 399 | 398 | |
@@ -481,7 +480,7 @@ discard block |
||
| 481 | 480 | $ctr = array(); |
| 482 | 481 | foreach ($data as $key => $val) { |
| 483 | 482 | $m = md5($val); |
| 484 | - $k = $prefixe . $key; |
|
| 483 | + $k = $prefixe.$key; |
|
| 485 | 484 | |
| 486 | 485 | switch ($format) { |
| 487 | 486 | case 'html': |
@@ -494,7 +493,7 @@ discard block |
||
| 494 | 493 | } |
| 495 | 494 | |
| 496 | 495 | if ($format == 'html') { |
| 497 | - return "\n\n<!-- controles md5 -->\n" . join("\n", $ctr) . "\n\n"; |
|
| 496 | + return "\n\n<!-- controles md5 -->\n".join("\n", $ctr)."\n\n"; |
|
| 498 | 497 | } else { |
| 499 | 498 | return $ctr; |
| 500 | 499 | } |
@@ -645,7 +644,7 @@ discard block |
||
| 645 | 644 | // On elimine les donnees non modifiees par le formulaire (mais |
| 646 | 645 | // potentiellement modifiees entre temps par un autre utilisateur) |
| 647 | 646 | foreach ($champs as $key => $val) { |
| 648 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 647 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 649 | 648 | if (is_scalar($val) and $m == md5($val)) { |
| 650 | 649 | unset($champs[$key]); |
| 651 | 650 | } |
@@ -674,7 +673,7 @@ discard block |
||
| 674 | 673 | // de conflit. |
| 675 | 674 | $ctrh = $ctrq = $conflits = array(); |
| 676 | 675 | foreach (array_keys($champs) as $key) { |
| 677 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 676 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 678 | 677 | $ctrh[$key] = $m; |
| 679 | 678 | $ctrq[] = $key; |
| 680 | 679 | } |
@@ -707,9 +706,9 @@ discard block |
||
| 707 | 706 | */ |
| 708 | 707 | function display_conflit_champ($x) { |
| 709 | 708 | if (strstr($x, "\n") or strlen($x) > 80) { |
| 710 | - return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n"; |
|
| 709 | + return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n"; |
|
| 711 | 710 | } else { |
| 712 | - return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n"; |
|
| 711 | + return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n"; |
|
| 713 | 712 | } |
| 714 | 713 | } |
| 715 | 714 | |
@@ -749,11 +748,11 @@ discard block |
||
| 749 | 748 | ) : $champ; |
| 750 | 749 | |
| 751 | 750 | $diffs[] = "<h2>$titre</h2>\n" |
| 752 | - . '<h3>' . _T('info_conflit_edition_differences') . "</h3>\n" |
|
| 753 | - . "<div style='max-height:8em; overflow: auto; width:99%;'>" . $d . "</div>\n" |
|
| 754 | - . '<h4>' . _T('info_conflit_edition_votre_version') . '</h4>' |
|
| 751 | + . '<h3>'._T('info_conflit_edition_differences')."</h3>\n" |
|
| 752 | + . "<div style='max-height:8em; overflow: auto; width:99%;'>".$d."</div>\n" |
|
| 753 | + . '<h4>'._T('info_conflit_edition_votre_version').'</h4>' |
|
| 755 | 754 | . display_conflit_champ($a['post']) |
| 756 | - . '<h4>' . _T('info_conflit_edition_version_enregistree') . '</h4>' |
|
| 755 | + . '<h4>'._T('info_conflit_edition_version_enregistree').'</h4>' |
|
| 757 | 756 | . display_conflit_champ($base); |
| 758 | 757 | } |
| 759 | 758 | |
@@ -761,16 +760,16 @@ discard block |
||
| 761 | 760 | $id = uniqid(rand()); |
| 762 | 761 | $redirect = "<form action='$redirect' method='get' |
| 763 | 762 | id='$id' |
| 764 | - style='float:" . $GLOBALS['spip_lang_right'] . "; margin-top:2em;'>\n" |
|
| 763 | + style='float:".$GLOBALS['spip_lang_right']."; margin-top:2em;'>\n" |
|
| 765 | 764 | . form_hidden($redirect) |
| 766 | - . "<input type='submit' value='" . _T('icone_retour') . "' /> |
|
| 765 | + . "<input type='submit' value='"._T('icone_retour')."' /> |
|
| 767 | 766 | </form>\n"; |
| 768 | 767 | |
| 769 | 768 | // pour les documents, on est probablement en ajax : il faut ajaxer |
| 770 | 769 | if (_AJAX) { |
| 771 | 770 | $redirect .= '<script type="text/javascript">' |
| 772 | - . 'setTimeout(function(){$("#' . $id . '") |
|
| 773 | - .ajaxForm({target:$("#' . $id . '").parent()}); |
|
| 771 | + . 'setTimeout(function(){$("#'.$id.'") |
|
| 772 | + .ajaxForm({target:$("#' . $id.'").parent()}); |
|
| 774 | 773 | }, 200);' |
| 775 | 774 | . "</script>\n"; |
| 776 | 775 | } |
@@ -789,9 +788,9 @@ discard block |
||
| 789 | 788 | .diff-para-deplace .diff-supprime { background: #ffb8b8; border: 1px solid #808080; } |
| 790 | 789 | .diff-para-deplace .diff-deplace { background: #b8b8ff; border: 1px solid #808080; } |
| 791 | 790 | </style>' |
| 792 | - . '<p>' . _T('info_conflit_edition_avis_non_sauvegarde') . '</p>' |
|
| 793 | - . '<p>' . _T('texte_conflit_edition_correction') . '</p>' |
|
| 794 | - . "<div style='text-align:" . $GLOBALS['spip_lang_left'] . ";'>" |
|
| 791 | + . '<p>'._T('info_conflit_edition_avis_non_sauvegarde').'</p>' |
|
| 792 | + . '<p>'._T('texte_conflit_edition_correction').'</p>' |
|
| 793 | + . "<div style='text-align:".$GLOBALS['spip_lang_left'].";'>" |
|
| 795 | 794 | . join("\n", $diffs) |
| 796 | 795 | . "</div>\n" |
| 797 | 796 | |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | $erreurs_etapes = array(); |
| 230 | 230 | $derniere_etape_ok = 0; |
| 231 | 231 | $e = 0; |
| 232 | - while ($e < max($etape, $etape_demandee -1) and $e < $etapes) { |
|
| 232 | + while ($e < max($etape, $etape_demandee - 1) and $e < $etapes) { |
|
| 233 | 233 | $e++; |
| 234 | 234 | $erreurs_etapes[$e] = array(); |
| 235 | 235 | if ($verifier = charger_fonction("verifier_$e", "formulaires/$form/", true)) { |
@@ -267,7 +267,7 @@ discard block |
||
| 267 | 267 | // si la derniere etape OK etait la derniere |
| 268 | 268 | // on renvoie le flux inchange et ca declenche traiter |
| 269 | 269 | if ($derniere_etape_ok == $etapes |
| 270 | - and (!$etape_demandee or $etape_demandee>=$etapes)) { |
|
| 270 | + and (!$etape_demandee or $etape_demandee >= $etapes)) { |
|
| 271 | 271 | return $erreurs; |
| 272 | 272 | } else { |
| 273 | 273 | $etape = $derniere_etape_ok + 1; |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | and ($e = $flux['args']['contexte']['_etape']) > 1 |
| 310 | 310 | and $ext = $flux['args']['ext'] |
| 311 | 311 | and $f = $flux['data'] |
| 312 | - and file_exists($f . "_$e.$ext") |
|
| 312 | + and file_exists($f."_$e.$ext") |
|
| 313 | 313 | ) { |
| 314 | - $flux['data'] = $f . "_$e"; |
|
| 314 | + $flux['data'] = $f."_$e"; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | return $flux; |
@@ -176,14 +176,14 @@ discard block |
||
| 176 | 176 | // sache qu'il peut enlever ce where si il enleve la jointure |
| 177 | 177 | $boucle->where["JOIN-L$n"] = |
| 178 | 178 | $echap ? |
| 179 | - array("'='","'$obj'","sql_quote('$type')") |
|
| 179 | + array("'='", "'$obj'", "sql_quote('$type')") |
|
| 180 | 180 | : |
| 181 | - array("=","$obj",sql_quote($type)); |
|
| 181 | + array("=", "$obj", sql_quote($type)); |
|
| 182 | 182 | $boucle->join["L$n"] = |
| 183 | 183 | $echap ? |
| 184 | 184 | array("'$id_table'", "'$j2'", "'$j1'", "'$obj='.sql_quote('$type')") |
| 185 | 185 | : |
| 186 | - array($id_table, $j2, $j1, "$obj=" . sql_quote($type)); |
|
| 186 | + array($id_table, $j2, $j1, "$obj=".sql_quote($type)); |
|
| 187 | 187 | } else { |
| 188 | 188 | $boucle->join["L$n"] = $echap ? array("'$id_table'", "'$j'") : array($id_table, $j); |
| 189 | 189 | } |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $groups = liste_champs_jointures($nom, $desc, true); |
| 217 | 217 | if (!$pk) { |
| 218 | 218 | foreach ($groups as $id_prim) { |
| 219 | - $id_field = $nom . '.' . $id_prim; |
|
| 219 | + $id_field = $nom.'.'.$id_prim; |
|
| 220 | 220 | if (!in_array($id_field, $boucle->group)) { |
| 221 | 221 | $boucle->group[] = $id_field; |
| 222 | 222 | } |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | } else { |
| 82 | 82 | // Preparer l'appel de la fonction principale du squelette |
| 83 | 83 | |
| 84 | - spip_timer($a = 'calcul page ' . rand(0, 1000)); |
|
| 84 | + spip_timer($a = 'calcul page '.rand(0, 1000)); |
|
| 85 | 85 | |
| 86 | 86 | // On cree un marqueur de notes unique lie a cette composition |
| 87 | 87 | // et on enregistre l'etat courant des globales de notes... |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | try { |
| 114 | 114 | $page = $fonc(array('cache' => $cache), array($contexte)); |
| 115 | 115 | } catch (Throwable $e) { |
| 116 | - $msg = _T('zbug_erreur_execution_page') . " $sourcefile"; |
|
| 117 | - $full_msg = $msg . ' | File ' . $e->getFile() . ' Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 116 | + $msg = _T('zbug_erreur_execution_page')." $sourcefile"; |
|
| 117 | + $full_msg = $msg.' | File '.$e->getFile().' Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 118 | 118 | $full_msg = str_replace(_ROOT_RACINE, '[…]/', $full_msg); |
| 119 | 119 | $corps = "<pre>$msg</pre>"; |
| 120 | 120 | $page = analyse_resultat_skel($fond, array('cache' => $cache), $corps, $sourcefile); |
@@ -145,17 +145,17 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | $profile = spip_timer($a); |
| 147 | 147 | spip_log("calcul ($profile) [$skel] $infos" |
| 148 | - . ' (' . strlen($page['texte']) . ' octets)'); |
|
| 148 | + . ' ('.strlen($page['texte']).' octets)'); |
|
| 149 | 149 | |
| 150 | - if (defined('_CALCUL_PROFILER') AND intval($profile)>_CALCUL_PROFILER){ |
|
| 150 | + if (defined('_CALCUL_PROFILER') AND intval($profile) > _CALCUL_PROFILER) { |
|
| 151 | 151 | spip_log("calcul ($profile) [$skel] $infos" |
| 152 | - .' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'],"profiler"._LOG_AVERTISSEMENT); |
|
| 152 | + .' ('.strlen($page['texte']).' octets) | '.$_SERVER['REQUEST_URI'], "profiler"._LOG_AVERTISSEMENT); |
|
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | if ($debug) { |
| 156 | 156 | // si c'est ce que demande le debusqueur, lui passer la main |
| 157 | 157 | $t = strlen($page['texte']) ? $page['texte'] : " "; |
| 158 | - $GLOBALS['debug_objets']['resultat'][$fonc . 'tout'] = $t; |
|
| 158 | + $GLOBALS['debug_objets']['resultat'][$fonc.'tout'] = $t; |
|
| 159 | 159 | $GLOBALS['debug_objets']['courant'] = $courant; |
| 160 | 160 | $GLOBALS['debug_objets']['profile'][$sourcefile] = $profile; |
| 161 | 161 | if ($GLOBALS['debug_objets']['sourcefile'] |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | if (defined('_VAR_INCLURE') and _VAR_INCLURE) { |
| 186 | 186 | $page['sourcefile'] = $sourcefile; |
| 187 | 187 | $page['texte'] = |
| 188 | - "<div class='inclure_blocs'><h6>" . $page['sourcefile'] . "</h6>" . $page['texte'] . "</div>" |
|
| 188 | + "<div class='inclure_blocs'><h6>".$page['sourcefile']."</h6>".$page['texte']."</div>" |
|
| 189 | 189 | . ($js_inclus ? "" : "<script type='text/javascript'>jQuery(function(){jQuery('.inclure_blocs > h6:first-child').hover(function(){jQuery(this).parent().addClass('hover')},function(){jQuery(this).parent().removeClass('hover')})});</script>"); |
| 190 | 190 | $js_inclus = true; |
| 191 | 191 | } |
@@ -220,21 +220,21 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | if (is_array($val)) { |
| 222 | 222 | if ($profondeur_max > 0) { |
| 223 | - $val = 'array:' . count($val) . '(' . presenter_contexte($val, $profondeur_max - 1, 3) . ')'; |
|
| 223 | + $val = 'array:'.count($val).'('.presenter_contexte($val, $profondeur_max - 1, 3).')'; |
|
| 224 | 224 | } else { |
| 225 | - $val = 'array:' . count($val); |
|
| 225 | + $val = 'array:'.count($val); |
|
| 226 | 226 | } |
| 227 | 227 | } elseif (is_object($val)) { |
| 228 | 228 | $val = get_class($val); |
| 229 | 229 | } elseif (strlen("$val") > 30) { |
| 230 | - $val = substr("$val", 0, 29) . '…'; |
|
| 230 | + $val = substr("$val", 0, 29).'…'; |
|
| 231 | 231 | if (strstr($val, ' ')) { |
| 232 | 232 | $val = "'$val'"; |
| 233 | 233 | } |
| 234 | 234 | } elseif (strstr($val, ' ')) { |
| 235 | 235 | $val = "'$val'"; |
| 236 | 236 | } |
| 237 | - $infos[] = $var . '=' . $val; |
|
| 237 | + $infos[] = $var.'='.$val; |
|
| 238 | 238 | } |
| 239 | 239 | return join(', ', $infos); |
| 240 | 240 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | . "?php include_spip('inc/headers');redirige_par_entete('" |
| 302 | 302 | . texte_script($url) |
| 303 | 303 | . "','',$status);" |
| 304 | - . "?" . ">", |
|
| 304 | + . "?".">", |
|
| 305 | 305 | 'process_ins' => 'php', |
| 306 | 306 | 'status' => $status |
| 307 | 307 | ); |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $GLOBALS['debug_objets']['courant'] = $nom; |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | - $phpfile = sous_repertoire(_DIR_SKELS, '', false, true) . $nom . '.php'; |
|
| 57 | + $phpfile = sous_repertoire(_DIR_SKELS, '', false, true).$nom.'.php'; |
|
| 58 | 58 | |
| 59 | 59 | // si squelette est deja compile et perenne, le charger |
| 60 | 60 | if (!squelette_obsolete($phpfile, $source)) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | #} |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - if (file_exists($lib = $squelette . '_fonctions' . '.php')) { |
|
| 70 | + if (file_exists($lib = $squelette.'_fonctions'.'.php')) { |
|
| 71 | 71 | include_once $lib; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | eval("return true; $f ;"); |
| 96 | 96 | } catch (\ParseError $e) { |
| 97 | 97 | // Code syntaxiquement faux (critere etc mal programme') |
| 98 | - $msg = _T('zbug_erreur_compilation') . ' | Line ' . $e->getLine() . ' : ' . $e->getMessage(); |
|
| 98 | + $msg = _T('zbug_erreur_compilation').' | Line '.$e->getLine().' : '.$e->getMessage(); |
|
| 99 | 99 | erreur_squelette($msg, $boucle); |
| 100 | 100 | // continuer pour trouver d'autres fautes eventuelles |
| 101 | 101 | // mais prevenir que c'est mort |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | if (defined('_VAR_MODE') and _VAR_MODE == 'debug') { |
| 125 | 125 | |
| 126 | 126 | // Tracer ce qui vient d'etre compile |
| 127 | - $GLOBALS['debug_objets']['code'][$nom . 'tout'] = $code; |
|
| 127 | + $GLOBALS['debug_objets']['code'][$nom.'tout'] = $code; |
|
| 128 | 128 | |
| 129 | 129 | // si c'est ce que demande le debusqueur, lui passer la main |
| 130 | 130 | if ($GLOBALS['debug_objets']['sourcefile'] |
@@ -146,13 +146,13 @@ discard block |
||
| 146 | 146 | $code = " |
| 147 | 147 | /* |
| 148 | 148 | * Squelette : $sourcefile |
| 149 | - * Date : " . gmdate("D, d M Y H:i:s", @filemtime($sourcefile)) . " GMT |
|
| 150 | - * Compile : " . gmdate("D, d M Y H:i:s", time()) . " GMT |
|
| 151 | - * " . (!$boucles ? "Pas de boucle" : ("Boucles : " . $noms)) . " |
|
| 149 | + * Date : ".gmdate("D, d M Y H:i:s", @filemtime($sourcefile))." GMT |
|
| 150 | + * Compile : " . gmdate("D, d M Y H:i:s", time())." GMT |
|
| 151 | + * " . (!$boucles ? "Pas de boucle" : ("Boucles : ".$noms))." |
|
| 152 | 152 | */ "; |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | - $code = '<' . "?php\n" . $code . join('', $boucles) . "\n?" . '>'; |
|
| 155 | + $code = '<'."?php\n".$code.join('', $boucles)."\n?".'>'; |
|
| 156 | 156 | if (!defined('_VAR_NOCACHE') or !_VAR_NOCACHE) { |
| 157 | 157 | ecrire_fichier($phpfile, $code); |
| 158 | 158 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $j = join('-', array_map('ucwords', explode('-', strtolower($r[2])))); |
| 213 | 213 | |
| 214 | 214 | if ($j == 'X-Spip-Filtre' and isset($headers[$j])) { |
| 215 | - $headers[$j] .= "|" . $r[3]; |
|
| 215 | + $headers[$j] .= "|".$r[3]; |
|
| 216 | 216 | } else { |
| 217 | 217 | $headers[$j] = $r[3]; |
| 218 | 218 | } |
@@ -220,10 +220,10 @@ discard block |
||
| 220 | 220 | } |
| 221 | 221 | // S'agit-il d'un resultat constant ou contenant du code php |
| 222 | 222 | $process_ins = ( |
| 223 | - strpos($corps, '<' . '?') === false |
|
| 223 | + strpos($corps, '<'.'?') === false |
|
| 224 | 224 | or |
| 225 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 226 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 225 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 226 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 227 | 227 | ) |
| 228 | 228 | ? 'html' |
| 229 | 229 | : 'php'; |
@@ -252,10 +252,10 @@ discard block |
||
| 252 | 252 | |
| 253 | 253 | if ($process_ins == 'html') { |
| 254 | 254 | $skel['process_ins'] = ( |
| 255 | - strpos($corps, '<' . '?') === false |
|
| 255 | + strpos($corps, '<'.'?') === false |
|
| 256 | 256 | or |
| 257 | - (strpos($corps, '<' . '?xml') !== false and |
|
| 258 | - strpos(str_replace('<' . '?xml', '', $corps), '<' . '?') === false) |
|
| 257 | + (strpos($corps, '<'.'?xml') !== false and |
|
| 258 | + strpos(str_replace('<'.'?xml', '', $corps), '<'.'?') === false) |
|
| 259 | 259 | ) |
| 260 | 260 | ? 'html' |
| 261 | 261 | : 'php'; |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | // |
| 274 | 274 | |
| 275 | 275 | /** Code PHP pour inclure une balise dynamique à l'exécution d'une page */ |
| 276 | -define('CODE_INCLURE_BALISE', '<' . '?php |
|
| 276 | +define('CODE_INCLURE_BALISE', '<'.'?php |
|
| 277 | 277 | include_once("%s"); |
| 278 | 278 | if ($lang_select = "%s") $lang_select = lang_select($lang_select); |
| 279 | 279 | inserer_balise_dynamique(balise_%s_dyn(%s), array(%s)); |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | // pas de lien symbolique sous Windows |
| 305 | 305 | and !(stristr(PHP_OS, 'WIN') and strpos($file, ':') !== false) |
| 306 | 306 | ) { |
| 307 | - $file = './" . _DIR_RACINE . "' . $file; |
|
| 307 | + $file = './" . _DIR_RACINE . "'.$file; |
|
| 308 | 308 | } |
| 309 | 309 | |
| 310 | 310 | $lang = $context_compil[4]; |
@@ -346,14 +346,14 @@ discard block |
||
| 346 | 346 | if (is_object($v)) { |
| 347 | 347 | return var_export($v, true); |
| 348 | 348 | } elseif (!is_array($v)) { |
| 349 | - return "'" . texte_script($v) . "'"; |
|
| 349 | + return "'".texte_script($v)."'"; |
|
| 350 | 350 | } else { |
| 351 | 351 | $out = array(); |
| 352 | 352 | foreach ($v as $k => $val) { |
| 353 | - $out [] = argumenter_squelette($k) . '=>' . argumenter_squelette($val); |
|
| 353 | + $out [] = argumenter_squelette($k).'=>'.argumenter_squelette($val); |
|
| 354 | 354 | } |
| 355 | 355 | |
| 356 | - return 'array(' . join(", ", $out) . ')'; |
|
| 356 | + return 'array('.join(", ", $out).')'; |
|
| 357 | 357 | } |
| 358 | 358 | } |
| 359 | 359 | |
@@ -429,7 +429,7 @@ discard block |
||
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | // Y a-t-il une fonction de traitement des arguments ? |
| 432 | - $f = 'balise_' . $nom_balise . '_stat'; |
|
| 432 | + $f = 'balise_'.$nom_balise.'_stat'; |
|
| 433 | 433 | |
| 434 | 434 | $r = !function_exists($f) ? $args : $f($args, $context_compil); |
| 435 | 435 | |
@@ -439,18 +439,18 @@ discard block |
||
| 439 | 439 | |
| 440 | 440 | // verifier que la fonction dyn est la, |
| 441 | 441 | // sinon se replier sur la generique si elle existe |
| 442 | - if (!function_exists('balise_' . $nom_balise . '_dyn')) { |
|
| 442 | + if (!function_exists('balise_'.$nom_balise.'_dyn')) { |
|
| 443 | 443 | if ( |
| 444 | 444 | $balise_generique = chercher_balise_generique($nom) |
| 445 | 445 | and $nom_balise_generique = $balise_generique['nom_generique'] |
| 446 | - and $file = include_spip("balise/" . strtolower($nom_balise_generique)) |
|
| 447 | - and function_exists('balise_' . $nom_balise_generique . '_dyn') |
|
| 446 | + and $file = include_spip("balise/".strtolower($nom_balise_generique)) |
|
| 447 | + and function_exists('balise_'.$nom_balise_generique.'_dyn') |
|
| 448 | 448 | ) { |
| 449 | 449 | // et lui injecter en premier arg le nom de la balise |
| 450 | 450 | array_unshift($r, $nom); |
| 451 | 451 | $nom_balise = $nom_balise_generique; |
| 452 | 452 | if (!_DIR_RESTREINT) { |
| 453 | - $file = _DIR_RESTREINT_ABS . $file; |
|
| 453 | + $file = _DIR_RESTREINT_ABS.$file; |
|
| 454 | 454 | } |
| 455 | 455 | } else { |
| 456 | 456 | $msg = array('zbug_balise_inexistante', array('from' => 'CVT', 'balise' => $nom)); |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | $n = ''; |
| 552 | 552 | foreach (explode(',', $liste) as $val) { |
| 553 | 553 | if ($a = intval($val) and $val === strval($a)) { |
| 554 | - $n .= ',' . $val; |
|
| 554 | + $n .= ','.$val; |
|
| 555 | 555 | } |
| 556 | 556 | } |
| 557 | 557 | if (strlen($n)) { |
@@ -730,14 +730,14 @@ discard block |
||
| 730 | 730 | // on construit le where une fois, puis on ajoute les where complentaires si besoin, et on reconstruit le where en fonction |
| 731 | 731 | $i = 0; |
| 732 | 732 | do { |
| 733 | - $where[$k] = remplace_sous_requete($w, "(" . calculer_select( |
|
| 734 | - array($sous[1] . " AS id"), |
|
| 733 | + $where[$k] = remplace_sous_requete($w, "(".calculer_select( |
|
| 734 | + array($sous[1]." AS id"), |
|
| 735 | 735 | $from, |
| 736 | 736 | $from_type, |
| 737 | 737 | $wheresub, |
| 738 | 738 | $jsub, |
| 739 | 739 | array(), array(), '', |
| 740 | - $having, $table, $id, $serveur, false) . ")"); |
|
| 740 | + $having, $table, $id, $serveur, false).")"); |
|
| 741 | 741 | if (!$i) { |
| 742 | 742 | $i = 1; |
| 743 | 743 | $wherestring = calculer_where_to_string($where[$k]); |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | if ($sous[0] == 'SUBSELECT') { |
| 757 | 757 | // c'est une sous requete explicite sous la forme identique a sql_select : (SUBSELECT,$select,$from,$where,$groupby,$orderby,$limit,$having) |
| 758 | 758 | array_push($where_simples, $sous[3]); // est-ce utile dans ce cas ? |
| 759 | - $where[$k] = remplace_sous_requete($w, "(" . calculer_select( |
|
| 759 | + $where[$k] = remplace_sous_requete($w, "(".calculer_select( |
|
| 760 | 760 | $sous[1], # select |
| 761 | 761 | $sous[2], #from |
| 762 | 762 | array(), #from_type |
@@ -768,7 +768,7 @@ discard block |
||
| 768 | 768 | $sous[6], #limit |
| 769 | 769 | $sous[7] ? $sous[7] : array(), #having |
| 770 | 770 | $table, $id, $serveur, false |
| 771 | - ) . ")"); |
|
| 771 | + ).")"); |
|
| 772 | 772 | } |
| 773 | 773 | array_pop($where_simples); |
| 774 | 774 | } |
@@ -830,15 +830,15 @@ discard block |
||
| 830 | 830 | // sans recours a preg_match |
| 831 | 831 | // un implode(' ',..) est fait dans reinjecte_joint un peu plus bas |
| 832 | 832 | $afrom[$t][$cle] = array( |
| 833 | - "\n" . |
|
| 834 | - (isset($from_type[$cle]) ? $from_type[$cle] : "INNER") . " JOIN", |
|
| 833 | + "\n". |
|
| 834 | + (isset($from_type[$cle]) ? $from_type[$cle] : "INNER")." JOIN", |
|
| 835 | 835 | $from[$cle], |
| 836 | 836 | "AS $cle", |
| 837 | 837 | "ON (", |
| 838 | 838 | "$cle.$c", |
| 839 | 839 | "=", |
| 840 | 840 | "$t.$carr", |
| 841 | - ($and ? "AND " . $and : "") . |
|
| 841 | + ($and ? "AND ".$and : ""). |
|
| 842 | 842 | ")" |
| 843 | 843 | ); |
| 844 | 844 | if (isset($afrom[$cle])) { |
@@ -876,7 +876,7 @@ discard block |
||
| 876 | 876 | $t = key($from); |
| 877 | 877 | $c = current($from); |
| 878 | 878 | reset($from); |
| 879 | - $e = '/\b(' . "$t\\." . join("|" . $t . '\.', $equiv) . ')\b/'; |
|
| 879 | + $e = '/\b('."$t\\.".join("|".$t.'\.', $equiv).')\b/'; |
|
| 880 | 880 | if (!(strpos($t, ' ') or // jointure des le depart cf boucle_doc |
| 881 | 881 | calculer_jointnul($t, $select, $e) or |
| 882 | 882 | calculer_jointnul($t, $join, $e) or |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | unset($afrom[$t][$nt]); |
| 894 | 894 | $afrom[$nt] = $afrom[$t]; |
| 895 | 895 | unset($afrom[$t]); |
| 896 | - $e = '/\b' . preg_quote($nfrom[6]) . '\b/'; |
|
| 896 | + $e = '/\b'.preg_quote($nfrom[6]).'\b/'; |
|
| 897 | 897 | $t = $nfrom[4]; |
| 898 | 898 | $alias = ""; |
| 899 | 899 | // verifier que les deux cles sont homonymes, sinon installer un alias dans le select |
@@ -904,14 +904,14 @@ discard block |
||
| 904 | 904 | if ($newcle != $oldcle) { |
| 905 | 905 | // si l'ancienne cle etait deja dans le select avec un AS |
| 906 | 906 | // reprendre simplement ce AS |
| 907 | - $as = '/\b' . preg_quote($nfrom[6]) . '\s+(AS\s+\w+)\b/'; |
|
| 907 | + $as = '/\b'.preg_quote($nfrom[6]).'\s+(AS\s+\w+)\b/'; |
|
| 908 | 908 | if (preg_match($as, implode(',', $select), $m)) { |
| 909 | 909 | $alias = ""; |
| 910 | 910 | } else { |
| 911 | - $alias = ", " . $nfrom[4] . " AS $oldcle"; |
|
| 911 | + $alias = ", ".$nfrom[4]." AS $oldcle"; |
|
| 912 | 912 | } |
| 913 | 913 | } |
| 914 | - $select = remplacer_jointnul($t . $alias, $select, $e); |
|
| 914 | + $select = remplacer_jointnul($t.$alias, $select, $e); |
|
| 915 | 915 | $join = remplacer_jointnul($t, $join, $e); |
| 916 | 916 | $where = remplacer_jointnul($t, $where, $e); |
| 917 | 917 | $having = remplacer_jointnul($t, $having, $e); |
@@ -952,9 +952,9 @@ discard block |
||
| 952 | 952 | } else { |
| 953 | 953 | $exp = ""; |
| 954 | 954 | if (strtoupper($join) === 'AND') { |
| 955 | - return $exp . join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 955 | + return $exp.join(" $join ", array_map('calculer_where_to_string', $v)); |
|
| 956 | 956 | } else { |
| 957 | - return $exp . join($join, $v); |
|
| 957 | + return $exp.join($join, $v); |
|
| 958 | 958 | } |
| 959 | 959 | } |
| 960 | 960 | } |
@@ -1020,6 +1020,6 @@ discard block |
||
| 1020 | 1020 | } |
| 1021 | 1021 | |
| 1022 | 1022 | return $mime_type |
| 1023 | - . (!$connect ? '' : preg_replace('/\W/', "_", $connect)) . '_' |
|
| 1024 | - . md5($GLOBALS['spip_version_code'] . ' * ' . $skel . (isset($GLOBALS['marqueur_skel']) ? '*' . $GLOBALS['marqueur_skel'] : '')); |
|
| 1023 | + . (!$connect ? '' : preg_replace('/\W/', "_", $connect)).'_' |
|
| 1024 | + . md5($GLOBALS['spip_version_code'].' * '.$skel.(isset($GLOBALS['marqueur_skel']) ? '*'.$GLOBALS['marqueur_skel'] : '')); |
|
| 1025 | 1025 | } |
@@ -47,8 +47,8 @@ discard block |
||
| 47 | 47 | unset($tree['']); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - $tree['slogan'] = $tree['prefix'] . "_slogan"; |
|
| 51 | - $tree['description'] = $tree['prefix'] . "_description"; |
|
| 50 | + $tree['slogan'] = $tree['prefix']."_slogan"; |
|
| 51 | + $tree['description'] = $tree['prefix']."_description"; |
|
| 52 | 52 | paquet_readable_files($tree, "$dir_plugins$plug/"); |
| 53 | 53 | if (!$tree['chemin']) { |
| 54 | 54 | $tree['chemin'] = array(); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | // Prendre les messages d'erreur sans les numeros de lignes |
| 80 | 80 | $msg = array_column($vxml->err, 0); |
| 81 | 81 | $t = _T('plugins_erreur', array('plugins' => $plug)); |
| 82 | - array_unshift($msg, $t . " <ul class='erreur_xml'><li>" . reset($msg) . "</li></ul>"); |
|
| 82 | + array_unshift($msg, $t." <ul class='erreur_xml'><li>".reset($msg)."</li></ul>"); |
|
| 83 | 83 | |
| 84 | 84 | return array('erreur' => $msg); |
| 85 | 85 | } |
@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | function paquet_readable_files(&$tree, $dir) { |
| 96 | 96 | $prefix = strtolower($tree['prefix']); |
| 97 | 97 | |
| 98 | - $tree['options'] = (is_readable($dir . $f = ($prefix . '_options.php'))) ? array($f) : array(); |
|
| 99 | - $tree['fonctions'] = (is_readable($dir . $f = ($prefix . '_fonctions.php'))) ? array($f) : array(); |
|
| 100 | - $tree['install'] = (is_readable($dir . $f = ($prefix . '_administrations.php'))) ? array($f) : array(); |
|
| 98 | + $tree['options'] = (is_readable($dir.$f = ($prefix.'_options.php'))) ? array($f) : array(); |
|
| 99 | + $tree['fonctions'] = (is_readable($dir.$f = ($prefix.'_fonctions.php'))) ? array($f) : array(); |
|
| 100 | + $tree['install'] = (is_readable($dir.$f = ($prefix.'_administrations.php'))) ? array($f) : array(); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | $texte = trim($phraseur->versions[$n]['']); |
| 186 | 186 | $phraseur->versions[$n][''] = ''; |
| 187 | 187 | |
| 188 | - $f = 'info_paquet_' . $name; |
|
| 188 | + $f = 'info_paquet_'.$name; |
|
| 189 | 189 | if (function_exists($f)) { |
| 190 | 190 | $f($phraseur, $attrs, $texte); |
| 191 | 191 | } elseif (!$attrs) { |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | include_spip('inc/texte'); |
| 22 | 22 | $titre = $descriptif = ''; |
| 23 | 23 | if ($type == "rubrique") { |
| 24 | - $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = " . intval($id)); |
|
| 24 | + $row = sql_fetsel("titre, descriptif", "spip_rubriques", "id_rubrique = ".intval($id)); |
|
| 25 | 25 | if ($row) { |
| 26 | 26 | $titre = typo($row["titre"]); |
| 27 | 27 | $descriptif = propre($row["descriptif"]); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | include_spip('inc/filtres_images_mini'); |
| 40 | 40 | $res = image_reduire("<img src='$fid' alt='' />", 100, 48); |
| 41 | 41 | if ($res) { |
| 42 | - $res = "<div class='informer__media' style='float: " . $GLOBALS['spip_lang_right'] . "; margin-" . $GLOBALS['spip_lang_right'] . ": -5px; margin-top: -5px;'>$res</div>"; |
|
| 42 | + $res = "<div class='informer__media' style='float: ".$GLOBALS['spip_lang_right']."; margin-".$GLOBALS['spip_lang_right'].": -5px; margin-top: -5px;'>$res</div>"; |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -55,21 +55,21 @@ discard block |
||
| 55 | 55 | str_replace('"', """, textebrut($titre))), |
| 56 | 56 | "\n\r", " "); |
| 57 | 57 | |
| 58 | - $js_func = $do . '_selection_titre'; |
|
| 58 | + $js_func = $do.'_selection_titre'; |
|
| 59 | 59 | |
| 60 | 60 | return "<div style='display: none;'>" |
| 61 | - . "<input type='text' id='" . $rac . "_sel' value='$id' />" |
|
| 62 | - . "<input type='text' id='" . $rac . "_sel2' value=\"" |
|
| 61 | + . "<input type='text' id='".$rac."_sel' value='$id' />" |
|
| 62 | + . "<input type='text' id='".$rac."_sel2' value=\"" |
|
| 63 | 63 | . entites_html($titre) |
| 64 | 64 | . "\" />" |
| 65 | 65 | . "</div>" |
| 66 | 66 | . "<div class='informer' style='padding: 5px; border-top: 0px;'>" |
| 67 | 67 | . '<div class="informer__item">' |
| 68 | 68 | . (!$res ? '' : $res) |
| 69 | - . "<p class='informer__titre'><b>" . safehtml($titre) . "</b></p>" |
|
| 70 | - . (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . "</div>") |
|
| 69 | + . "<p class='informer__titre'><b>".safehtml($titre)."</b></p>" |
|
| 70 | + . (!$descriptif ? '' : "<div class='informer__descriptif'>".safehtml($descriptif)."</div>") |
|
| 71 | 71 | . '</div>' |
| 72 | - . "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 72 | + . "<div class='informer__action' style='clear:both; text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 73 | 73 | . "<input type='submit' class='fondo btn submit' value='" |
| 74 | 74 | . _T('bouton_choisir') |
| 75 | 75 | . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />" |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | if ($objet == 'rubrique') { |
| 116 | 116 | // si c'est une rubrique-secteur contenant des breves, demander la |
| 117 | 117 | // confirmation du deplacement |
| 118 | - $contient_breves = sql_countsel('spip_breves', "id_rubrique=" . intval($id_objet)); |
|
| 118 | + $contient_breves = sql_countsel('spip_breves', "id_rubrique=".intval($id_objet)); |
|
| 119 | 119 | |
| 120 | 120 | if ($contient_breves > 0) { |
| 121 | 121 | $scb = ($contient_breves > 1 ? 's' : ''); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | )); |
| 127 | 127 | $confirm .= "\n<div class='confirmer_deplacement verdana2'>" |
| 128 | 128 | . "<div class='choix'><input type='checkbox' name='confirme_deplace' value='oui' id='confirme-deplace' /><label for='confirme-deplace'>" |
| 129 | - . $scb . |
|
| 129 | + . $scb. |
|
| 130 | 130 | "</label></div></div>\n"; |
| 131 | 131 | } else { |
| 132 | 132 | $confirm .= "<input type='hidden' name='confirme_deplace' value='oui' />\n"; |
@@ -135,11 +135,11 @@ discard block |
||
| 135 | 135 | $form .= $confirm; |
| 136 | 136 | if ($actionable) { |
| 137 | 137 | if (strpos($form, '<select') !== false) { |
| 138 | - $form .= "<div style='text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 139 | - . '<input class="fondo submit btn" type="submit" value="' . _T('bouton_choisir') . '"/>' |
|
| 138 | + $form .= "<div style='text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 139 | + . '<input class="fondo submit btn" type="submit" value="'._T('bouton_choisir').'"/>' |
|
| 140 | 140 | . "</div>"; |
| 141 | 141 | } |
| 142 | - $form = "<input type='hidden' name='editer_$objet' value='oui' />\n" . $form; |
|
| 142 | + $form = "<input type='hidden' name='editer_$objet' value='oui' />\n".$form; |
|
| 143 | 143 | if ($action = charger_fonction("editer_$objet", "action", true)) { |
| 144 | 144 | $form = generer_action_auteur("editer_$objet", $id_objet, self(), $form, |
| 145 | 145 | " method='post' class='submit_plongeur'"); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | include_spip('inc/presentation'); |
| 157 | 157 | |
| 158 | - return debut_cadre_couleur($logo, true, "", $titre) . $form . fin_cadre_couleur(true); |
|
| 158 | + return debut_cadre_couleur($logo, true, "", $titre).$form.fin_cadre_couleur(true); |
|
| 159 | 159 | |
| 160 | 160 | } |
| 161 | 161 | |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | if ($statut == 'nouveau') { |
| 231 | 231 | if ($attente) { |
| 232 | 232 | $statut = $attente; |
| 233 | - $plus = " (" . _T('info_statut_auteur_a_confirmer') . ")"; |
|
| 233 | + $plus = " ("._T('info_statut_auteur_a_confirmer').")"; |
|
| 234 | 234 | } else { |
| 235 | 235 | return _T('info_statut_auteur_a_confirmer'); |
| 236 | 236 | } |
@@ -243,16 +243,16 @@ discard block |
||
| 243 | 243 | '5poubelle' => _T('texte_statut_poubelle'), // bouh |
| 244 | 244 | ); |
| 245 | 245 | if (isset($recom[$statut])) { |
| 246 | - return $recom[$statut] . $plus; |
|
| 246 | + return $recom[$statut].$plus; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | // retrouver directement par le statut sinon |
| 250 | 250 | if ($t = array_search($statut, $GLOBALS['liste_des_statuts'])) { |
| 251 | 251 | if (isset($recom[$t])) { |
| 252 | - return $recom[$t] . $plus; |
|
| 252 | + return $recom[$t].$plus; |
|
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - return _T($t) . $plus; |
|
| 255 | + return _T($t).$plus; |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | // si on a pas reussi a le traduire, retournons la chaine telle quelle |
@@ -376,7 +376,7 @@ discard block |
||
| 376 | 376 | if (!$id_rubrique and defined('_CHOIX_RUBRIQUE_PAR_DEFAUT') and _CHOIX_RUBRIQUE_PAR_DEFAUT) { |
| 377 | 377 | $in = !count($GLOBALS['connect_id_rubrique']) |
| 378 | 378 | ? '' |
| 379 | - : (" AND " . sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 379 | + : (" AND ".sql_in('id_rubrique', $GLOBALS['connect_id_rubrique'])); |
|
| 380 | 380 | |
| 381 | 381 | // on tente d'abord l'ecriture a la racine dans le cas des rubriques uniquement |
| 382 | 382 | if ($objet == 'rubrique') { |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | return ''; |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | - return propre("[->" . $virtuel . "]"); |
|
| 413 | + return propre("[->".$virtuel."]"); |
|
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $args = param_low_sec($op, $args, $lang, 'rss'); |
| 439 | 439 | $url = generer_url_public('rss', $args); |
| 440 | 440 | |
| 441 | - return "<a style='float: " . $GLOBALS['spip_lang_right'] . ";' href='$url'>$clic</a>"; |
|
| 441 | + return "<a style='float: ".$GLOBALS['spip_lang_right'].";' href='$url'>$clic</a>"; |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | ); |
| 511 | 511 | |
| 512 | 512 | if ($alertes = array_filter($alertes)) { |
| 513 | - return "<div class='wrap-messages-alertes'><div class='messages-alertes'>" . |
|
| 513 | + return "<div class='wrap-messages-alertes'><div class='messages-alertes'>". |
|
| 514 | 514 | join(' | ', $alertes) |
| 515 | 515 | . "</div></div>"; |
| 516 | 516 | } |
@@ -544,13 +544,13 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | function afficher_plus_info($lien, $titre = "+", $titre_lien = "") { |
| 546 | 546 | $titre = attribut_html($titre); |
| 547 | - $icone = "\n<a href='$lien' title='$titre' class='plus_info'>" . |
|
| 548 | - http_img_pack("information-16.png", $titre) . "</a>"; |
|
| 547 | + $icone = "\n<a href='$lien' title='$titre' class='plus_info'>". |
|
| 548 | + http_img_pack("information-16.png", $titre)."</a>"; |
|
| 549 | 549 | |
| 550 | 550 | if (!$titre_lien) { |
| 551 | 551 | return $icone; |
| 552 | 552 | } else { |
| 553 | - return $icone . "\n<a href='$lien'>$titre_lien</a>"; |
|
| 553 | + return $icone."\n<a href='$lien'>$titre_lien</a>"; |
|
| 554 | 554 | } |
| 555 | 555 | } |
| 556 | 556 | |