3 class mw_env_init extends mw_env{
7 if(($plugins = $this->plugins()) !== false){
8 foreach($plugins as $plugin_name => $plugin){
9 $init_path = $this->path("mw_dir")."plugins/".$plugin_name."/app/init/";
13 && file_exists($init_path)
16 if($dh = opendir($init_path)){
18 while(($file = readdir($dh)) !== false){
20 substr($file, 0, 1) != "."
21 && !is_dir($init_path.$file)
22 && strcmp(substr($file, -4), ".php") == 0
23 && !isset($init_files[$file])
24 ) $init_files[$file] = $init_path;
28 else $this->erreur("impossible d'ouvrir le dossier init du plugin ".$plugin_name, true);
30 if($this->check_stop()) return;
32 $init_path = $this->path("mw_dir")."app/init/";
34 file_exists($init_path)
37 if($dh = opendir($init_path)){
39 while(($file = readdir($dh)) !== false){
41 substr($file, 0, 1) != "."
42 && !is_dir($init_path.$file)
43 && strcmp(substr($file, -4), ".php") == 0
44 ) $init_files[$file] = $init_path;
48 else $this->erreur("impossible d'ouvrir le dossier init du plugin ".$plugin_name, true);
51 if($this->check_stop()) return;
54 foreach($init_files as $file => $init_path){
55 require $init_path.$file;
56 if($this->check_stop()) return;