Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -84,18 +84,6 @@ 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' ) )
|
||||
{
|
||||
@@ -698,7 +686,6 @@ class _languages extends \IPS\Node\Controller
|
||||
|
||||
$lang['lang_title'] = $lang['lang_title'] . ' ' . \IPS\Member::loggedIn()->language()->get('copy_noun');
|
||||
$lang['lang_default'] = FALSE;
|
||||
$lang['lang_marketplace_id'] = NULL;
|
||||
|
||||
$insertId = \IPS\Db::i()->insert( 'core_sys_lang', $lang );
|
||||
|
||||
@@ -896,10 +883,6 @@ class _languages extends \IPS\Node\Controller
|
||||
$language = \IPS\Lang::load( \IPS\Request::i()->id );
|
||||
|
||||
$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 */
|
||||
@@ -935,10 +918,6 @@ class _languages extends \IPS\Node\Controller
|
||||
{
|
||||
$url = $url->setQueryString( 'into', \IPS\Request::i()->into );
|
||||
}
|
||||
if ( isset( \IPS\Request::i()->marketplace ) )
|
||||
{
|
||||
$url = $url->setQueryString( 'marketplace', \IPS\Request::i()->marketplace );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = new \IPS\Helpers\MultipleRedirect(
|
||||
$url,
|
||||
@@ -1002,8 +981,7 @@ class _languages extends \IPS\Node\Controller
|
||||
'lang_version_long' => $xml->getAttribute('long_version'),
|
||||
'lang_author_name' => $xml->getAttribute('author_name'),
|
||||
'lang_author_url' => $xml->getAttribute('author_url'),
|
||||
'lang_update_url' => $xml->getAttribute('update_check'),
|
||||
'lang_marketplace_id' => \IPS\Request::i()->marketplace ? (int) \IPS\Request::i()->marketplace : NULL
|
||||
'lang_update_url' => $xml->getAttribute('update_check')
|
||||
) );
|
||||
|
||||
/* Copy over default language strings */
|
||||
@@ -1084,14 +1062,8 @@ class _languages extends \IPS\Node\Controller
|
||||
|
||||
@unlink( \IPS\Request::i()->file );
|
||||
|
||||
/* Redirect back to marketplace if it was installed from there. */
|
||||
if( \IPS\Request::i()->marketplace )
|
||||
if ( isset( \IPS\Request::i()->into ) )
|
||||
{
|
||||
\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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user