@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | $rejouer = (_SESSION_REJOUER === true) ? rejouer_session() : _SESSION_REJOUER; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - return $rejouer . (defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : ''); |
|
| 191 | + return $rejouer.(defined('_TESTER_NOSCRIPT') ? _TESTER_NOSCRIPT : ''); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
@@ -234,9 +234,9 @@ discard block |
||
| 234 | 234 | // |
| 235 | 235 | if ($vcs = version_vcs_courante(_DIR_RACINE, true)) { |
| 236 | 236 | if ($vcs['vcs'] === 'GIT') { |
| 237 | - $url = 'https://git.spip.net/spip/spip/commit/' . $vcs['commit']; |
|
| 237 | + $url = 'https://git.spip.net/spip/spip/commit/'.$vcs['commit']; |
|
| 238 | 238 | } elseif ($vcs['vcs'] === 'SVN') { |
| 239 | - $url = 'https://core.spip.net/projects/spip/repository/revisions/' . $vcs['commit']; |
|
| 239 | + $url = 'https://core.spip.net/projects/spip/repository/revisions/'.$vcs['commit']; |
|
| 240 | 240 | } else { |
| 241 | 241 | $url = ''; |
| 242 | 242 | } |
@@ -246,14 +246,14 @@ discard block |
||
| 246 | 246 | $commit = "<a href=\"$url\" target=\"_blank\" rel=\"noopener noreferrer\">$commit</a>"; |
| 247 | 247 | } |
| 248 | 248 | if ($vcs['branch']) { |
| 249 | - $commit = $vcs['branch'] . ': ' . $commit; |
|
| 249 | + $commit = $vcs['branch'].': '.$commit; |
|
| 250 | 250 | } |
| 251 | 251 | $version .= " {$vcs['vcs']} [$commit]"; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | 254 | // et la version de l'ecran de securite |
| 255 | 255 | $secu = defined('_ECRAN_SECURITE') |
| 256 | - ? '<br />' . _T('ecran_securite', ['version' => _ECRAN_SECURITE]) |
|
| 256 | + ? '<br />'._T('ecran_securite', ['version' => _ECRAN_SECURITE]) |
|
| 257 | 257 | : ''; |
| 258 | 258 | |
| 259 | 259 | return _T( |
@@ -261,10 +261,10 @@ discard block |
||
| 261 | 261 | [ |
| 262 | 262 | 'spip' => "<b>SPIP $version</b> ", |
| 263 | 263 | 'lien_gpl' => |
| 264 | - "<a href='" . generer_url_ecrire( |
|
| 264 | + "<a href='".generer_url_ecrire( |
|
| 265 | 265 | 'aide', |
| 266 | - 'aide=licence&var_lang=' . $GLOBALS['spip_lang'] |
|
| 267 | - ) . "' class=\"aide popin\">" . _T('info_copyright_gpl') . '</a>' |
|
| 266 | + 'aide=licence&var_lang='.$GLOBALS['spip_lang'] |
|
| 267 | + )."' class=\"aide popin\">"._T('info_copyright_gpl').'</a>' |
|
| 268 | 268 | ] |
| 269 | 269 | ) |
| 270 | 270 | . $secu; |
@@ -291,8 +291,8 @@ discard block |
||
| 291 | 291 | $onfocus = ''; |
| 292 | 292 | } |
| 293 | 293 | |
| 294 | - $form = '<input type="text" size="10" value="' . $recherche_aff . '" name="recherche" class="recherche" accesskey="r"' . $onfocus . ' />'; |
|
| 295 | - $form .= "<input type='image' src='" . chemin_image('rechercher-20.png') . "' name='submit' class='submit' alt='" . _T('info_rechercher') . "' />"; |
|
| 294 | + $form = '<input type="text" size="10" value="'.$recherche_aff.'" name="recherche" class="recherche" accesskey="r"'.$onfocus.' />'; |
|
| 295 | + $form .= "<input type='image' src='".chemin_image('rechercher-20.png')."' name='submit' class='submit' alt='"._T('info_rechercher')."' />"; |
|
| 296 | 296 | |
| 297 | - return "<div class='spip_recherche'>" . generer_form_ecrire($page, $form . $complement, " method='get'") . '</div>'; |
|
| 297 | + return "<div class='spip_recherche'>".generer_form_ecrire($page, $form.$complement, " method='get'").'</div>'; |
|
| 298 | 298 | } |
@@ -102,8 +102,8 @@ discard block |
||
| 102 | 102 | && autoriser('onglet', "_$id") |
| 103 | 103 | ) { |
| 104 | 104 | $onglets[$id] = new Bouton( |
| 105 | - isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 106 | - $infos['titre'], // titre |
|
| 105 | + isset($infos['icone']) ? find_in_theme($infos['icone']) : '', // icone |
|
| 106 | + $infos['titre'], // titre |
|
| 107 | 107 | (isset($infos['action']) and $infos['action']) |
| 108 | 108 | ? generer_url_ecrire( |
| 109 | 109 | $infos['action'], |
@@ -142,5 +142,5 @@ discard block |
||
| 142 | 142 | $res .= onglet(_T($onglet->libelle), $url, $exec, $ongletCourant, $onglet->icone); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - return !$res ? '' : (debut_onglet($class) . $res . fin_onglet()); |
|
| 145 | + return !$res ? '' : (debut_onglet($class).$res.fin_onglet()); |
|
| 146 | 146 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $texte = $x . $texte; |
|
| 68 | + $texte = $x.$texte; |
|
| 69 | 69 | |
| 70 | 70 | return $texte; |
| 71 | 71 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | || ($pos = 0); |
| 180 | 180 | |
| 181 | 181 | if (false === strpos(substr($texte, 0, $pos), '<!-- insert_head -->')) { |
| 182 | - $insert = "\n" . pipeline('insert_head', '<!-- f_insert_head -->') . "\n"; |
|
| 182 | + $insert = "\n".pipeline('insert_head', '<!-- f_insert_head -->')."\n"; |
|
| 183 | 183 | $texte = substr_replace($texte, $insert, $pos, 0); |
| 184 | 184 | } |
| 185 | 185 | |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | $texte = substr_replace($texte, $x, $pos, 0); |
| 213 | 213 | // pas de preview en fenetre enfant |
| 214 | - $x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='" . addslashes($GLOBALS['meta']['adresse_site']) . "';}</script>"; |
|
| 214 | + $x = "<script type='text/javascript'>const frameEl = window.frameElement;if (frameEl) {frameEl.sandbox='sandbox';window.location.href='".addslashes($GLOBALS['meta']['adresse_site'])."';}</script>"; |
|
| 215 | 215 | if (!$pos = stripos($texte, '<head') or !$pos = strpos($texte, '>', $pos)) { |
| 216 | 216 | $pos = -1; |
| 217 | 217 | } |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | // inserer avant le </body> fermant si on peut, a la fin de la page sinon |
| 284 | 284 | if (($p = strpos($texte, '</body>')) !== false) { |
| 285 | - $texte = substr($texte, 0, $p) . $code . substr($texte, $p); |
|
| 285 | + $texte = substr($texte, 0, $p).$code.substr($texte, $p); |
|
| 286 | 286 | } else { |
| 287 | 287 | $texte .= $code; |
| 288 | 288 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $_id_table = reset($_id_table); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | - $requete['SELECT'][] = 't.' . $_id_table; |
|
| 70 | + $requete['SELECT'][] = 't.'.$_id_table; |
|
| 71 | 71 | $a = []; |
| 72 | 72 | // Recherche fulltext |
| 73 | 73 | foreach ($champs as $champ => $poids) { |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | $champ = "t.$champ"; |
| 79 | 79 | } |
| 80 | 80 | $requete['SELECT'][] = $champ; |
| 81 | - $a[] = $champ . ' ' . $methode . ' ' . $q; |
|
| 81 | + $a[] = $champ.' '.$methode.' '.$q; |
|
| 82 | 82 | } |
| 83 | 83 | } |
| 84 | 84 | if ($a) { |
| 85 | 85 | $requete['WHERE'][] = join(' OR ', $a); |
| 86 | 86 | } |
| 87 | - $requete['FROM'][] = table_objet_sql($table) . ' AS t'; |
|
| 87 | + $requete['FROM'][] = table_objet_sql($table).' AS t'; |
|
| 88 | 88 | |
| 89 | 89 | $results = []; |
| 90 | 90 | |
@@ -252,8 +252,8 @@ discard block |
||
| 252 | 252 | ); |
| 253 | 253 | } // cas table de liaison generique spip_xxx_yyy |
| 254 | 254 | elseif ( |
| 255 | - $t = $trouver_table($table_arrivee . '_' . $table_depart, $serveur) |
|
| 256 | - or $t = $trouver_table($table_depart . '_' . $table_arrivee, $serveur) |
|
| 255 | + $t = $trouver_table($table_arrivee.'_'.$table_depart, $serveur) |
|
| 256 | + or $t = $trouver_table($table_depart.'_'.$table_arrivee, $serveur) |
|
| 257 | 257 | ) { |
| 258 | 258 | $s = sql_select( |
| 259 | 259 | "$cle_depart,$cle_arrivee", |
@@ -292,12 +292,12 @@ discard block |
||
| 292 | 292 | } |
| 293 | 293 | if (isset($joint['champs']) and $joint['champs']) { |
| 294 | 294 | foreach ($joint['champs'] as $c => $val) { |
| 295 | - $results[$id]['champs'][$table_liee . '.' . $c] = $val; |
|
| 295 | + $results[$id]['champs'][$table_liee.'.'.$c] = $val; |
|
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | 298 | if (isset($joint['matches']) and $joint['matches']) { |
| 299 | 299 | foreach ($joint['matches'] as $c => $val) { |
| 300 | - $results[$id]['matches'][$table_liee . '.' . $c] = $val; |
|
| 300 | + $results[$id]['matches'][$table_liee.'.'.$c] = $val; |
|
| 301 | 301 | } |
| 302 | 302 | } |
| 303 | 303 | } |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | $dir = 'images/'; |
| 49 | 49 | $f = "$type-$size.png"; |
| 50 | - if ($icone = find_in_theme($dir . $f)) { |
|
| 50 | + if ($icone = find_in_theme($dir.$f)) { |
|
| 51 | 51 | $dir = dirname($icone); |
| 52 | 52 | $fond = $icone; |
| 53 | 53 | |
| 54 | 54 | if ( |
| 55 | 55 | $rtl |
| 56 | - and $fr = $dir . '/' . str_replace("$type-", "$type-rtl-", basename($icone)) |
|
| 56 | + and $fr = $dir.'/'.str_replace("$type-", "$type-rtl-", basename($icone)) |
|
| 57 | 57 | and file_exists($fr) |
| 58 | 58 | ) { |
| 59 | 59 | $fond = $fr; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | $fonction = ''; |
| 72 | - if (in_array($action, ['add','del', 'new', 'edit', 'config'])) { |
|
| 72 | + if (in_array($action, ['add', 'del', 'new', 'edit', 'config'])) { |
|
| 73 | 73 | $fonction = $action; |
| 74 | 74 | } |
| 75 | 75 | |
@@ -82,12 +82,12 @@ discard block |
||
| 82 | 82 | $where_resultat_recent = sql_date_proche('maj', (0 - ($delai_fraicheur + 100)), ' SECOND'); |
| 83 | 83 | if (!isset($cache[$serveur][$table][$recherche])) { |
| 84 | 84 | $hash_serv = ($serveur ? substr(md5($serveur), 0, 16) : ''); |
| 85 | - $hash = substr(md5($recherche . $table), 0, 16); |
|
| 86 | - $where = "(resultats.recherche='$hash' AND resultats.table_objet=" . sql_quote($table) . " AND resultats.serveur='$hash_serv')"; |
|
| 85 | + $hash = substr(md5($recherche.$table), 0, 16); |
|
| 86 | + $where = "(resultats.recherche='$hash' AND resultats.table_objet=".sql_quote($table)." AND resultats.serveur='$hash_serv')"; |
|
| 87 | 87 | $row = sql_fetsel( |
| 88 | 88 | 'recherche', |
| 89 | 89 | 'spip_resultats AS resultats', |
| 90 | - $where . " AND $where_resultat_recent", |
|
| 90 | + $where." AND $where_resultat_recent", |
|
| 91 | 91 | '', |
| 92 | 92 | '', |
| 93 | 93 | '0,1' |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | foreach ($listes_ids as $p => $ids) { |
| 199 | - $select .= "+$p*(" . |
|
| 199 | + $select .= "+$p*(". |
|
| 200 | 200 | sql_in("$table.$primary", $ids, '', $serveur) |
| 201 | 201 | . ') '; |
| 202 | 202 | } |
@@ -46,12 +46,12 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | $fond = "prive/objets/liste/$vue"; |
| 49 | - if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 49 | + if (!find_in_path($fond.'.'._EXTENSION_SQUELETTES)) { |
|
| 50 | 50 | // traiter les cas particuliers |
| 51 | 51 | include_spip('base/connect_sql'); |
| 52 | 52 | $vue = table_objet($vue); |
| 53 | 53 | $fond = "prive/objets/liste/$vue"; |
| 54 | - if (!find_in_path($fond . '.' . _EXTENSION_SQUELETTES)) { |
|
| 54 | + if (!find_in_path($fond.'.'._EXTENSION_SQUELETTES)) { |
|
| 55 | 55 | return _L("vue $vue introuvable pour lister les objets"); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -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; |
@@ -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 | } |