Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -86,15 +86,17 @@ class _files extends \IPS\Dispatcher\Controller
$table->parsers = array(
'attach_file' => function( $val, $row ) use ( $table )
{
$url = \IPS\Http\Url::external( \IPS\File::get( 'core_Attachment', $row['attach_location'] )->url )->makeSafeForAcp( $row['attach_is_image'] );
if ( $row['attach_is_image'] and $table->filter === 'images' )
{
$url = \IPS\Http\Url::external( \IPS\File::get( 'core_Attachment', $row['attach_location'] )->url )->makeSafeForAcp( TRUE );
return "<a href='{$url}' target='_blank'><img src='{$url}' style='max-height:200px'></a>";
}
$val = htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE );
return "<a href='{$url}' target='_blank'>{$val}</a>";
else
{
$url = \IPS\Http\Url::external( \IPS\Settings::i()->base_url . "applications/core/interface/file/attachment.php" )->setQueryString( 'id', $row['attach_id'] )->makeSafeForAcp( FALSE );
$val = htmlentities( $val, \IPS\HTMLENTITIES, 'UTF-8', FALSE );
return "<a href='{$url}' target='_blank'>{$val}</a>";
}
},
'attach_filesize' => function( $val )
{
@@ -253,8 +255,8 @@ class _files extends \IPS\Dispatcher\Controller
'disabled'=> class_exists( 'Imagick', FALSE ) ? array() : array( 'imagemagick' )
) ) );
$form->add( new \IPS\Helpers\Form\Number( 'image_jpg_quality', \IPS\Settings::i()->image_jpg_quality, FALSE, array( 'min' => 0, 'max' => 100, 'range' => TRUE ), NULL, NULL, NULL, 'image_jpg_quality' ) );
$form->add( new \IPS\Helpers\Form\Number( 'image_png_quality_gd', \IPS\Settings::i()->image_png_quality_gd, FALSE, array( 'min' => 0, 'max' => 9, 'range' => TRUE ), NULL, NULL, NULL, 'image_png_quality_gd' ) );
$form->add( new \IPS\Helpers\Form\Number( 'image_jpg_quality', \IPS\Settings::i()->image_jpg_quality, FALSE, array( 'min' => 0, 'max' => 100, 'range' => TRUE, 'step' => 1 ), NULL, NULL, NULL, 'image_jpg_quality' ) );
$form->add( new \IPS\Helpers\Form\Number( 'image_png_quality_gd', \IPS\Settings::i()->image_png_quality_gd, FALSE, array( 'min' => 0, 'max' => 9, 'range' => TRUE, 'step' => 1 ), NULL, NULL, NULL, 'image_png_quality_gd' ) );
if ( $values = $form->values() )
{
@@ -632,10 +634,12 @@ class _files extends \IPS\Dispatcher\Controller
\IPS\Db::i()->update( 'core_file_storage', array( 'configuration' => json_encode( $currentHandlerSettings ) ), array( 'id=?', $current['id'] ) );
unset( \IPS\Data\Store::i()->storageConfigurations );
}
/* Clear guest page caches */
\IPS\Data\Cache::i()->clearAll();
if ( $current !== NULL and ! $createNewAndMove )
{
$classname::getClass( $current['id'] )->settingsUpdated();
}
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=overview&controller=files&do=settings&tab=configurations' ), 'saved' );
}
catch ( \LogicException $e )
@@ -666,7 +670,7 @@ class _files extends \IPS\Dispatcher\Controller
}
catch( \UnderflowException $e )
{
\IPS\Output::i()->error( 'files_invalid_id', '3C158/5', 404, '' );
\IPS\Output::i()->json( array( 'needsMoving' => FALSE ) );
}
$currentConf = json_decode( $current['configuration'], TRUE );