Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -139,7 +139,7 @@ class _languages extends \IPS\Node\Controller
|
||||
\IPS\Data\Cache::i()->clearAll();
|
||||
|
||||
/* Log */
|
||||
\IPS\Session::i()->log( 'lang_created', array( $values['lang_title'] => FALSE ) );
|
||||
\IPS\Session::i()->log( 'acplogs__lang_created', array( $values['lang_title'] => FALSE ) );
|
||||
|
||||
/* Redirect */
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=languages&controller=languages' ), 'saved' );
|
||||
@@ -330,7 +330,7 @@ class _languages extends \IPS\Node\Controller
|
||||
{
|
||||
if ( isset( \IPS\Request::i()->cookie['vle_editor'] ) and \IPS\Request::i()->cookie['vle_editor'] )
|
||||
{
|
||||
\IPS\Output::i()->error( 'no_translate_with_vle', '', 403 ); //@todo errorcode
|
||||
\IPS\Output::i()->error( 'no_translate_with_vle', '1C126/8', 403, '' );
|
||||
}
|
||||
|
||||
try
|
||||
@@ -476,6 +476,11 @@ class _languages extends \IPS\Node\Controller
|
||||
\IPS\Output::clearJsFiles( 'global', 'root', 'js_lang_' . $word['lang_id'] . '.js' );
|
||||
}
|
||||
|
||||
if ( $word['word_key'] === '_list_format_' )
|
||||
{
|
||||
unset( \IPS\Data\Store::i()->listFormats );
|
||||
}
|
||||
|
||||
/* Clear guest page caches */
|
||||
\IPS\Data\Cache::i()->clearAll();
|
||||
|
||||
@@ -709,6 +714,29 @@ class _languages extends \IPS\Node\Controller
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Add "UTF8" if we can */
|
||||
$currentLocale = setlocale( LC_ALL, '0' );
|
||||
|
||||
foreach ( array( \IPS\Request::i()->locale . ".UTF-8", \IPS\Request::i()->locale . ".UTF8" ) as $l )
|
||||
{
|
||||
$test = setlocale( LC_ALL, $l );
|
||||
if ( $test !== FALSE )
|
||||
{
|
||||
\IPS\Request::i()->locale = $l;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach( explode( ";", $currentLocale ) as $locale )
|
||||
{
|
||||
$parts = explode( "=", $locale );
|
||||
if( in_array( $parts[0], array( 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME' ) ) )
|
||||
{
|
||||
setlocale( constant( $parts[0] ), $parts[1] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Insert the language pack record */
|
||||
$max = \IPS\Db::i()->select( 'MAX(lang_order)', 'core_sys_lang' )->first();
|
||||
$insertId = \IPS\Db::i()->insert( 'core_sys_lang', array(
|
||||
'lang_short' => \IPS\Request::i()->locale,
|
||||
|
||||
Reference in new issue
Block a user