Пример #1
0
 public static function processAddons($store_data, $class_name, $addons = array())
 {
     $addons = empty($addons) ? General::getInstalledAddons() : $addons;
     self::setEmptyProgressBar(self::getUnavailableLangVar('processing_addons'));
     if (empty($addons)) {
         return true;
     }
     foreach ($addons as $addon) {
         $sql_filename = Registry::get('config.dir.addons') . 'store_import/database/addons/' . General::getFileName($store_data, $class_name, $addon) . '.sql';
         $php_filename = Registry::get('config.dir.addons') . 'store_import/scripts/addons/' . General::getFileName($store_data, $class_name, $addon) . '.php';
         if (is_file($sql_filename)) {
             if (!db_import_sql_file($sql_filename, 16384, false, true, false, false, false, false)) {
                 return false;
             }
         }
         if (is_file($php_filename)) {
             include $php_filename;
         }
     }
     return true;
 }