@@ -75,11 +75,11 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | function objet_modifier($objet, $id, $set = null) { |
| 77 | 77 | if (($t = objet_type($objet)) !== $objet) { |
| 78 | - spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 78 | + spip_log("objet_modifier: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE); |
|
| 79 | 79 | $objet = $t; |
| 80 | 80 | } |
| 81 | 81 | if ( |
| 82 | - include_spip('action/editer_' . $objet) && function_exists($modifier = $objet . '_modifier') |
|
| 82 | + include_spip('action/editer_'.$objet) && function_exists($modifier = $objet.'_modifier') |
|
| 83 | 83 | ) { |
| 84 | 84 | return $modifier($id, $set); |
| 85 | 85 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $trouver_table = charger_fonction('trouver_table', 'base'); |
| 89 | 89 | $desc = $trouver_table($table_sql); |
| 90 | 90 | if (!$desc || !isset($desc['field'])) { |
| 91 | - spip_log("Objet $objet inconnu dans objet_modifier", 'editer' . _LOG_ERREUR); |
|
| 91 | + spip_log("Objet $objet inconnu dans objet_modifier", 'editer'._LOG_ERREUR); |
|
| 92 | 92 | |
| 93 | 93 | return _L("Erreur objet $objet inconnu"); |
| 94 | 94 | } |
@@ -167,12 +167,12 @@ discard block |
||
| 167 | 167 | function objet_inserer($objet, $id_parent = null, $set = null) { |
| 168 | 168 | $d = null; |
| 169 | 169 | if (($t = objet_type($objet)) !== $objet) { |
| 170 | - spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 170 | + spip_log("objet_inserer: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE); |
|
| 171 | 171 | $objet = $t; |
| 172 | 172 | } |
| 173 | 173 | if ( |
| 174 | - include_spip('action/editer_' . $objet) |
|
| 175 | - && function_exists($inserer = $objet . '_inserer') |
|
| 174 | + include_spip('action/editer_'.$objet) |
|
| 175 | + && function_exists($inserer = $objet.'_inserer') |
|
| 176 | 176 | ) { |
| 177 | 177 | return $inserer($id_parent, $set); |
| 178 | 178 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $row = sql_fetsel('id_rubrique, id_secteur, lang', 'spip_rubriques', 'id_parent=0', '', '0+titre,titre', '1'); |
| 194 | 194 | $id_rubrique = $row['id_rubrique']; |
| 195 | 195 | } else { |
| 196 | - $row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique=' . (int) $id_rubrique); |
|
| 196 | + $row = sql_fetsel('lang, id_secteur', 'spip_rubriques', 'id_rubrique='.(int) $id_rubrique); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | $champs['id_rubrique'] = $id_rubrique; |
@@ -330,11 +330,11 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | function objet_instituer($objet, $id, $c, $calcul_rub = true) { |
| 332 | 332 | if (($t = objet_type($objet)) !== $objet) { |
| 333 | - spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 333 | + spip_log("objet_instituer: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE); |
|
| 334 | 334 | $objet = $t; |
| 335 | 335 | } |
| 336 | 336 | if ( |
| 337 | - include_spip('action/editer_' . $objet) && function_exists($instituer = $objet . '_instituer') |
|
| 337 | + include_spip('action/editer_'.$objet) && function_exists($instituer = $objet.'_instituer') |
|
| 338 | 338 | ) { |
| 339 | 339 | return $instituer($id, $c, $calcul_rub); |
| 340 | 340 | } |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | $sel[] = ($champ_date ? "$champ_date as date" : "'' as date"); |
| 364 | 364 | $sel[] = (isset($desc['field']['id_rubrique']) ? 'id_rubrique' : '0 as id_rubrique'); |
| 365 | 365 | |
| 366 | - $row = sql_fetsel($sel, $table_sql, id_table_objet($objet) . '=' . (int) $id); |
|
| 366 | + $row = sql_fetsel($sel, $table_sql, id_table_objet($objet).'='.(int) $id); |
|
| 367 | 367 | |
| 368 | 368 | $id_rubrique = $row['id_rubrique']; |
| 369 | 369 | $statut_ancien = $statut = $row['statut']; |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | if ($s != 'publie' && autoriser('modifier', $objet, $id)) { |
| 387 | 387 | $statut = $champs['statut'] = $s; |
| 388 | 388 | } else { |
| 389 | - spip_log("editer_objet $objet #$id refus " . json_encode($c, JSON_THROW_ON_ERROR), 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 389 | + spip_log("editer_objet $objet #$id refus ".json_encode($c, JSON_THROW_ON_ERROR), 'editer'._LOG_INFO_IMPORTANTE); |
|
| 390 | 390 | } |
| 391 | 391 | } |
| 392 | 392 | |
@@ -414,7 +414,7 @@ discard block |
||
| 414 | 414 | && isset($c['id_parent']) |
| 415 | 415 | && ($id_parent = $c['id_parent']) |
| 416 | 416 | && $id_parent != $id_rubrique |
| 417 | - && sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . (int) $id_parent) |
|
| 417 | + && sql_fetsel('1', 'spip_rubriques', 'id_rubrique='.(int) $id_parent) |
|
| 418 | 418 | ) { |
| 419 | 419 | $champs['id_rubrique'] = $id_parent; |
| 420 | 420 | |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | // Si on deplace l'objet |
| 542 | 542 | // changer aussi son secteur et sa langue (si heritee) |
| 543 | 543 | if (isset($champs['id_rubrique'])) { |
| 544 | - $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique'])); |
|
| 544 | + $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique='.sql_quote($champs['id_rubrique'])); |
|
| 545 | 545 | $langue = $row_rub['lang']; |
| 546 | 546 | |
| 547 | 547 | if (isset($desc['field']['id_secteur'])) { |
@@ -554,7 +554,7 @@ discard block |
||
| 554 | 554 | && sql_fetsel( |
| 555 | 555 | '1', |
| 556 | 556 | $table_sql, |
| 557 | - id_table_objet($objet) . '=' . (int) $id . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue) |
|
| 557 | + id_table_objet($objet).'='.(int) $id." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue) |
|
| 558 | 558 | ) |
| 559 | 559 | ) { |
| 560 | 560 | $champs['lang'] = $langue; |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | if (!$champs) { |
| 565 | 565 | return; |
| 566 | 566 | } |
| 567 | - sql_updateq($table_sql, $champs, id_table_objet($objet) . '=' . (int) $id); |
|
| 567 | + sql_updateq($table_sql, $champs, id_table_objet($objet).'='.(int) $id); |
|
| 568 | 568 | |
| 569 | 569 | // Changer le statut des rubriques concernees |
| 570 | 570 | if ($cond) { |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | */ |
| 609 | 609 | function objet_lire($objet, $valeur_id, $options = []) { |
| 610 | 610 | if (($t = objet_type($objet)) !== $objet) { |
| 611 | - spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer' . _LOG_INFO_IMPORTANTE); |
|
| 611 | + spip_log("objet_lire: appel avec type $objet invalide au lieu de $t", 'editer'._LOG_INFO_IMPORTANTE); |
|
| 612 | 612 | $objet = $t; |
| 613 | 613 | } |
| 614 | 614 | |
@@ -630,7 +630,7 @@ discard block |
||
| 630 | 630 | ) { |
| 631 | 631 | // Il est possible pour un type d'objet de fournir une fonction de lecture de tous les champs d'un objet. |
| 632 | 632 | if ( |
| 633 | - include_spip('action/editer_' . $objet) |
|
| 633 | + include_spip('action/editer_'.$objet) |
|
| 634 | 634 | && function_exists($lire = "{$objet}_lire_champs") |
| 635 | 635 | ) { |
| 636 | 636 | $valeurs = $lire($objet, $valeur_id, $champ_id); |
@@ -640,7 +640,7 @@ discard block |
||
| 640 | 640 | |
| 641 | 641 | // La condition est appliquée sur le champ désigné par l'utilisateur. |
| 642 | 642 | $where = [ |
| 643 | - $champ_id . '=' . sql_quote($valeur_id) |
|
| 643 | + $champ_id.'='.sql_quote($valeur_id) |
|
| 644 | 644 | ]; |
| 645 | 645 | |
| 646 | 646 | // Acquisition de tous les champs de l'objet : si l'accès SQL retourne une erreur on renvoie un tableau vide. |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | ($redirect = _request('redirect')) && !$arg == sql_getfetsel( |
| 42 | 42 | 'email', |
| 43 | 43 | 'spip_auteurs', |
| 44 | - 'id_auteur=' . (int) $GLOBALS['visiteur_session'] |
|
| 44 | + 'id_auteur='.(int) $GLOBALS['visiteur_session'] |
|
| 45 | 45 | ) |
| 46 | 46 | ) { |
| 47 | 47 | $GLOBALS['redirect'] = parametre_url($redirect, 'email_modif', ''); |
@@ -42,16 +42,16 @@ |
||
| 42 | 42 | 'ecrire:taille_cache_image', |
| 43 | 43 | [ |
| 44 | 44 | 'dir' => joli_repertoire(_DIR_VAR), |
| 45 | - 'taille' => '<b>' . (taille_en_octets($taille) > 0 ? taille_en_octets($taille) : '0 octet') . '</b>' |
|
| 45 | + 'taille' => '<b>'.(taille_en_octets($taille) > 0 ? taille_en_octets($taille) : '0 octet').'</b>' |
|
| 46 | 46 | ] |
| 47 | 47 | ); |
| 48 | 48 | } else { |
| 49 | 49 | include_spip('inc/invalideur'); |
| 50 | 50 | $taille = |
| 51 | 51 | calculer_taille_dossier(_DIR_CACHE_XML) |
| 52 | - + calculer_taille_dossier(_DIR_CACHE . 'skel/') |
|
| 53 | - + calculer_taille_dossier(_DIR_CACHE . 'wheels/') |
|
| 54 | - + calculer_taille_dossier(_DIR_CACHE . 'contextes/'); |
|
| 52 | + + calculer_taille_dossier(_DIR_CACHE.'skel/') |
|
| 53 | + + calculer_taille_dossier(_DIR_CACHE.'wheels/') |
|
| 54 | + + calculer_taille_dossier(_DIR_CACHE.'contextes/'); |
|
| 55 | 55 | $taille += (int) taille_du_cache(); |
| 56 | 56 | if ($taille <= 150000) { |
| 57 | 57 | $res = _T('taille_cache_vide'); |
@@ -38,12 +38,12 @@ discard block |
||
| 38 | 38 | // on renvoi un 401 qui fait echouer la requete ajax silencieusement |
| 39 | 39 | if (!autoriser('ecrire')) { |
| 40 | 40 | $retour = |
| 41 | - '<ul class="deroulant__sous-menu" data-profondeur="1">' . |
|
| 42 | - '<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">' . |
|
| 43 | - '<a class="deroulant__lien" href="' . generer_url_ecrire('accueil') . '" data-profondeur="1">' . |
|
| 44 | - '<span class="libelle">' . _T('public:lien_connecter') . '</span>' . |
|
| 45 | - '</a>' . |
|
| 46 | - '</li>' . |
|
| 41 | + '<ul class="deroulant__sous-menu" data-profondeur="1">'. |
|
| 42 | + '<li class="deroulant__item deroulant__item_plan plan_site" data-profondeur="1">'. |
|
| 43 | + '<a class="deroulant__lien" href="'.generer_url_ecrire('accueil').'" data-profondeur="1">'. |
|
| 44 | + '<span class="libelle">'._T('public:lien_connecter').'</span>'. |
|
| 45 | + '</a>'. |
|
| 46 | + '</li>'. |
|
| 47 | 47 | '</ul>'; |
| 48 | 48 | include_spip('inc/actions'); |
| 49 | 49 | ajax_retour($retour); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ($date = (int) _request('date')) { |
| 54 | - header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $date) . ' GMT'); |
|
| 54 | + header('Last-Modified: '.gmdate('D, d M Y H:i:s', $date).' GMT'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | $r = gen_liste_rubriques(); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | && !strstr((string) $_SERVER['SERVER_SOFTWARE'], 'IIS/') |
| 62 | 62 | ) { |
| 63 | 63 | include_spip('inc/headers'); |
| 64 | - header('Content-Type: text/html; charset=' . $GLOBALS['meta']['charset']); |
|
| 64 | + header('Content-Type: text/html; charset='.$GLOBALS['meta']['charset']); |
|
| 65 | 65 | http_response_code(304); |
| 66 | 66 | exit; |
| 67 | 67 | } else { |
@@ -84,8 +84,8 @@ discard block |
||
| 84 | 84 | **/ |
| 85 | 85 | function menu_rubriques($complet = true) { |
| 86 | 86 | $ret = '<li class="deroulant__item deroulant__item_tout toutsite" data-profondeur="1">' |
| 87 | - . '<a class="deroulant__lien" href="' . generer_url_ecrire('plan') . '" data-profondeur="1">' |
|
| 88 | - . '<span class="libelle">' . _T('info_tout_site') . '</span>' |
|
| 87 | + . '<a class="deroulant__lien" href="'.generer_url_ecrire('plan').'" data-profondeur="1">' |
|
| 88 | + . '<span class="libelle">'._T('info_tout_site').'</span>' |
|
| 89 | 89 | . '</a>' |
| 90 | 90 | . '</li>'; |
| 91 | 91 | |
@@ -144,8 +144,8 @@ discard block |
||
| 144 | 144 | static $zmax = 6; |
| 145 | 145 | $profondeur_next = $profondeur + 1; |
| 146 | 146 | |
| 147 | - $nav = '<a class="deroulant__lien" href="' . generer_objet_url($id_rubrique, 'rubrique', '', '', false) . "\" data-profondeur=\"$profondeur\">" |
|
| 148 | - . '<span class="libelle">' . supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)) . '</span>' |
|
| 147 | + $nav = '<a class="deroulant__lien" href="'.generer_objet_url($id_rubrique, 'rubrique', '', '', false)."\" data-profondeur=\"$profondeur\">" |
|
| 148 | + . '<span class="libelle">'.supprimer_tags(preg_replace(',[\x00-\x1f]+,', ' ', $titre_rubrique)).'</span>' |
|
| 149 | 149 | . "</a>\n"; |
| 150 | 150 | |
| 151 | 151 | // Limiter volontairement le nombre de sous-menus |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | $zmax++; |
| 183 | 183 | |
| 184 | - return $ret . "</ul></li>\n"; |
|
| 184 | + return $ret."</ul></li>\n"; |
|
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | ); |
| 105 | 105 | |
| 106 | 106 | // Si l'article est publie, invalider les caches et demander sa reindexation |
| 107 | - $t = sql_getfetsel('statut', 'spip_articles', 'id_article=' . (int) $id_article); |
|
| 107 | + $t = sql_getfetsel('statut', 'spip_articles', 'id_article='.(int) $id_article); |
|
| 108 | 108 | $invalideur = $indexation = false; |
| 109 | 109 | if ($t == 'publie') { |
| 110 | 110 | $invalideur = "id='article/$id_article'"; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $id_article, |
| 118 | 118 | [ |
| 119 | 119 | 'data' => $set, |
| 120 | - 'nonvide' => ['titre' => _T('info_nouvel_article') . ' ' . _T('info_numero_abbreviation') . $id_article], |
|
| 120 | + 'nonvide' => ['titre' => _T('info_nouvel_article').' '._T('info_numero_abbreviation').$id_article], |
|
| 121 | 121 | 'invalideur' => $invalideur, |
| 122 | 122 | 'indexation' => $indexation, |
| 123 | 123 | 'date_modif' => 'date_modif' // champ a mettre a date('Y-m-d H:i:s') s'il y a modif |
@@ -328,7 +328,7 @@ discard block |
||
| 328 | 328 | } elseif (autoriser('modifier', 'article', $id_article) && $s != 'publie') { |
| 329 | 329 | $statut = $champs['statut'] = $s; |
| 330 | 330 | } else { |
| 331 | - spip_log("editer_article $id_article refus " . implode(' ', $c)); |
|
| 331 | + spip_log("editer_article $id_article refus ".implode(' ', $c)); |
|
| 332 | 332 | } |
| 333 | 333 | |
| 334 | 334 | // En cas de publication, fixer la date a "maintenant" |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | isset($c['id_parent']) |
| 352 | 352 | && ($id_parent = $c['id_parent']) |
| 353 | 353 | && $id_parent != $id_rubrique |
| 354 | - && sql_fetsel('1', 'spip_rubriques', 'id_rubrique=' . (int) $id_parent) |
|
| 354 | + && sql_fetsel('1', 'spip_rubriques', 'id_rubrique='.(int) $id_parent) |
|
| 355 | 355 | ) { |
| 356 | 356 | $champs['id_rubrique'] = $id_parent; |
| 357 | 357 | |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | // Si on deplace l'article |
| 481 | 481 | // changer aussi son secteur et sa langue (si heritee) |
| 482 | 482 | if (isset($champs['id_rubrique'])) { |
| 483 | - $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique=' . sql_quote($champs['id_rubrique'])); |
|
| 483 | + $row_rub = sql_fetsel('id_secteur, lang', 'spip_rubriques', 'id_rubrique='.sql_quote($champs['id_rubrique'])); |
|
| 484 | 484 | |
| 485 | 485 | $langue = $row_rub['lang']; |
| 486 | 486 | $champs['id_secteur'] = $row_rub['id_secteur']; |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | sql_fetsel( |
| 489 | 489 | '1', |
| 490 | 490 | 'spip_articles', |
| 491 | - 'id_article=' . (int) $id_article . " AND langue_choisie<>'oui' AND lang<>" . sql_quote($langue) |
|
| 491 | + 'id_article='.(int) $id_article." AND langue_choisie<>'oui' AND lang<>".sql_quote($langue) |
|
| 492 | 492 | ) |
| 493 | 493 | ) { |
| 494 | 494 | $champs['lang'] = $langue; |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | return; |
| 500 | 500 | } |
| 501 | 501 | |
| 502 | - sql_updateq('spip_articles', $champs, 'id_article=' . (int) $id_article); |
|
| 502 | + sql_updateq('spip_articles', $champs, 'id_article='.(int) $id_article); |
|
| 503 | 503 | |
| 504 | 504 | // Changer le statut des rubriques concernees |
| 505 | 505 | |
@@ -520,6 +520,6 @@ discard block |
||
| 520 | 520 | foreach ($plus as $n => $t) { |
| 521 | 521 | $plus[$n] = preg_replace(",<!--SPIP-->[\n\r]*,", '', (string) $t); |
| 522 | 522 | } |
| 523 | - set_request('texte', implode('', $plus) . _request('texte')); |
|
| 523 | + set_request('texte', implode('', $plus)._request('texte')); |
|
| 524 | 524 | } |
| 525 | 525 | } |
@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | // recuperer les plugins dans l'ordre des $_POST |
| 32 | 32 | $test = []; |
| 33 | 33 | foreach (liste_plugin_files() as $file) { |
| 34 | - $test['s' . substr(md5(_DIR_PLUGINS . $file), 0, 16)] = $file; |
|
| 34 | + $test['s'.substr(md5(_DIR_PLUGINS.$file), 0, 16)] = $file; |
|
| 35 | 35 | } |
| 36 | 36 | if (defined('_DIR_PLUGINS_SUPPL')) { |
| 37 | 37 | foreach (liste_plugin_files(_DIR_PLUGINS_SUPPL) as $file) { |
| 38 | - $test['s' . substr(md5(_DIR_PLUGINS_SUPPL . $file), 0, 16)] = $file; |
|
| 38 | + $test['s'.substr(md5(_DIR_PLUGINS_SUPPL.$file), 0, 16)] = $file; |
|
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | - spip_log("Changement des plugins actifs par l'auteur " . $GLOBALS['visiteur_session']['id_auteur'] . ': ' . implode( |
|
| 50 | + spip_log("Changement des plugins actifs par l'auteur ".$GLOBALS['visiteur_session']['id_auteur'].': '.implode( |
|
| 51 | 51 | ',', |
| 52 | 52 | $plugin |
| 53 | 53 | )); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | if ($change_session == 'oui') { |
| 59 | 59 | $session = charger_fonction('session', 'inc'); |
| 60 | 60 | $session(true); |
| 61 | - spip_log('statut 204 pour ' . $_SERVER['REQUEST_URI']); |
|
| 61 | + spip_log('statut 204 pour '.$_SERVER['REQUEST_URI']); |
|
| 62 | 62 | http_response_code(204); // No Content |
| 63 | 63 | return; |
| 64 | 64 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | _T('info_connexion_refusee'), |
| 79 | 79 | _T('login_login_pass_incorrect'), |
| 80 | 80 | _T('login_retour_site'), |
| 81 | - 'url=' . rawurlencode((string) $redirect), |
|
| 81 | + 'url='.rawurlencode((string) $redirect), |
|
| 82 | 82 | _T('login_nouvelle_tentative'), |
| 83 | 83 | (str_contains((string) $url, (string) _DIR_RESTREINT_ABS)) |
| 84 | 84 | ); |
@@ -48,15 +48,15 @@ discard block |
||
| 48 | 48 | // Correction Create Database |
| 49 | 49 | // Create Database -> requete ignoree |
| 50 | 50 | if (str_starts_with((string) $this->query, 'CREATE DATABASE')) { |
| 51 | - spip_log("Sqlite : requete non executee -> $this->query", 'sqlite.' . _LOG_AVERTISSEMENT); |
|
| 51 | + spip_log("Sqlite : requete non executee -> $this->query", 'sqlite.'._LOG_AVERTISSEMENT); |
|
| 52 | 52 | $this->query = 'SELECT 1'; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | // Correction Insert Ignore |
| 56 | 56 | // INSERT IGNORE -> insert (tout court et pas 'insert or replace') |
| 57 | 57 | if (str_starts_with((string) $this->query, 'INSERT IGNORE')) { |
| 58 | - spip_log("Sqlite : requete transformee -> $this->query", 'sqlite.' . _LOG_DEBUG); |
|
| 59 | - $this->query = 'INSERT ' . substr((string) $this->query, '13'); |
|
| 58 | + spip_log("Sqlite : requete transformee -> $this->query", 'sqlite.'._LOG_DEBUG); |
|
| 59 | + $this->query = 'INSERT '.substr((string) $this->query, '13'); |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | // Correction des dates avec INTERVAL |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | if (($this->sqlite_version == 2) && (str_contains((string) $this->query, 'USING'))) { |
| 85 | 85 | spip_log( |
| 86 | 86 | "'USING (champ)' n'est pas reconnu en SQLite 2. Utilisez 'ON table1.champ = table2.champ'", |
| 87 | - 'sqlite.' . _LOG_ERREUR |
|
| 87 | + 'sqlite.'._LOG_ERREUR |
|
| 88 | 88 | ); |
| 89 | 89 | $this->query = preg_replace('/USING\s*\([^\)]*\)/', '', (string) $this->query); |
| 90 | 90 | } |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | } else { |
| 108 | 108 | $suite = ''; |
| 109 | 109 | } |
| 110 | - $pref = ($this->prefixe) ? $this->prefixe . '_' : ''; |
|
| 111 | - $this->query = preg_replace('/([,\s])spip_/S', '\1' . $pref, (string) $this->query) . $suite; |
|
| 110 | + $pref = ($this->prefixe) ? $this->prefixe.'_' : ''; |
|
| 111 | + $this->query = preg_replace('/([,\s])spip_/S', '\1'.$pref, (string) $this->query).$suite; |
|
| 112 | 112 | |
| 113 | 113 | // Correction zero AS x |
| 114 | 114 | // pg n'aime pas 0+x AS alias, sqlite, dans le meme style, |
@@ -65,17 +65,17 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $page_title = ($options['page_title'] ?? $GLOBALS['meta']['nom_site']); |
| 67 | 67 | $doctype = ($options['doctype'] ?? '<!DOCTYPE html>'); |
| 68 | - $doctype = trim((string) $doctype) . "\n"; |
|
| 68 | + $doctype = trim((string) $doctype)."\n"; |
|
| 69 | 69 | $charset = ($options['charset'] ?? 'utf-8'); |
| 70 | 70 | $all_inline = ($options['all_inline'] ?? true); |
| 71 | 71 | $onLoad = ($options['onLoad'] ?? ''); |
| 72 | 72 | if ($onLoad) { |
| 73 | - $onLoad = ' onload="' . attribut_html($onLoad) . '"'; |
|
| 73 | + $onLoad = ' onload="'.attribut_html($onLoad).'"'; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | # envoyer le charset |
| 77 | 77 | if (!headers_sent()) { |
| 78 | - header('Content-Type: text/html; charset=' . $charset); |
|
| 78 | + header('Content-Type: text/html; charset='.$charset); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $css = ''; |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | . "--minipage-color-theme--s: $s;" |
| 95 | 95 | . "--minipage-color-theme--l: $l;}"; |
| 96 | 96 | $vars = file_get_contents(find_in_theme('minipage.vars.css')); |
| 97 | - $inline .= "\n" . trim($vars); |
|
| 97 | + $inline .= "\n".trim($vars); |
|
| 98 | 98 | if (function_exists('minifier')) { |
| 99 | 99 | $inline = minifier($inline, 'css'); |
| 100 | 100 | } |
@@ -121,31 +121,31 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | $css = "$inline\n$css"; |
| 123 | 123 | if (!empty($options['css'])) { |
| 124 | - $css .= "\n" . $options['css']; |
|
| 124 | + $css .= "\n".$options['css']; |
|
| 125 | 125 | } |
| 126 | 126 | $css = "<style type='text/css'>$css</style>"; |
| 127 | 127 | } else { |
| 128 | 128 | $css = "<style type='text/css'>$inline</style>"; |
| 129 | 129 | foreach ($files as $name) { |
| 130 | 130 | $file = timestamp(direction_css($name)); |
| 131 | - $css .= "<link rel='stylesheet' href='" . attribut_html($file) . "' type='text/css' />\n"; |
|
| 131 | + $css .= "<link rel='stylesheet' href='".attribut_html($file)."' type='text/css' />\n"; |
|
| 132 | 132 | } |
| 133 | 133 | if (!empty($options['css'])) { |
| 134 | - $css .= "<style type='text/css'>" . $options['css'] . '</style>'; |
|
| 134 | + $css .= "<style type='text/css'>".$options['css'].'</style>'; |
|
| 135 | 135 | } |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | - return $doctype . |
|
| 139 | - html_lang_attributes() . |
|
| 140 | - "<head>\n" . |
|
| 141 | - '<title>' . |
|
| 142 | - textebrut($page_title) . |
|
| 143 | - "</title>\n" . |
|
| 144 | - "<meta name=\"viewport\" content=\"width=device-width\" />\n" . |
|
| 145 | - $css . |
|
| 146 | - (empty($options['head']) ? '' : $options['head']) . |
|
| 147 | - "</head>\n" . |
|
| 148 | - "<body{$onLoad} class=\"minipage" . ($this::TYPE ? ' minipage--' . $this::TYPE : '') . "\">\n" . |
|
| 138 | + return $doctype. |
|
| 139 | + html_lang_attributes(). |
|
| 140 | + "<head>\n". |
|
| 141 | + '<title>'. |
|
| 142 | + textebrut($page_title). |
|
| 143 | + "</title>\n". |
|
| 144 | + "<meta name=\"viewport\" content=\"width=device-width\" />\n". |
|
| 145 | + $css. |
|
| 146 | + (empty($options['head']) ? '' : $options['head']). |
|
| 147 | + "</head>\n". |
|
| 148 | + "<body{$onLoad} class=\"minipage".($this::TYPE ? ' minipage--'.$this::TYPE : '')."\">\n". |
|
| 149 | 149 | "\t<div class=\"minipage-bloc\">\n"; |
| 150 | 150 | } |
| 151 | 151 | |
@@ -156,16 +156,16 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | protected function ouvreCorps($options = []) { |
| 158 | 158 | $url_site = url_de_base(); |
| 159 | - $header = "<header>\n" . |
|
| 160 | - '<h1><a href="' . attribut_html($url_site) . '">' . interdire_scripts($GLOBALS['meta']['nom_site'] ?? '') . "</a></h1>\n"; |
|
| 159 | + $header = "<header>\n". |
|
| 160 | + '<h1><a href="'.attribut_html($url_site).'">'.interdire_scripts($GLOBALS['meta']['nom_site'] ?? '')."</a></h1>\n"; |
|
| 161 | 161 | |
| 162 | 162 | $titre = ($options['titre'] ?? ''); |
| 163 | 163 | if ($titre) { |
| 164 | - $header .= '<h2>' . interdire_scripts($titre) . '</h2>'; |
|
| 164 | + $header .= '<h2>'.interdire_scripts($titre).'</h2>'; |
|
| 165 | 165 | } |
| 166 | 166 | $header .= '</header>'; |
| 167 | 167 | |
| 168 | - return $header . "<div class='corps'>\n"; |
|
| 168 | + return $header."<div class='corps'>\n"; |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -179,13 +179,13 @@ discard block |
||
| 179 | 179 | if (isset($options['footer'])) { |
| 180 | 180 | $footer = $options['footer']; |
| 181 | 181 | } else { |
| 182 | - $footer = '<a href="' . attribut_html($url_site) . '">' . _T('retour') . "</a>\n"; |
|
| 182 | + $footer = '<a href="'.attribut_html($url_site).'">'._T('retour')."</a>\n"; |
|
| 183 | 183 | } |
| 184 | 184 | if (!empty($footer)) { |
| 185 | 185 | $footer = "<footer>\n{$footer}</footer>"; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | - return "</div>\n" . $footer; |
|
| 188 | + return "</div>\n".$footer; |
|
| 189 | 189 | } |
| 190 | 190 | |
| 191 | 191 | |