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