3 class mw_env_init extends mw_env
7 { $init_files = array();
8 if(($plugins = $this->plugins()) !== false)
9 { foreach($plugins as $plugin_name => $plugin)
10 { $init_path = $this->path("plugins").$plugin_name."/app/init/";
12 ( $plugin["installed"]
14 && file_exists($init_path)
17 { if($dh = opendir($init_path))
19 while(($file = readdir($dh)) !== false)
21 ( substr($file, 0, 1) != "."
22 && !is_dir($init_path.$file)
23 && strcmp(substr($file, -4), ".php") == 0
24 && !isset($init_files[$file])
25 ) $init_files[$file] = $init_path;
30 else $this->erreur("impossible d'ouvrir le dossier init du plugin ".$plugin_name, true);
32 if($this->check_stop()) return;
34 $init_path = $this->path("app")."init/";
36 ( file_exists($init_path)
39 { if($dh = opendir($init_path))
41 while(($file = readdir($dh)) !== false)
43 ( substr($file, 0, 1) != "."
44 && !is_dir($init_path.$file)
45 && strcmp(substr($file, -4), ".php") == 0
46 ) $init_files[$file] = $init_path;
50 else $this->erreur("impossible d'ouvrir le dossier init du plugin ".$plugin_name, true);
53 if($this->check_stop()) return;
56 foreach($init_files as $file => $init_path)
57 { require $init_path.$file;
58 if($this->check_stop()) return;