// install
//
- function mw_sourceml_install_xml($plugin, $env){
+ public function mw_sourceml_install_xml($plugin, $env){
$sgbd = $this->sgbd();
$RES = true;
- $res = $sgbd->data_exists("sml_authors"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_classes"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_licences"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_sources"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_sources_access"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_sources_authors"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_source_cache"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_source_compositions"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_source_derivations"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
- $res = $sgbd->data_exists("sml_sources_invitations"); if(isset($res)){ if($res) $RES = 1; } else $RES = -1;
+ $res = $sgbd->data_exists("sml_authors");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_classes");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_licences");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_sources");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_sources_access");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_sources_authors");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_source_cache");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_source_compositions");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_source_derivations");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
+ $res = $sgbd->data_exists("sml_sources_invitations");
+ if(isset($res)){
+ if($res) $RES = 1;
+ }
+ else $RES = -1;
if($RES === -1) return "impossible de savoir si les tables existent deja. installation annulee";
if($RES === 1) return "des tables existent deja en base. installation annulee";
// uninstall
//
- function mw_sourceml_uninstall_xml($plugin, $env){
+ public function mw_sourceml_uninstall_xml($plugin, $env){
$sgbd = $this->sgbd();
if(!$plugin->disable($env)) return "impossible de desactiver le plugin";