Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1051261
D226.id529.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 3, 9:34 PM
Size
2 KB
Mime Type
text/x-diff
Expires
Fri, Jul 4, 9:34 PM (54 m, 39 s)
Engine
blob
Format
Raw Data
Handle
679220
Attached To
D226: INP-1552 Import language pack without overwrite on separate module install
D226.id529.diff
View Options
Index: core/install/install_toolkit.php
===================================================================
--- core/install/install_toolkit.php
+++ core/install/install_toolkit.php
@@ -96,7 +96,14 @@
*/
var $_installator = null;
- function kInstallToolkit()
+ /**
+ * True when module installing from admin console.
+ *
+ * @var boolean
+ */
+ protected $isSeparateModuleInstall;
+
+ function kInstallToolkit($is_separate_module_install = false)
{
$this->defaultWritablePath = DIRECTORY_SEPARATOR . 'system';
@@ -111,6 +118,7 @@
$this->INIFile = FULL_PATH . $this->defaultWritablePath . DIRECTORY_SEPARATOR . 'config.php';
$this->systemConfig = $this->ParseConfig(true);
+ $this->isSeparateModuleInstall = $is_separate_module_install;
}
/**
@@ -438,7 +446,8 @@
$language_import_helper = $this->Application->recallObject('LanguageImportHelper');
/* @var $language_import_helper LanguageImportHelper */
- $language_import_helper->performImport($lang_file, '|0|1|2|', '', $upgrade ? LANG_SKIP_EXISTING : LANG_OVERWRITE_EXISTING);
+ $import_mode = $upgrade || $this->isSeparateModuleInstall ? LANG_SKIP_EXISTING : LANG_OVERWRITE_EXISTING;
+ $language_import_helper->performImport($lang_file, '|0|1|2|', '', $import_mode);
}
/**
Index: modules/custom/install.php
===================================================================
--- modules/custom/install.php
+++ modules/custom/install.php
@@ -16,7 +16,7 @@
require_once $constants_file;
}
- $toolkit = new kInstallToolkit();
+ $toolkit = new kInstallToolkit(true);
}
else {
// install, using installation wizard
@@ -35,4 +35,4 @@
$toolkit->RunSQL('/' . $module_folder . '/install/install_data.sql');
$toolkit->ImportLanguage('/' . $module_folder . '/install/english');
-$toolkit->finalizeModuleInstall($module_folder, false);
\ No newline at end of file
+$toolkit->finalizeModuleInstall($module_folder, false);
Index: modules/in-bulletin/install.php
===================================================================
--- modules/in-bulletin/install.php
+++ modules/in-bulletin/install.php
@@ -28,7 +28,7 @@
require_once $constants_file;
}
- $toolkit = new kInstallToolkit();
+ $toolkit = new kInstallToolkit(true);
}
else {
// install, using installation wizard
Index: modules/in-commerce/install.php
===================================================================
--- modules/in-commerce/install.php
+++ modules/in-commerce/install.php
@@ -27,7 +27,7 @@
require_once $constants_file;
}
- $toolkit = new kInstallToolkit();
+ $toolkit = new kInstallToolkit(true);
}
else {
// install, using installation wizard
Index: modules/in-link/install.php
===================================================================
--- modules/in-link/install.php
+++ modules/in-link/install.php
@@ -28,7 +28,7 @@
require_once $constants_file;
}
- $toolkit = new kInstallToolkit();
+ $toolkit = new kInstallToolkit(true);
}
else {
// install, using installation wizard
Event Timeline
Log In to Comment