Version 4.1.19.4
This commit is contained in:
1 parent
2bd5025018
commit
0dc2aee5ed
312 files changed
+53730
-32118
No files matched your search
@@ -781,32 +781,6 @@ class _Upgrade
|
||||
*/
|
||||
protected function step5( $data )
|
||||
{
|
||||
if(!\IPS\Db::i()->select( 'lang_id', 'core_sys_lang', 'lang_short LIKE "ru_RU%"')->count()) {
|
||||
|
||||
$max = \IPS\Db::i()->select( 'MAX(lang_order)', 'core_sys_lang' )->first();
|
||||
/* Insert the actual language */
|
||||
|
||||
$insertId = \IPS\Db::i()->insert( 'core_sys_lang', array(
|
||||
'lang_short' => 'ru_RU',
|
||||
'lang_title' => "Русский (RU)",
|
||||
'lang_isrtl' => 0,
|
||||
'lang_order' => ++$max
|
||||
)
|
||||
);
|
||||
|
||||
/* Copy over language strings */
|
||||
$default = \IPS\Lang::defaultLanguage();
|
||||
$prefix = \IPS\Db::i()->prefix;
|
||||
$defaultStmt = \IPS\Db::i()->prepare( "INSERT INTO `{$prefix}core_sys_lang_words` ( `lang_id`, `word_app`, `word_key`, `word_default`, `word_custom`, `word_default_version`, `word_custom_version`, `word_js`, `word_export` ) SELECT {$insertId} AS `lang_id`, `word_app`, `word_key`, `word_default`, NULL AS `word_custom`, `word_default_version`, NULL AS `word_custom_version`, `word_js`, `word_export` FROM `{$prefix}core_sys_lang_words` WHERE `lang_id`={$default} AND `word_export`=1" );
|
||||
$defaultStmt->execute();
|
||||
$customStmt = \IPS\Db::i()->prepare( "INSERT INTO `{$prefix}core_sys_lang_words` ( `lang_id`, `word_app`, `word_key`, `word_default`, `word_custom`, `word_default_version`, `word_custom_version`, `word_js`, `word_export` ) SELECT {$insertId} AS `lang_id`, `word_app`, `word_key`, `word_default`, `word_custom`, `word_default_version`, `word_custom_version`, `word_js`, `word_export` FROM `{$prefix}core_sys_lang_words` WHERE `lang_id`={$default} AND `word_export`=0" );
|
||||
$customStmt->execute();
|
||||
|
||||
unset( \IPS\Data\Store::i()->languages );
|
||||
|
||||
/* Clear guest page caches */
|
||||
\IPS\Data\Cache::i()->clearAll();
|
||||
}
|
||||
return $this->appLoop( $data, function( $app ) use ($data)
|
||||
{
|
||||
if ( !isset( $data[2] ) )
|
||||
|
||||
Reference in new issue
Block a user