예제 #1
0
 public static function _installTables($module)
 {
     $modDir = empty($module['ex_plug_dir']) ? BUP_MODULES_DIR . $module['code'] . DS : utilsBup::getPluginDir($module['ex_plug_dir']) . $module['code'] . DS;
     if (is_dir($modDir . 'tables')) {
         $tableFiles = utilsBup::getFilesList($modDir . 'tables');
         if (!empty($tableFiles)) {
             frameBup::_()->extractTables($modDir . 'tables' . DS);
             foreach ($tableFiles as $file) {
                 $tableName = str_replace('.php', '', $file);
                 if (frameBup::_()->getTable($tableName)) {
                     frameBup::_()->getTable($tableName)->install();
                 }
             }
         }
     }
 }