X-Git-Url: http://git.dj3c1t.com/index.cgi?a=blobdiff_plain;f=app%2Fdata%2Fmodules%2Fxml%2Fsml_data_install.php;h=849c441d6c41c6427234492b83c9f328d41ce02a;hb=0b1ecd8b7536944d54d74ffc836982de3654d98b;hp=0b9ea5580588072f62962b435c5a83a7bd7b6362;hpb=3647c6bed06b3a1e3e014ef5a21074e7a6192899;p=mw_sourceml diff --git a/app/data/modules/xml/sml_data_install.php b/app/data/modules/xml/sml_data_install.php index 0b9ea55..849c441 100644 --- a/app/data/modules/xml/sml_data_install.php +++ b/app/data/modules/xml/sml_data_install.php @@ -6,20 +6,60 @@ // 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"; @@ -223,7 +263,7 @@ // 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";