maj version dans config.xml
[mtweb] / mw / app / controllers / install / index.php
index 0f7b27c..79734f3 100644 (file)
@@ -19,7 +19,7 @@
         "email" => "",
         "password" => ""
       );
-      if(($sgbds = $data->sgbds()) === false){
+      if(($sgbds = $env->sgbds()) === false){
         $env->erreur("impossible de lister les sgbds disponibles");
         return;
       }
         else $env->message("merci de choisir un mot de passe pour l'administrateur");
         if(!$env->messages()){
           $sgbds[$current_sgbd] = null;
-          $impl = new $current_sgbd($params);
+          $impl = new $current_sgbd($env, $params);
           $sgbds[$current_sgbd] = $impl;
-          $data->set_sgbd(
-            new mw_sgbd(
-              $sgbds[$current_sgbd],
-              $env
-            )
-          );
+          $data->set_sgbd($sgbds[$current_sgbd]);
           $data->load_modules($env->path("mw_dir")."app/", "data/modules/".($current_sgbd == "mw_xml" ? "xml" : "sql")."/");
           if(
                 $current_sgbd == "mw_xml"
             if(!$plugin["installed"]){
               $env->run("config/plugins/install", array("get" => array("id" => $plugin_name)), false);
               if($env->erreurs()) return;
-              $env->init_plugins("DESC", true);
+              $env->load_plugin($plugin_name);
             }
             if(!$plugin["enabled"]){
               $env->run("config/plugins/enable", array("get" => array("id" => $plugin_name)), false);
               if($env->erreurs()) return;
-              $env->init_plugins("DESC", true);
+              $env->load_plugin($plugin_name);
             }
           }
           $env->redirect(