X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;ds=sidebyside;f=web%2Fapp%2Finit%2F0300_data.php;fp=web%2Fapp%2Finit%2F0300_data.php;h=afc41cc710918e41f48cdf90effc5c2a13b5b71c;hb=29b6377f43bf4477e04b57069cf779ac1b913bdb;hp=b4dc586a9936cb0bd989a2dee348a748fd65ec1c;hpb=a21fbfe1301f83b72d2815899ff334445b7830cf;p=mtweb diff --git a/web/app/init/0300_data.php b/web/app/init/0300_data.php index b4dc586..afc41cc 100644 --- a/web/app/init/0300_data.php +++ b/web/app/init/0300_data.php @@ -2,30 +2,30 @@ require $this->app_file("data/mw_sgbd.php"); require $this->app_file("data/mw_data.php"); - if($this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")) - { require $this->app_file("data/impl/mw_".$this->bdd("sgbd").".php"); - if(class_exists($sgbd_impl = "mw_".$this->bdd("sgbd"))) - { if(($plugins = $this->plugins("DESC")) !== false) - { $data = new mw_data(true); - foreach($plugins as $plugin_name => $plugin) - { if($plugin["installed"] && $plugin["enabled"]) - { $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/share/"); + if($this->app_file_exists("data/impl/mw_".$this->bdd("sgbd").".php")){ + require $this->app_file("data/impl/mw_".$this->bdd("sgbd").".php"); + if(class_exists($sgbd_impl = "mw_".$this->bdd("sgbd"))){ + if(($plugins = $this->plugins("DESC")) !== false){ + $data = new mw_data(true); + foreach($plugins as $plugin_name => $plugin){ + if($plugin["installed"] && $plugin["enabled"]){ + $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/share/"); $data->load_modules($this->path("plugins").$plugin_name."/app/", "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/"); } } $data->load_modules($this->path("app"), "data/modules/share/"); $data->load_modules($this->path("app"), "data/modules/".($this->bdd("sgbd") == "xml" ? "xml" : "sql")."/"); - $sgbd = new mw_sgbd - ( new $sgbd_impl - ( $this->bdd("host"), + $sgbd = new mw_sgbd( + new $sgbd_impl( + $this->bdd("host"), $this->bdd("base"), $this->bdd("user"), $this->bdd("password") ), $this ); - if($sgbd->extention_ok()) - { $data->set_sgbd($sgbd); + if($sgbd->extention_ok()){ + $data->set_sgbd($sgbd); $data->set_env($this); $this->set_data($data); }