[PLUGINS] +crayons
[lhc/web/clavette_www.git] / www / plugins / crayons / action / crayons.php
1 <?php
2 /**
3 * Crayons
4 * plugin for spip
5 * (c) Fil, toggg 2006-2013
6 * licence GPL
7 */
8
9 if (!defined("_ECRIRE_INC_VERSION")) return;
10
11 // On a ete appele par un formulaire normal (ajax est traite par crayons_store)
12 function action_crayons_dist() {
13 include_spip('action/crayons_store');
14 $r = crayons_store();
15
16 // soit exit, soit un redirect gere par SPIP
17 if (trim($r['$erreur'])) {
18 include_spip('inc/minipres');
19 echo minipres($r['$erreur']);
20 exit;
21 }
22
23 // S'il n'y a pas de redirect, on est mal : eviter toutefois la page blanche
24 if (!_request('redirect'))
25 die('OK');
26
27 // Invalider le cache parce que bon... a priori on est dans une
28 // interface qui va avoir besoin de refresh
29 include_spip('inc/invalideur');
30 suivre_invalideur('1');
31 }
32
33 ?>