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\Form;
|
||||
|
||||
/* 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;
|
||||
@@ -53,6 +53,10 @@ class _SocialProfiles extends \IPS\Helpers\Form\KeyValue
|
||||
* Constructor
|
||||
* Creates the two date objects
|
||||
*
|
||||
* @param string $name Form helper name
|
||||
* @param mixed $defaultValue Default value for the helper
|
||||
* @param bool $required Helper is required (TRUE) or not (FALSE)
|
||||
* @param array $options Options for the helper instance
|
||||
* @see \IPS\Helpers\Form\Abstract::__construct
|
||||
* @return void
|
||||
*/
|
||||
@@ -62,7 +66,7 @@ class _SocialProfiles extends \IPS\Helpers\Form\KeyValue
|
||||
|
||||
$options = $this->addSocialNetworks( $options );
|
||||
|
||||
call_user_func_array( 'parent::__construct', func_get_args() );
|
||||
parent::__construct( $name, $defaultValue, $required, $options );
|
||||
|
||||
$this->keyField = new \IPS\Helpers\Form\Url( "{$name}[key]", isset( $defaultValue['key'] ) ? $defaultValue['key'] : NULL, FALSE, isset( $options['key'] ) ? $options['key'] : array() );
|
||||
$this->valueField = new \IPS\Helpers\Form\Select( "{$name}[value]", isset( $defaultValue['value'] ) ? $defaultValue['value'] : NULL, FALSE, isset( $options['value'] ) ? $options['value'] : array() );
|
||||
@@ -81,7 +85,6 @@ class _SocialProfiles extends \IPS\Helpers\Form\KeyValue
|
||||
'facebook' => "siteprofilelink_facebook",
|
||||
'twitter' => "siteprofilelink_twitter",
|
||||
'youtube' => "siteprofilelink_youtube",
|
||||
'google-plus' => "siteprofilelink_googleplus",
|
||||
'tumblr' => "siteprofilelink_tumblr",
|
||||
'deviantart' => "siteprofilelink_deviantart",
|
||||
'etsy' => "siteprofilelink_etsy",
|
||||
@@ -137,7 +140,8 @@ class _SocialProfiles extends \IPS\Helpers\Form\KeyValue
|
||||
|
||||
if( $this->customValidationCode !== NULL )
|
||||
{
|
||||
call_user_func( $this->customValidationCode, $this->value );
|
||||
$validationCode = $this->customValidationCode;
|
||||
$validationCode( $this->value );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user