Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -131,6 +131,8 @@ class _languages extends \IPS\Node\Controller
|
||||
/* Save */
|
||||
\IPS\Lang::saveCustom( 'core', $values['word_key'], $values['word_custom'] ?? NULL, FALSE, $values['word_default'] );
|
||||
|
||||
\IPS\Session::i()->log( 'acplog__custom_word_added', array( $values['word_key'] => FALSE ) );
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->json( 'OK' );
|
||||
@@ -171,6 +173,8 @@ class _languages extends \IPS\Node\Controller
|
||||
|
||||
\IPS\Db::i()->delete( 'core_sys_lang_words', array( "word_key=?", \IPS\Request::i()->key ) );
|
||||
|
||||
\IPS\Session::i()->log( 'acplog__custom_word_deleted', array( \IPS\Request::i()->key => FALSE ) );
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=languages&controller=languages&do=translate&id=" . \IPS\Request::i()->langId ), 'deleted' );
|
||||
}
|
||||
|
||||
@@ -446,6 +450,7 @@ class _languages extends \IPS\Node\Controller
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
$form->saveAsSettings( $values );
|
||||
\IPS\Session::i()->log( 'acplog__language_settings_edited' );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=languages&controller=languages' ) );
|
||||
}
|
||||
|
||||
@@ -812,7 +817,7 @@ class _languages extends \IPS\Node\Controller
|
||||
|
||||
/* Set version */
|
||||
$xml->startAttribute( 'version' );
|
||||
$xml->text( $app->version_long );
|
||||
$xml->text( $app->long_version );
|
||||
$xml->endAttribute();
|
||||
|
||||
/* Add words */
|
||||
@@ -999,7 +1004,11 @@ class _languages extends \IPS\Node\Controller
|
||||
}
|
||||
|
||||
/* Only import language strings from applications we have installed */
|
||||
$applications = array_keys( \IPS\Application::applications() );
|
||||
$applications = array();
|
||||
foreach( \IPS\Application::applications() as $app )
|
||||
{
|
||||
$applications[$app->directory] = $app->long_version;
|
||||
}
|
||||
|
||||
/* Move to correct app */
|
||||
$appKey = NULL;
|
||||
@@ -1008,10 +1017,10 @@ class _languages extends \IPS\Node\Controller
|
||||
while ( $xml->read() )
|
||||
{
|
||||
$appKey = $xml->getAttribute('key');
|
||||
if ( !array_key_exists( $appKey, $data['apps'] ) AND \in_array( $appKey, $applications ) )
|
||||
if ( !array_key_exists( $appKey, $data['apps'] ) AND array_key_exists( $appKey, $applications ) )
|
||||
{
|
||||
/* Get version */
|
||||
$version = $xml->getAttribute('version');
|
||||
$version = $xml->getAttribute('version') ?: $applications[$appKey];
|
||||
|
||||
/* Import */
|
||||
$xml->read();
|
||||
|
||||
Reference in new issue
Block a user