$info) { if (preg_match($include_dir_regexp, $info->getFilename())) { if ($include_dir_sort) { $include_paths[] = $file; continue; } // do not use print_debug, which not included for definitions! //if (OBS_DEBUG > 1) { echo('Including: ' . $file . PHP_EOL); } include($file); } } // This loop used only when sorting includes if ($include_dir_sort) { asort($include_paths); } foreach ($include_paths as $file) { // do not use print_debug, which not included for definitions! //if (OBS_DEBUG > 1) { echo('Including sorted: ' . $file . PHP_EOL); } include($file); } /* old if ($handle = opendir($config['install_dir'] . '/' . $include_dir)) { while (false !== ($file = readdir($handle))) { $file_path = $config['install_dir'] . '/' . $include_dir . '/' . $file; if (preg_match($include_dir_regexp, $file) && is_file($file_path)) { // do not use print_debug, which not included for definitions! if (OBS_DEBUG > 1) { echo('Including: ' . $file_path . PHP_EOL); } include($file_path); } } closedir($handle); } */ unset($include_dir_regexp, $include_dir_depth, $include_dir, $include_paths); // EOF