@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | |
| 94 | 94 | $titre = '<title>[' |
| 95 | 95 | . $nom_site_spip |
| 96 | - . '] ' . $match |
|
| 96 | + . '] '.$match |
|
| 97 | 97 | . '</title>'; |
| 98 | 98 | |
| 99 | 99 | $texte = substr_replace($texte, $titre, $p + 6, 0); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $flux['data']['texte'] = pipeline( |
| 156 | 156 | 'affiche_droite', |
| 157 | 157 | ['args' => $flux['args']['contexte'], 'data' => $flux['data']['texte']] |
| 158 | - ) . liste_objets_bloques( |
|
| 158 | + ).liste_objets_bloques( |
|
| 159 | 159 | $exec, |
| 160 | 160 | $flux['args']['contexte'] |
| 161 | 161 | ); |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $flux['data']['texte'] = str_replace('<!--affiche_milieu-->', recuperer_fond( |
| 191 | 191 | 'prive/objets/editer/traductions', |
| 192 | 192 | ['objet' => $objet, 'id_objet' => $id, 'espace_prive' => 1] |
| 193 | - ) . '<!--affiche_milieu-->', $flux['data']['texte']); |
|
| 193 | + ).'<!--affiche_milieu-->', $flux['data']['texte']); |
|
| 194 | 194 | $flux['data']['texte'] = pipeline('afficher_fiche_objet', [ |
| 195 | 195 | 'args' => [ |
| 196 | 196 | 'contexte' => $flux['args']['contexte'], |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $full_marqueur = "$ouvrir$marqueur$fermer"; |
| 259 | 259 | |
| 260 | 260 | // Le marqueur est absent : on l'ajoute avant l'élément indiqué |
| 261 | - if ($marqueur_pos === false) { |
|
| 261 | + if ($marqueur_pos === false) { |
|
| 262 | 262 | $texte = preg_replace( |
| 263 | 263 | ",$inserer_avant,", |
| 264 | 264 | "$full_marqueur\\0", |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | } |
| 306 | 306 | } |
| 307 | 307 | if ($res) { |
| 308 | - $flux['data'] = $res . $flux['data']; |
|
| 308 | + $flux['data'] = $res.$flux['data']; |
|
| 309 | 309 | } |
| 310 | 310 | |
| 311 | 311 | return $flux; |
@@ -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 | } |
@@ -61,21 +61,21 @@ discard block |
||
| 61 | 61 | ' ' |
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | - $js_func = $do . '_selection_titre'; |
|
| 64 | + $js_func = $do.'_selection_titre'; |
|
| 65 | 65 | |
| 66 | 66 | return "<div style='display: none;'>" |
| 67 | - . "<input type='text' id='" . $rac . "_sel' value='$id' />" |
|
| 68 | - . "<input type='text' id='" . $rac . "_sel2' value=\"" |
|
| 67 | + . "<input type='text' id='".$rac."_sel' value='$id' />" |
|
| 68 | + . "<input type='text' id='".$rac."_sel2' value=\"" |
|
| 69 | 69 | . entites_html($titre) |
| 70 | 70 | . '" />' |
| 71 | 71 | . '</div>' |
| 72 | 72 | . "<div class='informer' style='padding: 5px; border-top: 0px;'>" |
| 73 | 73 | . '<div class="informer__item">' |
| 74 | 74 | . (!$res ? '' : $res) |
| 75 | - . "<p class='informer__titre'><b>" . safehtml($titre) . '</b></p>' |
|
| 76 | - . (!$descriptif ? '' : "<div class='informer__descriptif'>" . safehtml($descriptif) . '</div>') |
|
| 75 | + . "<p class='informer__titre'><b>".safehtml($titre).'</b></p>' |
|
| 76 | + . (!$descriptif ? '' : "<div class='informer__descriptif'>".safehtml($descriptif).'</div>') |
|
| 77 | 77 | . '</div>' |
| 78 | - . "<div class='informer__action' style='clear:both; text-align: " . $GLOBALS['spip_lang_right'] . ";'>" |
|
| 78 | + . "<div class='informer__action' style='clear:both; text-align: ".$GLOBALS['spip_lang_right'].";'>" |
|
| 79 | 79 | . "<input type='submit' class='fondo btn submit' value='" |
| 80 | 80 | . _T('bouton_choisir') |
| 81 | 81 | . "'\nonclick=\"$js_func('$titre',$id,'selection_rubrique','id_parent'); return false;\" />" |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | if ($res) { |
| 56 | 56 | return $res; |
| 57 | 57 | } |
| 58 | - spip_log("meta: $script " . print_r($_POST, true)); |
|
| 58 | + spip_log("meta: $script ".print_r($_POST, true)); |
|
| 59 | 59 | ecrire_meta($script, serialize($_POST)); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | // on pourrait statuer automatiquement les webmestres a l'init d'une action auth par ftp ... ? |
| 126 | 126 | |
| 127 | - spip_log("admin $pref" . ($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 127 | + spip_log("admin $pref".($valeur ? ' (reprise)' : ' (init)'), $journal); |
|
| 128 | 128 | |
| 129 | 129 | return ''; |
| 130 | 130 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | if (autoriser('configurer')) { |
| 143 | 143 | return _DIR_TMP; |
| 144 | 144 | } else { |
| 145 | - return _DIR_TRANSFERT . $GLOBALS['visiteur_session']['login'] . '/'; |
|
| 145 | + return _DIR_TRANSFERT.$GLOBALS['visiteur_session']['login'].'/'; |
|
| 146 | 146 | } |
| 147 | 147 | } |
| 148 | 148 | |
@@ -160,8 +160,8 @@ discard block |
||
| 160 | 160 | * Nom du fichier |
| 161 | 161 | **/ |
| 162 | 162 | function fichier_admin($action, $pref = 'admin_') { |
| 163 | - return $pref . |
|
| 164 | - substr(md5($action . (time() & ~2047) . $GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 163 | + return $pref. |
|
| 164 | + substr(md5($action.(time() & ~2047).$GLOBALS['visiteur_session']['login']), 0, 10); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | /** |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } else { |
| 195 | 195 | $dir = dir_admin(); |
| 196 | 196 | $signal = fichier_admin($script); |
| 197 | - if (@file_exists($dir . $signal)) { |
|
| 197 | + if (@file_exists($dir.$signal)) { |
|
| 198 | 198 | spip_log("Action admin: $action"); |
| 199 | 199 | |
| 200 | 200 | return ''; |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | return ''; |
| 214 | 214 | } |
| 215 | - $corps .= '<input type="hidden" name="validation_admin" value="' . $signal . '" />'; |
|
| 215 | + $corps .= '<input type="hidden" name="validation_admin" value="'.$signal.'" />'; |
|
| 216 | 216 | $suivant = _T('bouton_valider'); |
| 217 | 217 | $js = ''; |
| 218 | 218 | } else { |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | . "</legend>\n<label for='fichier'>" |
| 228 | 228 | . _T('info_creer_repertoire') |
| 229 | 229 | . "</label>\n" |
| 230 | - . "<span id='signal' class='formo'>" . $signal . '</span>' |
|
| 230 | + . "<span id='signal' class='formo'>".$signal.'</span>' |
|
| 231 | 231 | . "<input type='hidden' id='fichier' name='fichier' value='" |
| 232 | 232 | . $signal |
| 233 | 233 | . "' />" |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | * Nom de l'action (en base) qui a été exécutée |
| 265 | 265 | **/ |
| 266 | 266 | function fin_admin($action) { |
| 267 | - $signal = dir_admin() . fichier_admin($action); |
|
| 267 | + $signal = dir_admin().fichier_admin($action); |
|
| 268 | 268 | spip_unlink($signal); |
| 269 | 269 | if ($action != 'delete_all') { |
| 270 | 270 | effacer_meta($action); |
@@ -292,8 +292,8 @@ discard block |
||
| 292 | 292 | include_spip('inc/filtres'); |
| 293 | 293 | foreach (array_merge($_POST, $_GET) as $n => $c) { |
| 294 | 294 | if (!in_array($n, ['fichier', 'exec', 'validation_admin']) and !is_array($c)) { |
| 295 | - $suite .= "\n<input type='hidden' name='" . spip_htmlspecialchars($n) . "' value='" . |
|
| 296 | - entites_html($c) . |
|
| 295 | + $suite .= "\n<input type='hidden' name='".spip_htmlspecialchars($n)."' value='". |
|
| 296 | + entites_html($c). |
|
| 297 | 297 | "' />"; |
| 298 | 298 | } |
| 299 | 299 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $contenu = @gzfile($fichier); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - return is_array($contenu) ? join('', $contenu) : (string)$contenu; |
|
| 125 | + return is_array($contenu) ? join('', $contenu) : (string) $contenu; |
|
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | |
@@ -315,9 +315,9 @@ discard block |
||
| 315 | 315 | */ |
| 316 | 316 | function ecrire_fichier_securise($fichier, $contenu, $ecrire_quand_meme = false, $truncate = true) { |
| 317 | 317 | if (substr($fichier, -4) !== '.php') { |
| 318 | - spip_log('Erreur de programmation: ' . $fichier . ' doit finir par .php'); |
|
| 318 | + spip_log('Erreur de programmation: '.$fichier.' doit finir par .php'); |
|
| 319 | 319 | } |
| 320 | - $contenu = '<' . "?php die ('Acces interdit'); ?" . ">\n" . $contenu; |
|
| 320 | + $contenu = '<'."?php die ('Acces interdit'); ?".">\n".$contenu; |
|
| 321 | 321 | |
| 322 | 322 | return ecrire_fichier($fichier, $contenu, $ecrire_quand_meme, $truncate); |
| 323 | 323 | } |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | * @return bool |
| 331 | 331 | */ |
| 332 | 332 | function ecrire_fichier_calcule_si_modifie($fichier, $contenu, $force = false, $use_copy = false) { |
| 333 | - $fichier_tmp = $fichier . '.last'; |
|
| 333 | + $fichier_tmp = $fichier.'.last'; |
|
| 334 | 334 | if (!ecrire_fichier($fichier_tmp, $contenu, true)) { |
| 335 | 335 | return false; |
| 336 | 336 | } |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | */ |
| 371 | 371 | function lire_fichier_securise($fichier, &$contenu, $options = []) { |
| 372 | 372 | if ($res = lire_fichier($fichier, $contenu, $options)) { |
| 373 | - $contenu = substr($contenu, strlen('<' . "?php die ('Acces interdit'); ?" . ">\n")); |
|
| 373 | + $contenu = substr($contenu, strlen('<'."?php die ('Acces interdit'); ?".">\n")); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | return $res; |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | $wait = 0; |
| 541 | 541 | } |
| 542 | 542 | } |
| 543 | - spip_log('Probleme de configuration opcache.revalidate_freq ' . $duree . 's : on attend ' . $wait . 's', _LOG_INFO_IMPORTANTE); |
|
| 543 | + spip_log('Probleme de configuration opcache.revalidate_freq '.$duree.'s : on attend '.$wait.'s', _LOG_INFO_IMPORTANTE); |
|
| 544 | 544 | if ($wait) { |
| 545 | 545 | sleep($duree + 1); |
| 546 | 546 | } |
@@ -568,9 +568,9 @@ discard block |
||
| 568 | 568 | if ($item == '.' || $item == '..') { |
| 569 | 569 | continue; |
| 570 | 570 | } |
| 571 | - if (!supprimer_repertoire($dir . '/' . $item)) { |
|
| 572 | - @chmod($dir . '/' . $item, 0777); |
|
| 573 | - if (!supprimer_repertoire($dir . '/' . $item)) { |
|
| 571 | + if (!supprimer_repertoire($dir.'/'.$item)) { |
|
| 572 | + @chmod($dir.'/'.$item, 0777); |
|
| 573 | + if (!supprimer_repertoire($dir.'/'.$item)) { |
|
| 574 | 574 | return false; |
| 575 | 575 | } |
| 576 | 576 | }; |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | if (!strlen($subdir)) { |
| 616 | 616 | $n = strrpos($base, '/'); |
| 617 | 617 | if ($n === false) { |
| 618 | - return $nobase ? '' : ($base . '/'); |
|
| 618 | + return $nobase ? '' : ($base.'/'); |
|
| 619 | 619 | } |
| 620 | 620 | $subdir = substr($base, $n + 1); |
| 621 | 621 | $base = substr($base, 0, $n + 1); |
@@ -625,14 +625,14 @@ discard block |
||
| 625 | 625 | } |
| 626 | 626 | |
| 627 | 627 | $baseaff = $nobase ? '' : $base; |
| 628 | - if (isset($dirs[$base . $subdir])) { |
|
| 629 | - return $baseaff . $dirs[$base . $subdir]; |
|
| 628 | + if (isset($dirs[$base.$subdir])) { |
|
| 629 | + return $baseaff.$dirs[$base.$subdir]; |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | - $path = $base . $subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf' |
|
| 632 | + $path = $base.$subdir; # $path = 'IMG/distant/pdf' ou 'IMG/distant_pdf' |
|
| 633 | 633 | |
| 634 | 634 | if (file_exists("$path/.ok")) { |
| 635 | - return $baseaff . ($dirs[$base . $subdir] = "$subdir/"); |
|
| 635 | + return $baseaff.($dirs[$base.$subdir] = "$subdir/"); |
|
| 636 | 636 | } |
| 637 | 637 | |
| 638 | 638 | @mkdir($path, _SPIP_CHMOD); |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | @touch("$path/.ok"); |
| 643 | 643 | spip_log("creation $base$subdir/"); |
| 644 | 644 | |
| 645 | - return $baseaff . ($dirs[$base . $subdir] = "$subdir/"); |
|
| 645 | + return $baseaff.($dirs[$base.$subdir] = "$subdir/"); |
|
| 646 | 646 | } |
| 647 | 647 | |
| 648 | 648 | // en cas d'echec c'est peut etre tout simplement que le disque est plein : |
@@ -652,10 +652,10 @@ discard block |
||
| 652 | 652 | return ''; |
| 653 | 653 | } |
| 654 | 654 | if (!_DIR_RESTREINT) { |
| 655 | - $base = preg_replace(',^' . _DIR_RACINE . ',', '', $base); |
|
| 655 | + $base = preg_replace(',^'._DIR_RACINE.',', '', $base); |
|
| 656 | 656 | } |
| 657 | 657 | $base .= $subdir; |
| 658 | - raler_fichier($base . '/.ok'); |
|
| 658 | + raler_fichier($base.'/.ok'); |
|
| 659 | 659 | } |
| 660 | 660 | |
| 661 | 661 | |
@@ -728,7 +728,7 @@ discard block |
||
| 728 | 728 | $maxfiles - $nbfiles, |
| 729 | 729 | $recurs |
| 730 | 730 | ); |
| 731 | - $fichiers = array_merge((array)$beginning, (array)$end); |
|
| 731 | + $fichiers = array_merge((array) $beginning, (array) $end); |
|
| 732 | 732 | $nbfiles = count($fichiers); |
| 733 | 733 | } |
| 734 | 734 | } |
@@ -70,17 +70,17 @@ |
||
| 70 | 70 | // compat < SPIP 3.3 |
| 71 | 71 | include_spip('inc/filtres_images_mini'); |
| 72 | 72 | $c['couleur_foncee'] = $c['couleur_theme']; |
| 73 | - $c['couleur_claire'] = '#' . couleur_eclaircir($c['couleur_theme'], .5); |
|
| 73 | + $c['couleur_claire'] = '#'.couleur_eclaircir($c['couleur_theme'], .5); |
|
| 74 | 74 | |
| 75 | 75 | return |
| 76 | - 'couleur_theme=' . substr($c['couleur_theme'], 1) |
|
| 76 | + 'couleur_theme='.substr($c['couleur_theme'], 1) |
|
| 77 | 77 | // compat < SPIP 3.3 |
| 78 | - . '&couleur_claire=' . substr($c['couleur_claire'], 1) |
|
| 79 | - . '&couleur_foncee=' . substr($c['couleur_foncee'], 1); |
|
| 78 | + . '&couleur_claire='.substr($c['couleur_claire'], 1) |
|
| 79 | + . '&couleur_foncee='.substr($c['couleur_foncee'], 1); |
|
| 80 | 80 | } else { |
| 81 | 81 | if (is_array($choix)) { |
| 82 | 82 | // compat < SPIP 3.3 |
| 83 | - $compat_spip_33 = function ($c) { |
|
| 83 | + $compat_spip_33 = function($c) { |
|
| 84 | 84 | if (!isset($c['couleur_theme'])) { |
| 85 | 85 | $c['couleur_theme'] = $c['couleur_foncee']; |
| 86 | 86 | unset($c['couleur_foncee']); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $id_rubrique = $GLOBALS['connect_id_rubrique'][0]; |
| 43 | 43 | } elseif ( |
| 44 | 44 | is_int(_AUTO_SELECTION_RUBRIQUE) |
| 45 | - and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique=' . intval(_AUTO_SELECTION_RUBRIQUE)) |
|
| 45 | + and sql_fetsel('id_rubrique', 'spip_rubriques', 'id_rubrique='.intval(_AUTO_SELECTION_RUBRIQUE)) |
|
| 46 | 46 | ) { |
| 47 | 47 | $id_rubrique = _AUTO_SELECTION_RUBRIQUE; |
| 48 | 48 | } else { |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | $id_rubrique = $row_rub['id_rubrique']; |
| 52 | 52 | } |
| 53 | 53 | // si le choix ne convient pas, on cherche dans un secteur |
| 54 | - if (!autoriser('creer' . $objet . 'dans', 'rubrique', $id_rubrique)) { |
|
| 54 | + if (!autoriser('creer'.$objet.'dans', 'rubrique', $id_rubrique)) { |
|
| 55 | 55 | $id_rubrique = ''; |
| 56 | 56 | // manque de chance, la rubrique n'est pas autorisee, on cherche un des secteurs autorises |
| 57 | 57 | $res = sql_select('id_rubrique', 'spip_rubriques', 'id_parent=0'); |
| 58 | 58 | while (!$id_rubrique and $row_rub = sql_fetch($res)) { |
| 59 | - if (autoriser('creer' . $objet . 'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 59 | + if (autoriser('creer'.$objet.'dans', 'rubrique', $row_rub['id_rubrique'])) { |
|
| 60 | 60 | $id_rubrique = $row_rub['id_rubrique']; |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | $p !== false |
| 138 | 138 | and ($morceau = substr($txt, $d, $p - $d)) |
| 139 | 139 | and (($nopen += preg_match_all( |
| 140 | - '{<' . preg_quote($closing_tag) . '(\s*>|\s[^>]*[^/>]>)}is', |
|
| 140 | + '{<'.preg_quote($closing_tag).'(\s*>|\s[^>]*[^/>]>)}is', |
|
| 141 | 141 | $morceau, |
| 142 | 142 | $matches, |
| 143 | 143 | PREG_SET_ORDER |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | static $dirs = []; |
| 42 | 42 | $liste = []; |
| 43 | 43 | foreach (creer_chemin() as $dir) { |
| 44 | - if (!isset($dirs[$a = $dir . $dirname])) { |
|
| 44 | + if (!isset($dirs[$a = $dir.$dirname])) { |
|
| 45 | 45 | $dirs[$a] = (is_dir($a) || !$a); |
| 46 | 46 | } |
| 47 | 47 | if ($dirs[$a]) { |
@@ -67,21 +67,21 @@ discard block |
||
| 67 | 67 | **/ |
| 68 | 68 | function chercher_module_lang($module, $lang = '') { |
| 69 | 69 | if ($lang) { |
| 70 | - $lang = '_' . $lang; |
|
| 70 | + $lang = '_'.$lang; |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | // 1) dans un repertoire nomme lang/ se trouvant sur le chemin |
| 74 | 74 | if ( |
| 75 | 75 | $f = ($module == 'local' |
| 76 | - ? find_in_path($module . $lang . '.php', 'lang/') |
|
| 77 | - : find_langs_in_path($module . $lang . '.php', 'lang/')) |
|
| 76 | + ? find_in_path($module.$lang.'.php', 'lang/') |
|
| 77 | + : find_langs_in_path($module.$lang.'.php', 'lang/')) |
|
| 78 | 78 | ) { |
| 79 | 79 | return is_array($f) ? $f : [$f]; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | // 2) directement dans le chemin (old style, uniquement pour local) |
| 83 | 83 | return (($module == 'local') or strpos($module, '/')) |
| 84 | - ? (($f = find_in_path($module . $lang . '.php')) ? [$f] : false) |
|
| 84 | + ? (($f = find_in_path($module.$lang.'.php')) ? [$f] : false) |
|
| 85 | 85 | : false; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | **/ |
| 106 | 106 | function charger_langue($lang, $module = 'spip') { |
| 107 | 107 | static $langs = []; |
| 108 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 108 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 109 | 109 | if (!isset($langs[$lang])) { |
| 110 | 110 | $langs[$lang] = []; |
| 111 | 111 | if ($lang) { |
@@ -120,13 +120,13 @@ discard block |
||
| 120 | 120 | } |
| 121 | 121 | foreach ($langs[$lang] as $l) { |
| 122 | 122 | if ($fichiers_lang = chercher_module_lang($module, $l)) { |
| 123 | - $GLOBALS['idx_lang'] = 'i18n_' . $module . '_' . $l; |
|
| 123 | + $GLOBALS['idx_lang'] = 'i18n_'.$module.'_'.$l; |
|
| 124 | 124 | include(array_shift($fichiers_lang)); |
| 125 | 125 | surcharger_langue($fichiers_lang); |
| 126 | 126 | if ($l !== $lang) { |
| 127 | - $GLOBALS[$var] = &$GLOBALS['i18n_' . $module . '_' . $l]; |
|
| 127 | + $GLOBALS[$var] = &$GLOBALS['i18n_'.$module.'_'.$l]; |
|
| 128 | 128 | } |
| 129 | - $GLOBALS['lang_' . $var] = $l; |
|
| 129 | + $GLOBALS['lang_'.$var] = $l; |
|
| 130 | 130 | #spip_log("module de langue : ${module}_$l.php", 'traduire'); |
| 131 | 131 | break; |
| 132 | 132 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | foreach ($fichiers as $fichier) { |
| 165 | 165 | if (!isset($surcharges[$fichier])) { |
| 166 | 166 | $idx_lang_normal = $GLOBALS['idx_lang']; |
| 167 | - $GLOBALS['idx_lang'] = $GLOBALS['idx_lang'] . '@temporaire'; |
|
| 167 | + $GLOBALS['idx_lang'] = $GLOBALS['idx_lang'].'@temporaire'; |
|
| 168 | 168 | include($fichier); |
| 169 | 169 | $surcharges[$fichier] = $GLOBALS[$GLOBALS['idx_lang']]; |
| 170 | 170 | unset($GLOBALS[$GLOBALS['idx_lang']]); |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | if (is_array($surcharges[$fichier])) { |
| 174 | 174 | $GLOBALS[$GLOBALS['idx_lang']] = array_merge( |
| 175 | - (isset($GLOBALS[$GLOBALS['idx_lang']]) ? (array)$GLOBALS[$GLOBALS['idx_lang']] : []), |
|
| 175 | + (isset($GLOBALS[$GLOBALS['idx_lang']]) ? (array) $GLOBALS[$GLOBALS['idx_lang']] : []), |
|
| 176 | 176 | $surcharges[$fichier] |
| 177 | 177 | ); |
| 178 | 178 | } |
@@ -250,27 +250,27 @@ discard block |
||
| 250 | 250 | } else { |
| 251 | 251 | $modules = ['spip', 'ecrire']; |
| 252 | 252 | $code = $ori; |
| 253 | - $ori_complet = implode('|', $modules) . ':' . $ori; |
|
| 253 | + $ori_complet = implode('|', $modules).':'.$ori; |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | $desc = new SPIP_Traductions_Description(); |
| 257 | 257 | |
| 258 | 258 | // parcourir tous les modules jusqu'a ce qu'on trouve |
| 259 | 259 | foreach ($modules as $module) { |
| 260 | - $var = 'i18n_' . $module . '_' . $lang; |
|
| 260 | + $var = 'i18n_'.$module.'_'.$lang; |
|
| 261 | 261 | |
| 262 | 262 | if (empty($GLOBALS[$var])) { |
| 263 | 263 | charger_langue($lang, $module); |
| 264 | 264 | // surcharges persos -- on cherche |
| 265 | 265 | // (lang/)local_xx.php et/ou (lang/)local.php ... |
| 266 | - if (!isset($local['local_' . $lang])) { |
|
| 266 | + if (!isset($local['local_'.$lang])) { |
|
| 267 | 267 | // redéfinir la langue en cours pour les surcharges (chercher_langue a pu le changer) |
| 268 | 268 | $GLOBALS['idx_lang'] = $var; |
| 269 | 269 | // ... (lang/)local_xx.php |
| 270 | - $local['local_' . $lang] = chercher_module_lang('local', $lang); |
|
| 270 | + $local['local_'.$lang] = chercher_module_lang('local', $lang); |
|
| 271 | 271 | } |
| 272 | - if ($local['local_' . $lang]) { |
|
| 273 | - surcharger_langue($local['local_' . $lang]); |
|
| 272 | + if ($local['local_'.$lang]) { |
|
| 273 | + surcharger_langue($local['local_'.$lang]); |
|
| 274 | 274 | } |
| 275 | 275 | // ... puis (lang/)local.php |
| 276 | 276 | if (!isset($local['local'])) { |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | if (isset($GLOBALS[$var][$code])) { |
| 285 | 285 | $desc->code = $code; |
| 286 | 286 | $desc->module = $module; |
| 287 | - $desc->langue = $GLOBALS['lang_' . $var]; |
|
| 287 | + $desc->langue = $GLOBALS['lang_'.$var]; |
|
| 288 | 288 | $desc->texte = $GLOBALS[$var][$code]; |
| 289 | 289 | break; |
| 290 | 290 | } |
@@ -339,13 +339,13 @@ discard block |
||
| 339 | 339 | if (!$desc->mode and $desc->texte) { |
| 340 | 340 | // ne pas modifier 2 fois l'affichage |
| 341 | 341 | $desc->mode = 'traduction'; |
| 342 | - $classe = 'debug-traduction' . ($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 342 | + $classe = 'debug-traduction'.($desc->module == 'ecrire' ? '-prive' : ''); |
|
| 343 | 343 | $desc->texte = '<span ' |
| 344 | - . 'lang=' . $desc->langue |
|
| 345 | - . ' class=' . $classe |
|
| 346 | - . ' data-module=' . $desc->module |
|
| 347 | - . ' data-code=' . $desc->code |
|
| 348 | - . ' title=' . $modules . '(' . $desc->langue . ')>' |
|
| 344 | + . 'lang='.$desc->langue |
|
| 345 | + . ' class='.$classe |
|
| 346 | + . ' data-module='.$desc->module |
|
| 347 | + . ' data-code='.$desc->code |
|
| 348 | + . ' title='.$modules.'('.$desc->langue.')>' |
|
| 349 | 349 | . $desc->texte |
| 350 | 350 | . '</span>'; |
| 351 | 351 | $desc->texte = str_replace( |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | 'cpf_dom' => 'Kreyòl', |
| 51 | 51 | 'cpf_hat' => 'Kreyòl (Peyi Dayiti)', |
| 52 | 52 | 'cs' => 'čeština', |
| 53 | - 'cy' => 'Cymraeg', # welsh, gallois |
|
| 53 | + 'cy' => 'Cymraeg', # welsh, gallois |
|
| 54 | 54 | 'da' => 'dansk', |
| 55 | 55 | 'de' => 'Deutsch', |
| 56 | 56 | 'dz' => 'Bhutani', |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | 'hi' => 'हिंदी', |
| 93 | 93 | 'hr' => 'hrvatski', |
| 94 | 94 | 'hu' => 'magyar', |
| 95 | - 'hy' => 'Հայերեն',// Arménien |
|
| 95 | + 'hy' => 'Հայերեն', // Arménien |
|
| 96 | 96 | 'ia' => 'Interlingua', |
| 97 | 97 | 'id' => 'Indonesia', |
| 98 | 98 | 'ie' => 'Interlingue', |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | 'ka' => 'ქართული', |
| 107 | 107 | 'kk' => 'қазақ тілі', // Kazakh |
| 108 | 108 | 'kl' => 'kalaallisut', |
| 109 | - 'km' => 'ភាសាខ្មែរ',// Khmer |
|
| 109 | + 'km' => 'ភាសាខ្មែរ', // Khmer |
|
| 110 | 110 | 'kn' => 'Kannada', |
| 111 | 111 | 'ko' => '한국어', |
| 112 | 112 | 'kok' => 'कोंकणी', |
@@ -176,8 +176,8 @@ discard block |
||
| 176 | 176 | 'sh_latn' => 'srpskohrvastski', |
| 177 | 177 | 'sh_cyrl' => 'Српскохрватски', |
| 178 | 178 | 'si' => 'Sinhalese', |
| 179 | - 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | - 'sl' => 'slovenščina', // (Slovenia) |
|
| 179 | + 'sk' => 'slovenčina', // (Slovakia) |
|
| 180 | + 'sl' => 'slovenščina', // (Slovenia) |
|
| 181 | 181 | 'sm' => 'Samoan', |
| 182 | 182 | 'sn' => 'Shona', |
| 183 | 183 | 'so' => 'Somali', |