3 class mw_env extends empty_class{
5 function app_file_exists($file, $PRIORITE = "ASC"){
6 $app_file = $this->_app_file($file, $PRIORITE);
7 return $app_file ? true : false;
10 function app_file($file, $PRIORITE = "ASC"){
11 $app_file = $this->_app_file($file, $PRIORITE);
12 return $app_file ? $app_file : $file;
15 function _app_file($file, $PRIORITE = "ASC"){
17 if($PRIORITE == "ASC" && file_exists($this->path("app").$file)) return $this->path("app").$file;
18 if(($plugins = $this->plugins($PRIORITE)) !== false){
19 foreach($plugins as $plugin_name => $plugin){
20 if($file && $plugin["installed"] && $plugin["enabled"] && file_exists($this->path("plugins").$plugin_name."/app/".$file)){
21 $app_file = $this->path("plugins").$plugin_name."/app/".$file;
25 if($PRIORITE == "DESC" && !$app_file){
26 if(file_exists($this->path("app").$file)) $app_file = $this->path("app").$file;