Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -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;
|
||||
@@ -31,6 +31,11 @@ class _newsletter extends \IPS\Widget
|
||||
* @brief Language String Key used to store the editor content
|
||||
*/
|
||||
public static $editorKey = 'block_newsletter_signup';
|
||||
|
||||
/**
|
||||
* @brief Language Key used to save the content
|
||||
*/
|
||||
public static $editorLangKey = 'block_newsletter_signup';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
@@ -51,19 +56,16 @@ class _newsletter 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_newsletter_signup_text', NULL, TRUE, array(
|
||||
'app' => 'core',
|
||||
'key' => 'block_newsletter_signup',
|
||||
'key' => static::$editorLangKey,
|
||||
'editor' => array(
|
||||
'app' => 'core',
|
||||
'key' => 'Widget',
|
||||
'autoSaveKey' => 'widget-' . $this->uniqueKey,
|
||||
'attachIds' => isset( $this->configuration['content'] ) ? array( 0, 0, 'block_newsletter_signup' ) : NULL
|
||||
'attachIds' => isset( $this->configuration['content'] ) ? array( 0, 0, static::$editorLangKey ) : NULL
|
||||
),
|
||||
) ) );
|
||||
return $form;
|
||||
@@ -76,7 +78,7 @@ class _newsletter extends \IPS\Widget
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
\IPS\Lang::deleteCustom( 'core', 'block_newsletter_signup' );
|
||||
\IPS\Lang::deleteCustom( 'core', static::$editorLangKey );
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_attachments_map', array( array( 'location_key=?', 'core_Newsletterwidget' ) ) ) as $map )
|
||||
{
|
||||
@@ -133,7 +135,6 @@ class _newsletter extends \IPS\Widget
|
||||
$url = (string) \IPS\Request::i()->url();
|
||||
}
|
||||
|
||||
$ref = base64_encode( $url );
|
||||
return $this->output( $ref );
|
||||
return $this->output( $url );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user