3 if(($plugins = $this->plugins("DESC")) === false){
4 $this->erreur("Impossible de lire les plugins pour charger les modules de donnees", true);
6 $data = new mw_data(true);
7 if($this->bdd("sgbd")){
8 if(!$this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")){
9 $this->erreur("Impossible de trouver le fichier d'implementation du sgbd ".$this->bdd("sgbd"), true);
11 $sgbd_impl = "mw_".$this->bdd("sgbd");
12 if(!class_exists($sgbd_impl)) require_once $this->app_file("data/impl/".$sgbd_impl.".php");
13 if(!class_exists($sgbd_impl)){
14 $this->erreur("Impossible de trouver la classe d'implementation du sgbd ".$this->bdd("sgbd"), true);
19 "host" => $this->bdd("host"),
20 "base" => $this->bdd("base"),
21 "user" => $this->bdd("user"),
22 "password" => $this->bdd("password")
27 if(!$sgbd->extention_ok()){
28 $this->erreur("L'extention php ".$this->bdd("sgbd")." n'est pas installée", true);
31 foreach($plugins as $plugin_name => $plugin){
32 if($plugin["installed"] && $plugin["enabled"]){
33 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/share/");
34 if($this->bdd("sgbd")){
35 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
39 $data->load_modules($this->path("mw_dir")."app/", "data/modules/share/");
40 if($this->bdd("sgbd")){
41 $data->load_modules($this->path("mw_dir")."app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
42 $data->set_sgbd($sgbd);
44 $data->set_env($this);
45 $this->set_data($data);