本文整理汇总了PHP中db_import_sql_file函数的典型用法代码示例。如果您正苦于以下问题:PHP db_import_sql_file函数的具体用法?PHP db_import_sql_file怎么用?PHP db_import_sql_file使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了db_import_sql_file函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
General::backupSettings();
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
//Find all quick menu linked to the template_editor and change it to file_editor
$quick_menus = db_get_array("SELECT * FROM ?:quick_menu WHERE url LIKE '%template_editor%'");
foreach ($quick_menus as $quick_menu) {
$quick_menu['url'] = str_replace('template_editor', 'file_editor', $quick_menu['url']);
db_query("REPLACE INTO ?:quick_menu ?e", $quick_menu);
}
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例2: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::restoreSettings();
db_query("\n DELETE FROM ?:settings_objects\n WHERE name IN (\n 'product_notify_vendor',\n 'order_notify_vendor',\n 'page_notify_vendor',\n 'company_discussion_type',\n 'company_only_buyers',\n 'company_posts_per_page',\n 'company_post_approval',\n 'company_post_ip_check',\n 'company_notification_email',\n 'company_notify_vendor',\n 'companies_setting',\n 'include_companies',\n 'companies_change',\n 'companies_priority',\n 'product_share_discussion',\n 'news_share_discussion',\n 'page_share_discussion',\n 'testimonials_from_all_stores'\n )\n AND section_id IN (\n SELECT section_id FROM ?:settings_sections\n WHERE name IN (\n 'discussion',\n 'google_sitemap'\n )\n )\n ");
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('state_descriptions', 'state_id');
db_query('DROP TABLE IF EXISTS ?:se_queue');
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例3: import
public function import($db_already_cloned)
{
Registry::set('runtime.simple_ultimate', true);
Registry::del('runtime.forced_company_id');
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('shipping_service_descriptions', 'service_id');
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例4: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
General::processAddons($this->store_data, __CLASS__);
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
// General::restoreSettings();
if (db_get_field("SELECT status FROM ?:addons WHERE addon = 'searchanise'") != 'D') {
db_query("UPDATE ?:addons SET status = 'D' WHERE addon = 'searchanise'");
fn_set_notification('W', __('warning'), General::getUnavailableLangVar('uc_searchanise_disabled'));
}
General::setActualLangValues();
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('ult_language_values', array('name', 'company_id'));
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例5: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
// General::restoreSettings();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例6: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
General::processAddons($this->store_data, __CLASS__);
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::convertPresets403To411();
General::convertScrollerBlocks();
db_query("UPDATE ?:sales_reports_tables SET type = 'P' WHERE type = 'C'");
General::setEmptyProgressBar();
return true;
}
示例7: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::addEsStates();
General::restoreSettings();
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('state_descriptions', 'state_id');
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例8: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::setEmptyProgressBar();
General::restoreSettings();
db_query("\n DELETE FROM ?:settings_objects\n WHERE name IN (\n 'product_share_discussion',\n 'news_share_discussion',\n 'page_share_discussion',\n 'testimonials_from_all_stores'\n )\n AND section_id IN (\n SELECT section_id FROM ?:settings_sections\n WHERE name = 'discussion'\n )\n ");
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('shipping_service_descriptions', 'service_id');
General::updateAltLanguages('state_descriptions', 'state_id');
General::setEmptyProgressBar();
return true;
}
示例9: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
General::backupSettings();
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
$payflow_enabled = db_get_field("SELECT processor_params FROM ?:payments WHERE processor_id = (SELECT processor_id FROM ?:payment_processors WHERE processor_script = 'payflow_pro.php')");
if (!empty($payflow_enabled)) {
$payflow_params = unserialize($payflow_enabled);
unset($payflow_params['country']);
$payflow_params['currency'] = 840;
db_query("UPDATE ?:payments SET processor_params = ?s WHERE processor_id = (SELECT processor_id FROM ?:payment_processors WHERE processor_script = 'payflow_pro.php')", serialize($payflow_params));
}
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例10: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
General::processAddons($this->store_data, __CLASS__);
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}
示例11: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::processAddons($this->store_data, __CLASS__);
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('shipping_service_descriptions', 'service_id');
General::updateAltLanguages('privilege_descriptions', 'privilege');
General::updateAltLanguages('privilege_section_descriptions', 'section_id');
General::updateAltLanguages('state_descriptions', 'state_id');
General::updateAltLanguages('country_descriptions', 'code');
General::processBlocks();
General::setEmptyProgressBar();
if (db_get_field("SHOW TABLES LIKE '?:mailing_lists'")) {
db_query("ALTER TABLE ?:mailing_lists DROP `show_on_sidebar`");
}
return true;
}
示例12: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
//We should get locations before database upgrade. It is for the old versions.
$bm_locations = $this->_getBmLocations();
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
if (General::supplierSettings('enabled')) {
$this->_installSuppliers();
}
$skin_name = $this->_getSkinName();
General::processAddons($this->store_data, __CLASS__);
$this->_processCurrencies();
$this->_processLanguages();
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::uninstallAddons(array('twigmo', 'searchanise', 'live_help', 'exim_store', 'webmail'));
// General::restoreSettings();
$this->_processPayments();
$this->_processBMContainers();
$this->_createLayouts($bm_locations);
$this->_convertOrders();
$this->_processImages($skin_name);
$this->_processFiles('downloads');
$this->_processFiles('attachments');
$this->_processFiles('custom_files');
$this->_processLanguageValues();
$this->_fillSharingTable();
General::updateStatusColors();
General::processBMBlocksTemplates();
General::processBMProductFiltersBlockContent();
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('shipping_service_descriptions', 'service_id');
General::updateAltLanguages('privilege_descriptions', 'privilege');
General::updateAltLanguages('privilege_section_descriptions', 'section_id');
General::updateAltLanguages('state_descriptions', 'state_id');
General::updateAltLanguages('country_descriptions', 'code');
General::updateAltLanguages('bm_blocks_descriptions', 'block_id');
General::updateAltLanguages('bm_locations_descriptions', 'location_id');
General::updateAltLanguages('bm_blocks_content', array('snapping_id', 'object_id', 'object_type', 'block_id'));
return true;
}
示例13: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$default_company = General::getDefaultCompany();
General::processAddons($this->store_data, __CLASS__);
$this->_processCurrencies();
$this->_processLanguages();
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
$default_company_id = (int) General::createDefaultCompany($default_company);
$this->_updateCompanyId($default_company_id);
$this->_processPayments();
$this->_processBMContainers();
$this->_createLayouts();
$this->_convertOrders($default_company_id);
$this->_processLanguageValues();
$this->_processProducts($default_company_id);
$this->_processShippings($default_company_id);
General::updateStatusColors();
General::processBMBlocksTemplates();
General::processBMProductFiltersBlockContent();
General::setEmptyProgressBar(General::getUnavailableLangVar('updating_languages'));
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::updateAltLanguages('shipping_service_descriptions', 'service_id');
General::updateAltLanguages('privilege_descriptions', 'privilege');
General::updateAltLanguages('privilege_section_descriptions', 'section_id');
General::updateAltLanguages('state_descriptions', 'state_id');
General::updateAltLanguages('country_descriptions', 'code');
General::updateAltLanguages('bm_blocks_descriptions', 'block_id');
General::updateAltLanguages('bm_locations_descriptions', 'location_id');
General::updateAltLanguages('bm_blocks_content', array('snapping_id', 'object_id', 'object_type', 'block_id'));
return true;
}
示例14: import
public function import($db_already_cloned)
{
Registry::set('runtime.simple_ultimate', true);
Registry::del('runtime.forced_company_id');
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToImportedDB($this->store_data);
$supplier_settings = $this->getSupplierSettings();
General::setSupplierSettings($supplier_settings);
$default_language = db_get_field("SELECT value FROM ?:settings WHERE option_name = 'customer_default_language' AND section_id = 'Appearance'");
$settings_to_be_saved = array('use_email_as_login', 'admin_default_language', 'customer_default_language', 'disable_shipping', 'fedex_enabled', 'ups_enabled', 'usps_enabled', 'dhl_enabled', 'aup_enabled', 'can_enabled', 'swisspost_enabled', 'seo_product_type', 'seo_category_type', 'single_url', 'seo_language');
$settings_to_be_saved_values = General::get22xSettings($settings_to_be_saved);
$addons = General::get22xAddons();
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
General::processAddons($this->store_data, __CLASS__, array_keys($addons));
if (!empty($addons)) {
General::processAddonsSettings($addons);
}
General::enableInstalledAddons($addons);
General::setEmptyProgressBar();
$this->_importMenu();
$this->_copyImages();
$this->_copyFiles();
$this->_patchProfileFields();
$this->_normalizeProductViews();
$this->_normalizeUserGroupIds();
$this->_fixLanguagesMissedInImported($default_language);
General::addStatusColors();
General::copyProductsBlocks($this->store_data);
General::restore22xSavedSetting($settings_to_be_saved_values);
General::setEmptyProgressBar();
return true;
}
示例15: import
public function import($db_already_cloned)
{
General::setProgressTitle(__CLASS__);
if (!$db_already_cloned) {
if (!General::cloneImportedDB($this->store_data)) {
return false;
}
} else {
General::setEmptyProgressBar(__('importing_data'));
General::setEmptyProgressBar(__('importing_data'));
}
General::connectToOriginalDB(array('table_prefix' => General::formatPrefix()));
General::processAddons($this->store_data, __CLASS__);
$main_sql = Registry::get('config.dir.addons') . 'store_import/database/' . $this->main_sql_filename;
if (is_file($main_sql)) {
//Process main sql
if (!db_import_sql_file($main_sql)) {
return false;
}
}
// General::restoreSettings();
db_query("ALTER TABLE ?:currencies CHANGE `decimals_separator` `decimals_separator` varchar(6) NOT NULL DEFAULT '.'");
db_query("ALTER TABLE ?:currencies CHANGE `thousands_separator` `thousands_separator` varchar(6) NOT NULL DEFAULT ','");
db_query("ALTER TABLE ?:bm_locations ADD `custom_html` TEXT NOT NULL");
db_query("ALTER TABLE ?:order_data CHANGE `data` `data` LONGBLOB NOT NULL");
db_query("ALTER TABLE ?:order_details CHANGE `extra` `extra` LONGBLOB NOT NULL");
db_query("ALTER TABLE ?:order_transactions CHANGE `extra` `extra` LONGBLOB NOT NULL");
db_query('UPDATE ?:shipping_services SET `code` = "Media Mail Parcel" WHERE `module` = "usps" AND `code` = "Media Mail"');
db_query('UPDATE ?:shipping_services SET `code` = "Library Mail Parcel" WHERE `module` = "usps" AND `code` = "Library Mail"');
db_query("ALTER TABLE ?:categories ADD `level` INT(11) UNSIGNED NOT NULL DEFAULT '1' AFTER `id_path`");
db_query("UPDATE ?:categories AS `c` SET `c`.`level` = ((length(`c`.`id_path`) - length(REPLACE(`c`.`id_path`, '/', ''))) + 1)");
General::updateAltLanguages('language_values', 'name');
General::updateAltLanguages('settings_descriptions', array('object_id', 'object_type'));
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
General::setEmptyProgressBar();
return true;
}