From b10af4a766a30f19fb2cc4c5fde24ade3c86f622 Mon Sep 17 00:00:00 2001 From: Matthieu Marcillaud <marcimat@rezo.net> Date: Thu, 16 Dec 2021 00:53:20 +0100 Subject: [PATCH] =?UTF-8?q?=C3=89viter=20d=E2=80=99appeler=20lister=5Ftabl?= =?UTF-8?q?es=5Fobjets=5Fsql=20avec=20une=20chaine=20vide.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/base/objets.php | 4 ++-- prive/formulaires/configurer_multilinguisme.html | 2 +- prive/formulaires/inc-choisir-objets.html | 2 +- prive/rss/a_suivre.html | 2 +- prive/themes/spip/lists.css.html | 4 ++-- prive/themes/spip/picker.css.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ecrire/base/objets.php b/ecrire/base/objets.php index 0525104e26..f6fdccf99f 100644 --- a/ecrire/base/objets.php +++ b/ecrire/base/objets.php @@ -46,13 +46,13 @@ function array_set_merge(&$table, $index, $valeur) { * Elle est auto-declarée si inconnue jusqu'alors. * * @api - * @param string $table_sql + * @param string|null $table_sql * table_sql demandee explicitement * @param array $desc * description connue de la table sql demandee * @return array|bool */ -function lister_tables_objets_sql($table_sql = null, $desc = []) { +function lister_tables_objets_sql(?string $table_sql = null, $desc = []) { static $deja_la = false; static $infos_tables = null; static $md5 = null; diff --git a/prive/formulaires/configurer_multilinguisme.html b/prive/formulaires/configurer_multilinguisme.html index 9ba50b9fb0..5fd59ee237 100644 --- a/prive/formulaires/configurer_multilinguisme.html +++ b/prive/formulaires/configurer_multilinguisme.html @@ -50,7 +50,7 @@ </fieldset> </div> ] - <BOUCLE_objets(DATA){source table, #REM|lister_tables_objets_sql}{cle!=spip_rubriques}{cle!=spip_auteurs}{si #ENV{editable}}>[(#CLE|table_supporte_lang|et{#VALEUR{type}|objet_info{editable}}) + <BOUCLE_objets(DATA){source table, #NULL|lister_tables_objets_sql}{cle!=spip_rubriques}{cle!=spip_auteurs}{si #ENV{editable}}>[(#CLE|table_supporte_lang|et{#VALEUR{type}|objet_info{editable}}) #SET{val,#CLE} <div class="fieldset"> <fieldset> diff --git a/prive/formulaires/inc-choisir-objets.html b/prive/formulaires/inc-choisir-objets.html index 4fbe180a58..8880a64dc7 100644 --- a/prive/formulaires/inc-choisir-objets.html +++ b/prive/formulaires/inc-choisir-objets.html @@ -1,4 +1,4 @@ -#SET{traductions,#ARRAY}<BOUCLE_objets(DATA){source table, #REM|lister_tables_objets_sql}{cle !IN #ENV{exclus,''}}>[(#EDITABLE|oui) +#SET{traductions,#ARRAY}<BOUCLE_objets(DATA){source table, #NULL|lister_tables_objets_sql}{cle !IN #ENV{exclus,''}}>[(#EDITABLE|oui) [(#SET{traductions,#GET{traductions}|array_merge{#ARRAY{#CLE,#TEXTE_OBJETS|_T}}})] ]</BOUCLE_objets><BOUCLE_par_traduction(DATA){source table, #GET{traductions}}{par valeur}> #SET{id,#ENV{name}|replace{\W,'_'}|concat{'_',#CLE}} diff --git a/prive/rss/a_suivre.html b/prive/rss/a_suivre.html index f1db908edb..79c9a6e53a 100644 --- a/prive/rss/a_suivre.html +++ b/prive/rss/a_suivre.html @@ -19,7 +19,7 @@ if ([(#ID_AUTEUR|securiser_acces{#ENV{cle},rss,#ENV{op}, #ENV{args}}|?{1,0})]) { <description>[(#INTRODUCTION|texte_backend)]</description> </item> </BOUCLE_A> -<BOUCLE_objets(DATA){source table, #REM|lister_tables_objets_sql}> +<BOUCLE_objets(DATA){source table, #NULL|lister_tables_objets_sql}> #SET{fond,#VAL{prive/rss/a_suivre-}|concat{#VALEUR{table_objet}}} [(#GET{fond}|trouver_fond|oui)#INCLURE*{fond=#GET{fond}}] </BOUCLE_objets> diff --git a/prive/themes/spip/lists.css.html b/prive/themes/spip/lists.css.html index a193351f64..0e8d4bc5ba 100644 --- a/prive/themes/spip/lists.css.html +++ b/prive/themes/spip/lists.css.html @@ -191,7 +191,7 @@ .liste-objets table .caption { border-bottom: 1px solid var(--spip-box-sep-color); } -<BOUCLE_objets(DATA){source table, #REM|lister_tables_objets_sql}> +<BOUCLE_objets(DATA){source table, #NULL|lister_tables_objets_sql}> [.liste-objets.[(#VALEUR{table_objet})] .caption { background-image: url((#CHEMIN_IMAGE{#VALEUR{icone_objet}|concat{-24.png}})); padding-#LEFT: var(--spip-list-heading-iconpadding); @@ -890,7 +890,7 @@ background-position: center var(--spip-left); background-repeat: no-repeat; } -<BOUCLE_objets2(DATA){source table, #REM|lister_tables_objets_sql}{cle!=spip_rubriques}> +<BOUCLE_objets2(DATA){source table, #NULL|lister_tables_objets_sql}{cle!=spip_rubriques}> .plan .menu-items.[(#VALEUR{table_objet})] .item > a { padding-#LEFT: 20px; [background-image: url((#CHEMIN_IMAGE{#VALEUR{icone_objet}-16.png}));] diff --git a/prive/themes/spip/picker.css.html b/prive/themes/spip/picker.css.html index 2c4949c964..a1ac29670f 100644 --- a/prive/themes/spip/picker.css.html +++ b/prive/themes/spip/picker.css.html @@ -206,7 +206,7 @@ a.rub-ouverte { /* ----- */ /* Les éléments propres à chaque objet */ -<BOUCLE_objets(DATA){source table, (#REM|lister_tables_objets_sql)}> +<BOUCLE_objets(DATA){source table, (#NULL|lister_tables_objets_sql)}> [(#SET{petite_icone, [(#CHEMIN_IMAGE{#VALEUR{icone_objet}-12.png}|sinon{[(#CHEMIN_IMAGE{#VALEUR{icone_objet}-16.png}|image_reduire{12}|extraire_attribut{src})]})]})] ul.item_picked li.#VALEUR{type} {padding-#GET{left}:24px;background-image:url(#GET{petite_icone});background-size:12px;} .item_picker .[(#VALEUR{table_objet})] .type_objet {padding-#GET{left}:24px; background:url(#GET{petite_icone}) no-repeat[ (#GET{left}) ]center; background-size:12px;} -- GitLab