public static function _installTables($module, $action = 'install') { $modDir = empty($module['ex_plug_dir']) ? GMP_MODULES_DIR . $module['code'] . DS : utilsGmp::getPluginDir($module['ex_plug_dir']) . $module['code'] . DS; if (is_dir($modDir . 'tables')) { $tableFiles = utilsGmp::getFilesList($modDir . 'tables'); if (!empty($tableFiles)) { frameGmp::_()->extractTables($modDir . 'tables' . DS); foreach ($tableFiles as $file) { $tableName = str_replace('.php', '', $file); if (frameGmp::_()->getTable($tableName)) { frameGmp::_()->getTable($tableName)->{$action}(); } } } } }