Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

@@ -121,7 +121,7 @@ class _posting extends \IPS\Dispatcher\Controller
$form->addHeader('posting_images');
$form->add( new \IPS\Helpers\Form\WidthHeight( 'attachment_resample_size', \IPS\Settings::i()->attachment_resample_size ? explode( 'x', \IPS\Settings::i()->attachment_resample_size ) : array( 0, 0 ), FALSE, array( 'resizableDiv' => FALSE, 'unlimited' => array( 0, 0 ) ), NULL, NULL, NULL, 'attachment_resample_size' ) );
$current = ( isset( \IPS\Settings::i()->attachment_image_size ) ) ? explode( 'x', \IPS\Settings::i()->attachment_image_size ) : array( 1000, 750 );
$form->add( new \IPS\Helpers\Form\WidthHeight( 'attachment_image_size', $current, FALSE, array( 'resizableDiv' => FALSE ), NULL, NULL, NULL, 'attachment_image_size' ) );
$form->add( new \IPS\Helpers\Form\WidthHeight( 'attachment_image_size', $current, FALSE, array( 'resizableDiv' => FALSE, 'unlimited' => array( 0, 0 ) ), NULL, NULL, NULL, 'attachment_image_size' ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'editor_embeds', \IPS\Settings::i()->editor_embeds, FALSE, array( 'togglesOn' => array( 'max_video_width', 'max_internalembed_width' ) ) ) );
$form->add( new \IPS\Helpers\Form\Number( 'max_video_width', \IPS\Settings::i()->max_video_width, FALSE, array( 'unlimited' => 0 ), NULL, NULL, 'px', 'max_video_width' ) );
$form->add( new \IPS\Helpers\Form\Number( 'max_internalembed_width', \IPS\Settings::i()->max_internalembed_width, FALSE, array( 'unlimited' => 0 ), NULL, NULL, 'px', 'max_internalembed_width' ) );
@@ -130,6 +130,10 @@ class _posting extends \IPS\Dispatcher\Controller
$form->add( new \IPS\Helpers\Form\YesNo( 'allow_remote_images', \IPS\Settings::i()->allow_remote_images, FALSE, array( 'togglesOn' => array( 'allow_only_https_remote_images' ) ) ) );
$form->add( new \IPS\Helpers\Form\YesNo( 'allow_only_https_remote_images', \IPS\Settings::i()->allow_only_https_remote_images, FALSE, array(), NULL, NULL, NULL, 'allow_only_https_remote_images' ) );
$form->addHeader('post_settings_embed');
$form->add( new \IPS\Helpers\Form\Text( 'fb_ig_oembed_appid', \IPS\Settings::i()->fb_ig_oembed_appid, FALSE ) );
$form->add( new \IPS\Helpers\Form\Text( 'fb_ig_oembed_appsecret', \IPS\Settings::i()->fb_ig_oembed_appsecret, FALSE ) );
$form->addHeader('posting_content');
if ( \IPS\Login::registrationType() != 'disabled' )
{
@@ -193,8 +197,8 @@ class _posting extends \IPS\Dispatcher\Controller
$clearCss = ( $values['max_video_width'] !== \IPS\Settings::i()->max_video_width );
$values['attachment_resample_size'] = implode( 'x', $values['attachment_resample_size'] );
$values['attachment_image_size'] = implode( 'x', $values['attachment_image_size'] );
$values['attachment_resample_size'] = implode( 'x', $values['attachment_resample_size'] );
$values['attachment_image_size'] = implode( 'x', $values['attachment_image_size'] );
$values['attach_allowed_extensions'] = \is_array( $values['attach_allowed_extensions'] ) ? implode( ',', array_unique( array_map( function( $val )
{
return ltrim( $val, '.' );
@@ -539,7 +543,8 @@ class _posting extends \IPS\Dispatcher\Controller
'type' => $values['profanity_type'],
'swop' => $values['profanity_swop'],
'm_exact' => $values['profanity_m_exact'],
'action' => $values['profanity_action']
'action' => $values['profanity_action'],
'min_posts' => $values['profanity_min_posts']
);
\IPS\core\Profanity::createFromForm( $save, $current );
@@ -631,8 +636,7 @@ class _posting extends \IPS\Dispatcher\Controller
$data = \intval( $data );
/* Open XML file */
$xml = new \IPS\Xml\XMLReader;
$xml->open( \IPS\Request::i()->file );
$xml = \IPS\Xml\XMLReader::safeOpen( \IPS\Request::i()->file );
$xml->read(); //badwordexport
$xml->read(); //badwordexport
$xml->read(); //badwordgroup
@@ -781,4 +785,35 @@ class _posting extends \IPS\Dispatcher\Controller
/* And redirect */
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=settings&controller=posting" ), 'thumbnails_rebuilt' );
}
/**
* Rebuild URL refs
*
* @return void
*/
public function rebuildUrlRels()
{
\IPS\Session::i()->csrfCheck();
/* Remove any existing rebuilds */
\IPS\Db::i()->delete( 'core_queue', \IPS\Db::i()->in( '`key`', array( 'RebuildUrlRels' ) ) );
/* Unset task datastore */
unset( \IPS\Data\Store::i()->currentUrlRefRebuild );
foreach ( \IPS\Content::routedClasses( FALSE, TRUE ) as $class )
{
if( isset( $class::$databaseColumnMap['content'] ) )
{
try
{
\IPS\Task::queue( 'core', 'RebuildUrlRels', array( 'class' => $class ), 4 );
}
catch( \OutOfRangeException $ex ) { }
}
}
/* And redirect */
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( "app=core&module=settings&controller=posting" ), 'refurls_rebuilt' );
}
}