X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fecran_securite.php;fp=www%2Fplugins%2Fauto%2Fcouteau_suisse%2Fcouteau_suisse%2Foutils%2Fecran_securite.php;h=cf053addf33439091414cc250fadec4e5813d4d8;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c
diff --git a/www/plugins/auto/couteau_suisse/couteau_suisse/outils/ecran_securite.php b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/ecran_securite.php
new file mode 100644
index 0000000..cf053ad
--- /dev/null
+++ b/www/plugins/auto/couteau_suisse/couteau_suisse/outils/ecran_securite.php
@@ -0,0 +1,38 @@
+\n@puce@ "._T("couteauprive:ecran_conflit".($flux['non']?"2":""), array("file"=>_NOM_PERMANENTS_INACCESSIBLES."ecran_securite.php")).""
+ :"";
+ if(defined('_ECRAN_SECURITE')) {
+ $vers = _ECRAN_SECURITE;
+ // recherche de la version du fichier distant
+ include_spip("outils/maj_auto_action_rapide");
+ $maj = maj_auto_rev_distante(_MAJ_ECRAN_SECU,false,",(\d+\.\d+(\.\d+)?),",0,true);
+ if($maj{0} != "-")
+ $tmp = "\n".(_ECRAN_SECURITE!=$maj?"- "._T("couteauprive:ecran_maj_ko", array("n"=>"$maj")):_T("couteauprive:ecran_maj_ok"));
+ } else $vers=_T("couteauprive:ecran_ko");
+ // options SPIP en amont ? (mieux !)
+ if(!defined("_CS_SPIP_OPTIONS_OK"))
+ $tmp .= "\n- "._T("couteauprive:detail_spip_options2");
+ $flux['texte'] = str_replace(array("@_ECRAN_SECURITE@","@_ECRAN_CONFLIT@","@_ECRAN_SUITE@"), array($vers,$conf,$tmp), $flux['texte']);
+ return $flux;
+}
+
+# TODO : eviter l'insertion et recopier le fichier dans config/mes_options.php pour SPIP>=2.1
+function ecran_securite_fichier_distant($flux) {
+ // besoin du 1er appel uniquement
+ if($flux['outil']!='ecran_securite' || isset($flux['texte'])) return $flux;
+ // fichier global de config (y compris la mutu)
+ $flux['fichier_local'] = dirname(cs_spip_file_options(4)).'/ecran_securite.php';
+ // fichier local de config
+ #$flux['fichier_local'] = dirname(cs_spip_file_options(3)).'/ecran_securite.php';
+ return $flux;
+}
+
+?>
\ No newline at end of file