Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

+12 -10
View File
@@ -11,7 +11,7 @@
namespace IPS\core\widgets;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
@@ -32,6 +32,11 @@ class _guestSignUp extends \IPS\Widget
*/
public static $editorKey = 'block_guestsignup_message';
/**
* @brief Language Key used to save the content
*/
public static $editorLangKey = 'widget_guestsignup_text';
/**
* @brief App
@@ -46,7 +51,7 @@ class _guestSignUp extends \IPS\Widget
/**
* Constructor
*
* @param String $uniqueKey Unique key for this specific instance
* @param string $uniqueKey Unique key for this specific instance
* @param array $configuration Widget custom configuration
* @param null|string|array $access Array/JSON string of executable apps (core=sidebar only, content=IP.Content only, etc)
* @param null|string $orientation Orientation (top, bottom, right, left)
@@ -66,20 +71,17 @@ class _guestSignUp extends \IPS\Widget
*/
public function configuration( &$form=null )
{
if ( $form === null )
{
$form = new \IPS\Helpers\Form;
}
$form = parent::configuration( $form );
$form->add( new \IPS\Helpers\Form\Translatable( 'block_guestsignup_title', NULL, TRUE, array( 'app'=>'core', 'key' =>'widget_guestsignup_title' ) ) );
$form->add( new \IPS\Helpers\Form\Translatable( 'block_guestsignup_message', NULL, TRUE, array(
'app' => 'core',
'key' => 'widget_guestsignup_text',
'key' => static::$editorLangKey,
'editor' => array(
'app' => 'core',
'key' => 'Widget',
'autoSaveKey' => 'widget-' . $this->uniqueKey,
'attachIds' => isset( $this->configuration['content'] ) ? array( 0, 0, 'widget_guestsignup_text' ) : NULL
'attachIds' => isset( $this->configuration['content'] ) ? array( 0, 0, static::$editorLangKey ) : NULL
),
) ) );
return $form;
@@ -124,7 +126,7 @@ class _guestSignUp extends \IPS\Widget
public function preConfig( $values )
{
\IPS\File::claimAttachments( 'widget-' . $this->uniqueKey, 0, 0, 'widget_guestsignup_text' );
\IPS\Lang::saveCustom( 'core', 'widget_guestsignup_text', $values[ 'block_guestsignup_message' ] );
\IPS\Lang::saveCustom( 'core', static::$editorLangKey, $values[ 'block_guestsignup_message' ] );
\IPS\Lang::saveCustom( 'core', 'widget_guestsignup_title', $values[ 'block_guestsignup_title' ] );
return $values;
}
@@ -151,7 +153,7 @@ class _guestSignUp extends \IPS\Widget
}
$login = new \IPS\Login( \IPS\Http\Url::internal( 'app=core&module=system&controller=login', 'front', 'login' ) );
return $this->output( $login, $title, $text );
return $this->output( $login, $text, $title );
}
}
}