X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fenv%2Fmodules%2Fmw_env_config.php;h=fcb85f268220d039315bcdae4c6264c13f6b4317;hb=e038560c5eed39411ef5a761fe32ad8de69982bb;hp=a708431712fb7cb3d448437fd2f3f0d483068525;hpb=3c17f81e1d2fb68f69cfa620ca00ad63e83cc17c;p=mtweb diff --git a/mw/env/modules/mw_env_config.php b/mw/env/modules/mw_env_config.php index a708431..fcb85f2 100644 --- a/mw/env/modules/mw_env_config.php +++ b/mw/env/modules/mw_env_config.php @@ -51,7 +51,7 @@ if(isset($app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"])){ $this->add_table_prefix( array( - $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => $bdd["table_prefix"] + $app_config["subs"]["bdd"][0]["subs"]["table_prefix_code"][0]["data"] => isset($bdd["table_prefix"]) ? $bdd["table_prefix"] : "" ) ); } @@ -156,6 +156,19 @@ $this->bdd[$key] = $value; } + function bdd_ready(){ + if(!$this->bdd("sgbd")) return "aucun sgbd defini"; + $data = $this->data(); + if(!$data) return "objet data non defini"; + if(($res = $this->data_upgrade_required()) !== false){ + if($res === true){ + return "la base de donnees doit etre mise a jour"; + } + else return $res; + } + return true; + } + function add_table_prefix($table_prefix){ if(is_array($table_prefix)){ foreach($table_prefix as $prefix_code => $prefix) $this->bdd["table_prefix"][$prefix_code] = $prefix;