Version 4.7.8
This commit is contained in:
1 parent
7b7404e741
commit
fd22d99e69
688 files changed
+19814
-10890
No files matched your search
@@ -41,12 +41,14 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
|
||||
if ( $values = $form->values( TRUE ) )
|
||||
{
|
||||
$this->_saveSettingsForm( $form, $values );
|
||||
$this->_saveSettingsForm( $form, $values, $redirectMessage );
|
||||
|
||||
/* Clear guest page caches */
|
||||
\IPS\Data\Cache::i()->clearAll();
|
||||
|
||||
\IPS\Session::i()->log( 'acplogs__downloads_settings' );
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=downloads&module=downloads&controller=settings' ), $redirectMessage );
|
||||
|
||||
}
|
||||
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('settings');
|
||||
@@ -99,6 +101,13 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
$form->add( new \IPS\Helpers\Form\Stack( 'idm_link_blacklist', explode( ',', \IPS\Settings::i()->idm_link_blacklist ), FALSE, array( 'placeholder' => 'example.com' ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_antileech', \IPS\Settings::i()->idm_antileech ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_rss', \IPS\Settings::i()->idm_rss ) );
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'idm_default_view', \IPS\Settings::i()->idm_default_view, FALSE, array(
|
||||
'options' => array(
|
||||
'table' => 'downloads_default_view_table',
|
||||
'grid' => 'downloads_default_view_grid',
|
||||
),
|
||||
) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'idm_default_view_choose', \IPS\Settings::i()->idm_default_view_choose ) );
|
||||
|
||||
if ( \IPS\Application::appIsEnabled( 'nexus' ) )
|
||||
{
|
||||
@@ -120,8 +129,9 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
*
|
||||
* @param \IPS\Helpers\Form $form The Form Object
|
||||
* @param array $values Values
|
||||
* @param string $redirectMessage Message to show on redirect
|
||||
*/
|
||||
protected function _saveSettingsForm( \IPS\Helpers\Form $form, array $values )
|
||||
protected function _saveSettingsForm( \IPS\Helpers\Form $form, array $values, ?string &$redirectMessage )
|
||||
{
|
||||
/* We can't store '' for idm_nexus_display as it will fall back to the default */
|
||||
if ( \IPS\Application::appIsEnabled( 'nexus' ) and !$values['idm_nexus_display'] )
|
||||
@@ -141,11 +151,11 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
\IPS\Db::i()->delete( 'core_queue', array( '`app`=? OR `key`=?', 'downloads', 'RebuildScreenshotWatermarks' ) );
|
||||
|
||||
\IPS\Task::queue( 'downloads', 'RebuildScreenshotWatermarks', array( ), 5 );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('download_settings_saved_rebuilding');
|
||||
$redirectMessage = 'download_settings_saved_rebuilding';
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
$redirectMessage ='saved';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user