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"] : ""
)
);
}
$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(!$this->version("mtweb")) return "impossible de lire la version de mtweb";
+ if($data->version("mtweb") != $this->version("mtweb")) return "la version de la base et du code sont différentes";
+ 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;