From 2e4fe5e1e3a73c884e267e696d1725a18cbc08b1 Mon Sep 17 00:00:00 2001 From: tofulm Date: Wed, 22 Jul 2020 22:23:31 +0200 Subject: [PATCH] Pour CYRILLE, var_mode=gamutable compatible minibando --- gamutable_autorisations.php | 5 +++++ gamutable_options.php | 10 ---------- gamutable_pipelines.php | 25 +++++++++++++++++++++++++ inclure/calculer_gamutable.html | 2 +- paquet.xml | 5 +++-- 5 files changed, 34 insertions(+), 13 deletions(-) diff --git a/gamutable_autorisations.php b/gamutable_autorisations.php index 2d874f0..b19cb1c 100644 --- a/gamutable_autorisations.php +++ b/gamutable_autorisations.php @@ -19,3 +19,8 @@ if (!defined('_ECRIRE_INC_VERSION')) { * @pipeline autoriser */ function gamutable_autoriser() { } + +function autoriser_gamutable_purger_dist($faire, $type, $id, $qui, $opt) { + return autoriser('webmestre'); +} + diff --git a/gamutable_options.php b/gamutable_options.php index 3f533e0..b46daaa 100644 --- a/gamutable_options.php +++ b/gamutable_options.php @@ -18,13 +18,3 @@ if (_request('var_mode') == 'gamutable') { include_spip('inc/invalideur'); suivre_invalideur("id='gamutable/1'"); } - - -function gamutable_formulaire_admin($flux) { - //if (autoriser('configurer', 'scssphp')) { - //} - $btn = recuperer_fond('inclure/calculer_gamutable'); - $flux['data'] = preg_replace('%()%is', $btn.'$1', $flux['data']); - - return $flux; -} diff --git a/gamutable_pipelines.php b/gamutable_pipelines.php index 66070ea..222269c 100644 --- a/gamutable_pipelines.php +++ b/gamutable_pipelines.php @@ -12,3 +12,28 @@ if (!defined('_ECRIRE_INC_VERSION')) { return; } + +function gamutable_formulaire_admin($flux) { + include_spip('inc/autoriser'); + if (autoriser("purger","gamutable")) { + $btn = recuperer_fond('inclure/calculer_gamutable'); + $flux['data'] = preg_replace('%()%is', $btn.'$1', $flux['data']); + } + + return $flux; +} + + +function gamutable_affichage_final($flux) { + include_spip('inc/autoriser'); + if (autoriser("purger","gamutable")) { + $p = stripos($flux, ''); + $url_relecture = parametre_url(self(), 'var_mode', 'gamutable', '&'); + $label = "Mode gamuTable"; + $js .= "jQuery('#minibando_bouton_debug ul').append('
  • $label
  • ');"; + $js = "jQuery(function(){ $js });"; + $js = ""; + $flux = substr_replace($flux, $js, $p, 0); + } + return $flux; +} diff --git a/inclure/calculer_gamutable.html b/inclure/calculer_gamutable.html index 46de7c8..43a0dad 100644 --- a/inclure/calculer_gamutable.html +++ b/inclure/calculer_gamutable.html @@ -1,4 +1,4 @@ #CACHE{0} [(#PLUGIN{minibando}|non) +[Mode gamuTable] ] -[Purger gamuTable] diff --git a/paquet.xml b/paquet.xml index a616ec9..6a67a67 100644 --- a/paquet.xml +++ b/paquet.xml @@ -1,7 +1,7 @@ - + +