X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fspip_cache_action_rapide.php;fp=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fspip_cache_action_rapide.php;h=05329b525dab566e95f0ae3474f6ff58896958ec;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c
diff --git a/www/plugins/auto/couteau_suisse/couteau_suisse/outils/spip_cache_action_rapide.php b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/spip_cache_action_rapide.php
new file mode 100644
index 0000000..05329b5
--- /dev/null
+++ b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/spip_cache_action_rapide.php
@@ -0,0 +1,57 @@
+ taille_en_octets($n)));
+ else
+ $info = _T('taille_cache_vide');
+ // : pour la description de l'outil inactif
+ // syntaxe : ajax_action_auteur($action, $id, $script, $args='', $corps=false, $args_ajax='', $fct_ajax='')
+ // on envoie une action 'action_rapide' car 'purger' n'existe pas (encore?) en exec/
+ return ajax_action_auteur('action_rapide', 'cache', 'admin_couteau_suisse', "arg=spip_cache|description_outil&cmd=descrip#cs_action_rapide",
+ "\n
"._T('bouton_vider_cache')." $info
')
+ // bouton d'acualisation
+ . ajax_action_auteur('action_rapide', 'actualise', 'admin_couteau_suisse', "arg=spip_cache|description_outil&cmd=descrip#cs_action_rapide",
+ "\n
');
+
+/* // appel direct vers SPIP, sans ajax :
+ return redirige_action_post('purger', 'cache', 'admin_couteau_suisse', "cmd=descrip&outil=spip_cache#cs_infos",
+ "\n ($info)
"); */
+}
+
+// fonction {$outil}_{$arg}_action() appelee par action/action_rapide.php
+function spip_cache_cache_action() {
+ // purger le cache de SPIP...
+ // $arg doit obligatoirement etre 'cache' sinon SPIP se fache !
+ $purger = charger_fonction('purger', 'action');
+ $purger();
+}
+// fonction {$outil}_{$arg}_action() appelee par action/action_rapide.php
+function spip_cache_actualise_action() {
+ // actualiser le calcul du cache de SPIP...
+ // rien a faire :-)
+}
+
+?>
\ No newline at end of file