X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Fenv%2Fmodules%2Fmw_env_app_files.php;fp=web%2Fapp%2Fenv%2Fmw_env.php;h=bb5816c9914d73b4dc1ce04804b8b038f7218328;hb=refs%2Ftags%2Fmtweb.0.6.0;hp=1b8aaf16283639dd89c82e502c1a62561fadb777;hpb=281c96e95451269f2614684b8de5be25862c8374;p=mtweb diff --git a/web/app/env/mw_env.php b/mw/env/modules/mw_env_app_files.php similarity index 53% rename from web/app/env/mw_env.php rename to mw/env/modules/mw_env_app_files.php index 1b8aaf1..bb5816c 100644 --- a/web/app/env/mw_env.php +++ b/mw/env/modules/mw_env_app_files.php @@ -1,6 +1,6 @@ _app_file($file, $PRIORITE); @@ -14,16 +14,21 @@ function _app_file($file, $PRIORITE = "ASC"){ $app_file = false; - if($PRIORITE == "ASC" && file_exists($this->path("app").$file)) return $this->path("app").$file; + if($PRIORITE == "ASC" && file_exists($this->path("mw_dir")."app/".$file)) return $this->path("mw_dir")."app/".$file; if(($plugins = $this->plugins($PRIORITE)) !== false){ foreach($plugins as $plugin_name => $plugin){ - if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($this->path("plugins").$plugin_name."/app/".$file)){ - $app_file = $this->path("plugins").$plugin_name."/app/".$file; + if( + $file + && $plugin["installed"] + && $plugin["enabled"] + && file_exists($this->path("mw_dir")."plugins/".$plugin_name."/app/".$file) + ){ + $app_file = $this->path("mw_dir")."plugins/".$plugin_name."/app/".$file; break; } } if($PRIORITE == "DESC" && !$app_file){ - if(file_exists($this->path("app").$file)) $app_file = $this->path("app").$file; + if(file_exists($this->path("mw_dir")."app/".$file)) $app_file = $this->path("mw_dir")."app/".$file; } } return $app_file;