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);
16 $sgbd = new $sgbd_impl(
19 "host" => $this->bdd("host"),
20 "base" => $this->bdd("base"),
21 "user" => $this->bdd("user"),
22 "password" => $this->bdd("password")
25 if(!$sgbd->extention_ok()){
26 $this->erreur("L'extention php ".$this->bdd("sgbd")." n'est pas installée", true);
29 foreach($plugins as $plugin_name => $plugin){
30 if($plugin["installed"] && $plugin["enabled"]){
31 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/share/");
32 if($this->bdd("sgbd")){
33 $data->load_modules($this->path("mw_dir")."plugins/".$plugin_name."/app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
37 $data->load_modules($this->path("mw_dir")."app/", "data/modules/share/");
38 if($this->bdd("sgbd")){
39 $data->load_modules($this->path("mw_dir")."app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/");
40 $data->set_sgbd($sgbd);
42 $data->set_env($this);
43 $this->set_data($data);