X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fmw_app.php;h=38d094d86f1c1f1e3c550b52734a740a03ec6f29;hb=af318ad7150a54780f3912d7fbf805c7382b2785;hp=4355487c0cba27c8dd130c930b0c59c360df3e4c;hpb=e038560c5eed39411ef5a761fe32ad8de69982bb;p=mtweb diff --git a/mw/mw_app.php b/mw/mw_app.php index 4355487..38d094d 100644 --- a/mw/mw_app.php +++ b/mw/mw_app.php @@ -60,10 +60,11 @@ } function init_pathes(){ - if(($n = strpos($_SERVER["REQUEST_URI"], "?")) !== false){ - $_SERVER["REQUEST_URI"] = substr($_SERVER["REQUEST_URI"], 0, $n); + $REQUEST_URI = $_SERVER["REQUEST_URI"]; + if(($n = strpos($REQUEST_URI, "?")) !== false){ + $REQUEST_URI = substr($REQUEST_URI, 0, $n); } - $web_path = explode("/", preg_replace('#/+#','/',$_SERVER["REQUEST_URI"])); + $web_path = explode("/", preg_replace('#/+#','/',$REQUEST_URI)); $this->pathes["web"] = ""; for($i = 0; $i < count($web_path) - 1; $i++) $this->pathes["web"] .= $web_path[$i]."/"; if( @@ -100,7 +101,11 @@ $this->error("dossier content introuvable"); return false; } - if(!is_writable($this->pathes["content"])){ + if( + !is_writable($this->pathes["content"]) + || !is_writable($this->pathes["content"]."config") + || !is_writable($this->pathes["content"]."data") + ){ $this->error("Php ne peut pas ecrire dans le dossier content"); return false; } @@ -166,6 +171,7 @@ $env->load_versions(); $env->load_config($this->bdd, $this->config); $env->init(); + $env->loaded_plugins(); if(($res = $env->init_data_upgrades()) !== true){ $this->error("impossible de lire les upgrades. ".$res); return false; @@ -204,6 +210,9 @@ } function upgrade(){ + $env = $this->env(); + $data = $env->data(); + $data->load_session(); if($this->run_mod("upgrade", false)){ $this->display(); }