@@ -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 | } |
@@ -214,10 +214,10 @@ discard block |
||
| 214 | 214 | // Appel direct dans un squelette |
| 215 | 215 | if (!$row) { |
| 216 | 216 | if (!$new or $lier_trad) { |
| 217 | - if ($select = charger_fonction('precharger_' . $type, 'inc', true)) { |
|
| 217 | + if ($select = charger_fonction('precharger_'.$type, 'inc', true)) { |
|
| 218 | 218 | $row = $select($id, $id_parent, $lier_trad); |
| 219 | 219 | } else { |
| 220 | - $row = sql_fetsel('*', $table_objet_sql, $id_table_objet . '=' . intval($id)); |
|
| 220 | + $row = sql_fetsel('*', $table_objet_sql, $id_table_objet.'='.intval($id)); |
|
| 221 | 221 | } |
| 222 | 222 | if (!$new) { |
| 223 | 223 | $md5 = controles_md5($row); |
@@ -287,13 +287,12 @@ discard block |
||
| 287 | 287 | unset($contexte['lang']); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | - $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n" . |
|
| 291 | - (!$lier_trad ? '' : |
|
| 292 | - ("\n<input type='hidden' name='lier_trad' value='" . |
|
| 293 | - $lier_trad . |
|
| 294 | - "' />" . |
|
| 295 | - "\n<input type='hidden' name='changer_lang' value='" . |
|
| 296 | - $config['langue'] . |
|
| 290 | + $contexte['_hidden'] = "<input type='hidden' name='editer_$type' value='oui' />\n". |
|
| 291 | + (!$lier_trad ? '' : ("\n<input type='hidden' name='lier_trad' value='". |
|
| 292 | + $lier_trad. |
|
| 293 | + "' />". |
|
| 294 | + "\n<input type='hidden' name='changer_lang' value='". |
|
| 295 | + $config['langue']. |
|
| 297 | 296 | "' />")) |
| 298 | 297 | . $hidden |
| 299 | 298 | . (isset($md5) ? $md5 : ''); |
@@ -320,14 +319,14 @@ discard block |
||
| 320 | 319 | $aider = charger_fonction('aider', 'inc'); |
| 321 | 320 | if (strlen($texte) > 28 * 1024) { |
| 322 | 321 | $texte = str_replace("\r\n", "\n", $texte); |
| 323 | - $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 322 | + $pos = strpos($texte, "\n\n", 28 * 1024); // coupe para > 28 ko |
|
| 324 | 323 | if ($pos > 0 and $pos < 32 * 1024) { |
| 325 | - $debut = substr($texte, 0, $pos) . "\n\n<!--SPIP-->\n"; |
|
| 324 | + $debut = substr($texte, 0, $pos)."\n\n<!--SPIP-->\n"; |
|
| 326 | 325 | $suite = substr($texte, $pos + 2); |
| 327 | 326 | } else { |
| 328 | - $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 327 | + $pos = strpos($texte, ' ', 28 * 1024); // sinon coupe espace |
|
| 329 | 328 | if (!($pos > 0 and $pos < 32 * 1024)) { |
| 330 | - $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 329 | + $pos = 28 * 1024; // au pire (pas d'espace trouv'e) |
|
| 331 | 330 | $decalage = 0; // si y'a pas d'espace, il ne faut pas perdre le caract`ere |
| 332 | 331 | } else { |
| 333 | 332 | $decalage = 1; |
@@ -357,13 +356,13 @@ discard block |
||
| 357 | 356 | } |
| 358 | 357 | |
| 359 | 358 | include_spip('inc/barre'); |
| 360 | - $textes_supplement = "<br /><span style='color: red'>" . _T('info_texte_long') . "</span>\n"; |
|
| 359 | + $textes_supplement = "<br /><span style='color: red'>"._T('info_texte_long')."</span>\n"; |
|
| 361 | 360 | $nombre = 0; |
| 362 | 361 | |
| 363 | 362 | while (strlen($texte) > 29 * 1024) { |
| 364 | 363 | $nombre++; |
| 365 | 364 | list($texte1, $texte) = coupe_trop_long($texte); |
| 366 | - $textes_supplement .= '<br />' . |
|
| 365 | + $textes_supplement .= '<br />'. |
|
| 367 | 366 | "<textarea id='texte$nombre' name='texte_plus[$nombre]'$att_text>$texte1</textarea>\n"; |
| 368 | 367 | } |
| 369 | 368 | |
@@ -451,7 +450,7 @@ discard block |
||
| 451 | 450 | $ctr = array(); |
| 452 | 451 | foreach ($data as $key => $val) { |
| 453 | 452 | $m = md5($val); |
| 454 | - $k = $prefixe . $key; |
|
| 453 | + $k = $prefixe.$key; |
|
| 455 | 454 | |
| 456 | 455 | switch ($format) { |
| 457 | 456 | case 'html': |
@@ -464,7 +463,7 @@ discard block |
||
| 464 | 463 | } |
| 465 | 464 | |
| 466 | 465 | if ($format == 'html') { |
| 467 | - return "\n\n<!-- controles md5 -->\n" . join("\n", $ctr) . "\n\n"; |
|
| 466 | + return "\n\n<!-- controles md5 -->\n".join("\n", $ctr)."\n\n"; |
|
| 468 | 467 | } else { |
| 469 | 468 | return $ctr; |
| 470 | 469 | } |
@@ -615,7 +614,7 @@ discard block |
||
| 615 | 614 | // On elimine les donnees non modifiees par le formulaire (mais |
| 616 | 615 | // potentiellement modifiees entre temps par un autre utilisateur) |
| 617 | 616 | foreach ($champs as $key => $val) { |
| 618 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 617 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 619 | 618 | if (is_scalar($val) and $m == md5($val)) { |
| 620 | 619 | unset($champs[$key]); |
| 621 | 620 | } |
@@ -644,7 +643,7 @@ discard block |
||
| 644 | 643 | // de conflit. |
| 645 | 644 | $ctrh = $ctrq = $conflits = array(); |
| 646 | 645 | foreach (array_keys($champs) as $key) { |
| 647 | - if (isset($ctr[$prefix . $key]) and $m = $ctr[$prefix . $key]) { |
|
| 646 | + if (isset($ctr[$prefix.$key]) and $m = $ctr[$prefix.$key]) { |
|
| 648 | 647 | $ctrh[$key] = $m; |
| 649 | 648 | $ctrq[] = $key; |
| 650 | 649 | } |
@@ -677,9 +676,9 @@ discard block |
||
| 677 | 676 | */ |
| 678 | 677 | function display_conflit_champ($x) { |
| 679 | 678 | if (strstr($x, "\n") or strlen($x) > 80) { |
| 680 | - return "<textarea style='width:99%; height:10em;'>" . entites_html($x) . "</textarea>\n"; |
|
| 679 | + return "<textarea style='width:99%; height:10em;'>".entites_html($x)."</textarea>\n"; |
|
| 681 | 680 | } else { |
| 682 | - return "<input type='text' size='40' style='width:99%' value=\"" . entites_html($x) . "\" />\n"; |
|
| 681 | + return "<input type='text' size='40' style='width:99%' value=\"".entites_html($x)."\" />\n"; |
|
| 683 | 682 | } |
| 684 | 683 | } |
| 685 | 684 | |
@@ -719,11 +718,11 @@ discard block |
||
| 719 | 718 | ) : $champ; |
| 720 | 719 | |
| 721 | 720 | $diffs[] = "<h2>$titre</h2>\n" |
| 722 | - . '<h3>' . _T('info_conflit_edition_differences') . "</h3>\n" |
|
| 723 | - . "<div style='max-height:8em; overflow: auto; width:99%;'>" . $d . "</div>\n" |
|
| 724 | - . '<h4>' . _T('info_conflit_edition_votre_version') . '</h4>' |
|
| 721 | + . '<h3>'._T('info_conflit_edition_differences')."</h3>\n" |
|
| 722 | + . "<div style='max-height:8em; overflow: auto; width:99%;'>".$d."</div>\n" |
|
| 723 | + . '<h4>'._T('info_conflit_edition_votre_version').'</h4>' |
|
| 725 | 724 | . display_conflit_champ($a['post']) |
| 726 | - . '<h4>' . _T('info_conflit_edition_version_enregistree') . '</h4>' |
|
| 725 | + . '<h4>'._T('info_conflit_edition_version_enregistree').'</h4>' |
|
| 727 | 726 | . display_conflit_champ($base); |
| 728 | 727 | } |
| 729 | 728 | |
@@ -731,16 +730,16 @@ discard block |
||
| 731 | 730 | $id = uniqid(rand()); |
| 732 | 731 | $redirect = "<form action='$redirect' method='get' |
| 733 | 732 | id='$id' |
| 734 | - style='float:" . $GLOBALS['spip_lang_right'] . "; margin-top:2em;'>\n" |
|
| 733 | + style='float:".$GLOBALS['spip_lang_right']."; margin-top:2em;'>\n" |
|
| 735 | 734 | . form_hidden($redirect) |
| 736 | - . "<input type='submit' value='" . _T('icone_retour') . "' /> |
|
| 735 | + . "<input type='submit' value='"._T('icone_retour')."' /> |
|
| 737 | 736 | </form>\n"; |
| 738 | 737 | |
| 739 | 738 | // pour les documents, on est probablement en ajax : il faut ajaxer |
| 740 | 739 | if (_AJAX) { |
| 741 | 740 | $redirect .= '<script type="text/javascript">' |
| 742 | - . 'setTimeout(function(){$("#' . $id . '") |
|
| 743 | - .ajaxForm({target:$("#' . $id . '").parent()}); |
|
| 741 | + . 'setTimeout(function(){$("#'.$id.'") |
|
| 742 | + .ajaxForm({target:$("#' . $id.'").parent()}); |
|
| 744 | 743 | }, 200);' |
| 745 | 744 | . "</script>\n"; |
| 746 | 745 | } |
@@ -759,9 +758,9 @@ discard block |
||
| 759 | 758 | .diff-para-deplace .diff-supprime { background: #ffb8b8; border: 1px solid #808080; } |
| 760 | 759 | .diff-para-deplace .diff-deplace { background: #b8b8ff; border: 1px solid #808080; } |
| 761 | 760 | </style>' |
| 762 | - . '<p>' . _T('info_conflit_edition_avis_non_sauvegarde') . '</p>' |
|
| 763 | - . '<p>' . _T('texte_conflit_edition_correction') . '</p>' |
|
| 764 | - . "<div style='text-align:" . $GLOBALS['spip_lang_left'] . ";'>" |
|
| 761 | + . '<p>'._T('info_conflit_edition_avis_non_sauvegarde').'</p>' |
|
| 762 | + . '<p>'._T('texte_conflit_edition_correction').'</p>' |
|
| 763 | + . "<div style='text-align:".$GLOBALS['spip_lang_left'].";'>" |
|
| 765 | 764 | . join("\n", $diffs) |
| 766 | 765 | . "</div>\n" |
| 767 | 766 | |