Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

@@ -84,6 +84,18 @@ class _languages extends \IPS\Node\Controller
protected function manage()
{
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'flags.css', 'core', 'global' ) );
if ( !\IPS\Request::i()->isAjax() AND \IPS\IPS::canManageResources() )
{
foreach ( \IPS\Lang::languages() as $app )
{
if ( $app->marketplace_id )
{
\IPS\Output::i()->output .= \IPS\Theme::i()->getTemplate( 'marketplace' )->removalBanner( FALSE );
break;
}
}
}
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'core', 'languages', 'lang_words' ) )
{
@@ -187,7 +199,6 @@ class _languages extends \IPS\Node\Controller
{
/* Build form */
$form = new \IPS\Helpers\Form;
$form->addMessage('languages_manual_install_warning');
$form->add( new \IPS\Helpers\Form\Upload( 'lang_upload', NULL, TRUE, array( 'allowedFileTypes' => array( 'xml' ), 'temporary' => TRUE ) ) );
\IPS\Lang::localeField( $form );
@@ -380,6 +391,9 @@ class _languages extends \IPS\Node\Controller
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
/* Update the essential cookie name list */
unset( \IPS\Data\Store::i()->essentialCookieNames );
/* Log */
if ( \IPS\Request::i()->status )
{
@@ -464,7 +478,7 @@ class _languages extends \IPS\Node\Controller
*/
protected function translate()
{
if ( isset( \IPS\Request::i()->cookie['vle_editor'] ) and \IPS\Request::i()->cookie['vle_editor'] )
if ( \IPS\Lang::vleActive() )
{
\IPS\Output::i()->error( 'no_translate_with_vle', '1C126/8', 403, '' );
}
@@ -531,6 +545,10 @@ class _languages extends \IPS\Node\Controller
return \IPS\Theme::i()->getTemplate( 'global' )->shortMessage( \IPS\Member::loggedIn()->language()->addToStack('translate_na'), array( 'ipsBadge', 'ipsBadge_neutral' ) );
}
},
'word_default' => function( $val, $row )
{
return htmlspecialchars( $val, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', TRUE );
},
'word_custom' => function( $val, $row )
{
return \IPS\Theme::i()->getTemplate( 'customization' )->langString( $val, $row['word_key'], $row['lang_id'], $row['word_js'] );
@@ -717,6 +735,9 @@ class _languages extends \IPS\Node\Controller
unset( \IPS\Data\Store::i()->languages );
unset( \IPS\Data\Store::i()->listFormats );
/* Update the essential cookie name list */
unset( \IPS\Data\Store::i()->essentialCookieNames );
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
@@ -873,13 +894,12 @@ class _languages extends \IPS\Node\Controller
\IPS\Dispatcher::i()->checkAcpPermission( 'lang_words' );
$language = \IPS\Lang::load( \IPS\Request::i()->id );
if( $language->marketplace_id )
{
\IPS\Output::i()->error( 'app_upload_marketplace_only', '2C126/B', 403, '' );
}
$form = new \IPS\Helpers\Form;
if( $language->marketplace_id )
{
$form->addMessage( 'marketplace_resource_manual_upgrade', 'ipsMessage ipsMessage_info' );
}
$form->add( new \IPS\Helpers\Form\Upload( 'lang_upload', NULL, TRUE, array( 'allowedFileTypes' => array( 'xml' ), 'temporary' => TRUE ) ) );
/* Handle submissions */
@@ -1059,6 +1079,9 @@ class _languages extends \IPS\Node\Controller
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
/* Update the essential cookie name list */
unset( \IPS\Data\Store::i()->essentialCookieNames );
@unlink( \IPS\Request::i()->file );
/* Redirect back to marketplace if it was installed from there. */
@@ -1066,6 +1089,11 @@ class _languages extends \IPS\Node\Controller
{
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=marketplace&controller=marketplace&do=viewFile&id=' . \IPS\Request::i()->marketplace ), 'lang_installed' );
}
elseif ( isset( \IPS\Request::i()->into ) )
{
\IPS\Lang::load( (int) \IPS\Request::i()->into )->marketplace_id = NULL;
\IPS\Lang::load( (int) \IPS\Request::i()->into )->save();
}
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=languages&controller=languages' ) );
}