From 233363a51f192f876b2ccaa3a873b99437a6f560 Mon Sep 17 00:00:00 2001 From: iDenn Date: Wed, 10 Aug 2016 09:01:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B0=D0=BB=D0=B5=D0=BD=D1=8C=D0=BA?= =?UTF-8?q?=D0=B0=D1=8F,=20=D0=BD=D0=BE=20=D0=BE=D1=87=D0=B5=D0=BD=D1=8C?= =?UTF-8?q?=20=D0=BD=D1=83=D0=B6=D0=BD=D0=B0=D1=8F=20=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- import/class.import.php | 1 + import/module.php | 2 +- import/sql.php | 98 ----------------------------------------- 3 files changed, 2 insertions(+), 99 deletions(-) diff --git a/import/class.import.php b/import/class.import.php index 1c1f16b..f054aa2 100644 --- a/import/class.import.php +++ b/import/class.import.php @@ -683,6 +683,7 @@ class ModuleImport { if (! $fields_active['body'][$field_id]) unset($item_fields['body'][$field_id]); + else // если поле оказалось пустым, убираем значение из формы $item_fields['body'][$field_id] = preg_replace('/\[row:(.+?)\]/', '', $item_fields['body'][$field_id]); } diff --git a/import/module.php b/import/module.php index 3962d61..b287eb6 100644 --- a/import/module.php +++ b/import/module.php @@ -16,7 +16,7 @@ if (defined('ACP')) [ 'ModuleName' => "Импорт (Облегченная версия)", 'ModuleSysName' => "import", - 'ModuleVersion' => "2.0", + 'ModuleVersion' => "2.0.1", 'ModuleDescription' => "Осуществляет импорт документов из файлов различных типов", 'ModuleAutor' => "AVE.cms Team", 'ModuleCopyright' => "© AVE.cms Team 2016", diff --git a/import/sql.php b/import/sql.php index 30aad47..6f87274 100644 --- a/import/sql.php +++ b/import/sql.php @@ -35,22 +35,6 @@ $module_sql_install[] = "CREATE TABLE CPPREFIX_module_import ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; -$module_sql_install[] = "CREATE TABLE CPPREFIX_module_import ( - `id` mediumint(5) unsigned NOT NULL auto_increment, - `import_name` varchar(255) NOT NULL, - `import_rub` int(10) unsigned default NULL, - `import_parser` varchar(255) NOT NULL, - `import_delete_docs` enum('0','1') NOT NULL default '0', - `import_docs_create` enum('0','1') NOT NULL default '0', - `import_default_file` varchar(255) NOT NULL, - `import_monitor_file` enum('0','1') NOT NULL, - - `import_last_update` int(10) unsigned default NULL, - `import_text` longtext NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8;"; - - // Обновление модуля $module_sql_update[] = " UPDATE @@ -63,85 +47,3 @@ $module_sql_update[] = " ModuleSysName = '" . $modul['ModuleSysName'] . "' LIMIT 1; "; - -// Name -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_name` `name` varchar(255) NOT NULL; -"; -// RubID -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_rub` `rub_id` int(10) unsigned NOT NULL; -"; -// Parser -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_parser` `parser` varchar(255) NOT NULL; -"; -// Docs off -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_delete_docs` `docs_disable` enum('0','1') NOT NULL default '0'; -"; -// Docs create -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_docs_create` `docs_create` enum('0','1') NOT NULL default '0'; -"; -// File -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_default_file` `file` varchar(255) NOT NULL; -"; -// Monitor -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_monitor_file` `monitor` enum('0','1') NOT NULL default '0'; -"; -// Tags -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - ADD - `tags` text NOT NULL - AFTER - `monitor` -"; -// Fields -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_text` `fields` LONGTEXT NOT NULL AFTER `tags`; -"; -// Time Edit -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - CHANGE - `import_last_update` `time_edited` int(10) unsigned NOT NULL; -"; -// LastRun -$module_sql_update[] = " - ALTER TABLE - `CPPREFIX_module_import` - ADD - `time_run` int(10) unsigned NOT NULL - AFTER - `time_edited` -";