Changeset 48993 in spip-zone for _plugins_/en_travaux/trunk/entravaux_options.php
- Timestamp:
- Jun 22, 2011, 12:36:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/en_travaux/trunk/entravaux_options.php
r48287 r48993 16 16 17 17 /** 18 * Verifier un verrou fichier pose dans local/entravaux_xxx.lock 19 * pour ne pas qu'il saute si on importe une base 20 * La meta n'est qu'un cache qu'on met a jour si pas dispo. 21 * @param string $nom 22 * @param bool $force 23 * @return bool 24 */ 25 function entravaux_check_verrou($nom, $force=false){ 26 if (!isset($GLOBALS['meta'][$m='entravaux_'.$nom]) OR $force){ 27 ecrire_meta($m,file_exists(_DIR_VAR.$m.".lock")?"oui":"non",'non'); 28 } 29 return $GLOBALS['meta'][$m]=="oui"; // si oui : verrou pose 30 } 31 /** 18 32 * A-t-on active les travaux oui ou non ? 19 33 * @return bool 20 34 */ 21 function is_entravaux(){ return (isset($GLOBALS['meta']['entravaux_id_auteur']) AND $GLOBALS['meta']['entravaux_id_auteur']);} 35 function is_entravaux(){ 36 // upgrade sauvage ? 37 if (isset($GLOBALS['meta']['entravaux_id_auteur'])){include_spip('entravaux_install');entravaux_poser_verrou("accesferme");effacer_meta('entravaux_id_auteur');} 38 return entravaux_check_verrou("accesferme"); 39 } 22 40 23 41 if (is_entravaux()){ … … 92 110 * de retablir le site 93 111 * 94 * @param <type>$flux112 * @param string $flux 95 113 */ 96 114 function entravaux_affichage_final($flux){
Note: See TracChangeset
for help on using the changeset viewer.