define('_JEXEC', true); foreach (glob($path . '/*', GLOB_ONLYDIR) as $mi_path) { $name = basename($mi_path); if (strpos($name, '.') !== false) { continue; } $file = $mi_path . '/' . $name . '.php'; if (!is_file($file)) { continue; } include_once $file; $class = 'mi_' . $name; $mi = new $class(); $lang = $mi_path . '/language/en-GB/en-GB.com_acctexp.mi.' . $name . '.ini'; if (is_file($lang)) { JText::append($lang); } $info = $mi->Info(); if (empty($info)) { echo $name . "\n"; var_dump($mi); continue; } $info['handle'] = $name; foreach ($info['type'] as $type) { if (!in_array($type, $types)) { $types[] = $type; } } $list[] = $info; }