From 1a0da64d7257498f55fdf3fd36bc5b92a4cd3bb5 Mon Sep 17 00:00:00 2001 From: Eric Lupinacci Date: Sun, 9 Feb 2020 12:58:37 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20au=20point=20de=20la=20liste=20g=C3=A9n?= =?UTF-8?q?=C3=A9rique=20des=20caches=20et=20d'une=20balise=20#CACHE=5FLIS?= =?UTF-8?q?TE.=20Finalisation=20des=20renommages=20cache=20en=20ezcache.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action/telecharger_cache.php | 54 ++++++++++++++ ezcache/ezcache.php | 6 +- ezcache_fonctions.php | 54 ++++++++++++++ cache_logo-64.png => ezcache_logo-64.png | Bin cache_pipelines.php => ezcache_pipelines.php | 0 lang/cache_fr.php | 3 + paquet.xml | 8 +- prive/squelettes/liste/caches.html | 74 ++++++++++--------- prive/squelettes/liste/fichiers.html | 42 ----------- 9 files changed, 159 insertions(+), 82 deletions(-) create mode 100644 action/telecharger_cache.php create mode 100644 ezcache_fonctions.php rename cache_logo-64.png => ezcache_logo-64.png (100%) rename cache_pipelines.php => ezcache_pipelines.php (100%) delete mode 100644 prive/squelettes/liste/fichiers.html diff --git a/action/telecharger_cache.php b/action/telecharger_cache.php new file mode 100644 index 0000000..4711e52 --- /dev/null +++ b/action/telecharger_cache.php @@ -0,0 +1,54 @@ +code = "calculer_liste_cache(${plugin}, ${filtres})"; + + return $p; +} + +/** + * @internal + * + * @param string $plugin + * @param array $filtres + * + * @return array + */ +function calculer_liste_cache($plugin, $filtres = array()) { + include_spip('inc/ezcheck_cache'); + + return cache_repertorier($plugin, $filtres); +} diff --git a/cache_logo-64.png b/ezcache_logo-64.png similarity index 100% rename from cache_logo-64.png rename to ezcache_logo-64.png diff --git a/cache_pipelines.php b/ezcache_pipelines.php similarity index 100% rename from cache_pipelines.php rename to ezcache_pipelines.php diff --git a/lang/cache_fr.php b/lang/cache_fr.php index 4039b6d..6679bd9 100644 --- a/lang/cache_fr.php +++ b/lang/cache_fr.php @@ -14,6 +14,9 @@ $GLOBALS[$GLOBALS['idx_lang']] = array( 'cache_vider_cocher_rien' => 'Tout décocher', 'cache_vider_cocher_tout' => 'Tout cocher', + // F + 'fichier_label' => 'Nom sans extension', + // I 'info_1_cache' => 'Un cache', 'info_nb_cache' => '@nb@ caches', diff --git a/paquet.xml b/paquet.xml index c245c97..863309c 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,10 +1,10 @@ Cache Factory @@ -14,7 +14,7 @@ GPL 3 - + diff --git a/prive/squelettes/liste/caches.html b/prive/squelettes/liste/caches.html index 203c87f..1caec6e 100644 --- a/prive/squelettes/liste/caches.html +++ b/prive/squelettes/liste/caches.html @@ -1,54 +1,60 @@ +[(#REM) ] + [(#SET{defaut_tri,#ARRAY{ - date, -1, - type_controle, 1, - points, -1 + nom_cache, 1, + date_cache, -1, }})] +#SET{avec_telechargement, #ENV{avec_telechargement, non}} + #ANCRE_PAGINATION
[] - [(#ENV{type_controle}|non) - - ] - - - - - + + + + [(#ENV{avec_telechargement}|=={oui}|oui)] + {tri #ENV{par, nom_cache}, #GET{defaut_tri}} + {pagination #ENV{nb, 10}}> - [(#ENV{type_controle}|non) - - ] - - - - - + + + + [(#ENV{avec_telechargement}|=={oui}|oui) + + ] @@ -56,5 +62,5 @@ [

(#PAGINATION{prive})

] [ -
(#ENV*{sinon, ''})
+
(#ENV*{sinon, <:cache:info_aucun_cache:>})
] diff --git a/prive/squelettes/liste/fichiers.html b/prive/squelettes/liste/fichiers.html deleted file mode 100644 index 82963c9..0000000 --- a/prive/squelettes/liste/fichiers.html +++ /dev/null @@ -1,42 +0,0 @@ -[(#SET{defaut_tri,#ARRAY{ - date, -1, - type_controle, 1, - points, -1 -}})] - -#ANCRE_PAGINATION -
-
- (#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{cache:info_1_cache,pays:info_nb_cache}}) + (#ENV*{titre,#GRAND_TOTAL|singulier_ou_pluriel{cache:info_1_cache,cache:info_nb_cache}})
[(#TRI{titre,<:controle:champ_type_controle_label:>,ajax})][(#TRI{id_controle,<:info_numero_abbreviation:>,ajax})]<:auteur:>[(#TRI{nb_anomalies,<:controle:champ_nb_anomalies_label:>,ajax})][(#TRI{date,<:controle:champ_date_label:>,ajax})][(#TRI{date,<:controle:champ_etat_execution_label:>,ajax})][(#TRI{nom_cache,<:cache:fichier_label:>,ajax})]<:label_poids_fichier:>[(#TRI{date_cache,<:date:>,ajax})]
#INFO_TITRE{controle, #ID_CONTROLE}#ID_CONTROLE -
- - #NOM - -
-
#NB_ANOMALIES[(#DATE|affdate_heure)]#ETAT_EXECUTION#NOM_CACHE[(#TAILLE_CACHE|taille_en_octets)][(#DATE_CACHE|affdate_heure)][(#BOUTON_ACTION{<:bouton_telecharger:>, #URL_ACTION_AUTEUR{telecharger_cache, #CLE}})]
- - - - - - - - - - - - - - - - - - - - - - - - -
<:mes_fichiers:titre_boite_telecharger:>
<:mes_fichiers:colonne_nom:><:label_poids_fichier:><:date:>
[(#VALEUR|basename)][(#VALEUR|filesize|taille_en_octets)][(#VAL{'Y-m-d H:i:s'}|date{#VALEUR|filemtime}|affdate_heure)][(#BOUTON_ACTION{<:bouton_telecharger:>, #URL_ACTION_AUTEUR{mes_fichiers_telecharger, #VALEUR}})]<:mes_fichiers:bouton_voir:>
[(#VALEUR|mes_fichiers_resumer_zip)]
- [

(#PAGINATION{#ENV{pagination,prive}})

] -
- - -#BOITE_OUVRIR{'', notice} - <:mes_fichiers:message_rien_a_telecharger:> -#BOITE_FERMER -