mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-05 19:24:08 +03:00
Do not use plugins at system installation
This commit is contained in:
parent
a033d72f20
commit
bd5d6a277d
@ -29,9 +29,6 @@ session_start();
|
|||||||
|
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/config.php');
|
require_once(MIBEW_FS_ROOT.'/libs/config.php');
|
||||||
|
|
||||||
// Include some classes
|
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/PluginManager.php');
|
|
||||||
|
|
||||||
// Include common functions
|
// Include common functions
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
|
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
|
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
|
||||||
|
@ -29,9 +29,6 @@ session_start();
|
|||||||
|
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/config.php');
|
require_once(MIBEW_FS_ROOT.'/libs/config.php');
|
||||||
|
|
||||||
// Include some classes
|
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/classes/Mibew/PluginManager.php');
|
|
||||||
|
|
||||||
// Include common functions
|
// Include common functions
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
|
require_once(MIBEW_FS_ROOT.'/libs/common/constants.php');
|
||||||
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
|
require_once(MIBEW_FS_ROOT.'/libs/common/locale.php');
|
||||||
|
@ -160,20 +160,23 @@ function load_messages($locale) {
|
|||||||
|
|
||||||
$messages[$locale] = $locale_data['messages'];
|
$messages[$locale] = $locale_data['messages'];
|
||||||
|
|
||||||
// Load active plugins localization
|
// Plugins are unavailable on system installation
|
||||||
$plugins_list = array_keys(PluginManager::getAllPlugins());
|
if (!installation_in_progress()) {
|
||||||
|
// Load active plugins localization
|
||||||
|
$plugins_list = array_keys(PluginManager::getAllPlugins());
|
||||||
|
|
||||||
foreach($plugins_list as $plugin_name) {
|
foreach($plugins_list as $plugin_name) {
|
||||||
$locale_file = MIBEW_FS_ROOT .
|
$locale_file = MIBEW_FS_ROOT .
|
||||||
"/plugins/{$plugin_name}/locales/{$locale}/properties";
|
"/plugins/{$plugin_name}/locales/{$locale}/properties";
|
||||||
if (is_readable($locale_file)) {
|
if (is_readable($locale_file)) {
|
||||||
$locale_data = read_locale_file($locale_file);
|
$locale_data = read_locale_file($locale_file);
|
||||||
// array_merge used to provide an ability for plugins to override
|
// array_merge used to provide an ability for plugins to override
|
||||||
// localized strings
|
// localized strings
|
||||||
$messages[$locale] = array_merge(
|
$messages[$locale] = array_merge(
|
||||||
$messages[$locale],
|
$messages[$locale],
|
||||||
$locale_data['messages']
|
$locale_data['messages']
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user