Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -12,7 +12,7 @@
|
||||
namespace IPS\nexus\Support;
|
||||
|
||||
/* 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;
|
||||
@@ -141,12 +141,12 @@ class _CustomField extends \IPS\CustomField
|
||||
parent::form( $form );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Node( 'sf_departments', $this->departments === '*' ? 0 : explode( ',', $this->departments ), TRUE, array( 'class' => 'IPS\nexus\Support\Department', 'multiple' => TRUE, 'zeroVal' => 'all' ) ), 'pf_desc' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'sf_validate_ftp', extension_loaded('ftp') ? $this->validate : FALSE, FALSE, array( 'disabled' => !extension_loaded('ftp') ), NULL, NULL, NULL, 'sf_validate_ftp' ), 'pf_not_null' );
|
||||
if ( !extension_loaded('ftp') )
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'sf_validate_ftp', \extension_loaded('ftp') ? $this->validate : FALSE, FALSE, array( 'disabled' => !\extension_loaded('ftp') ), NULL, NULL, NULL, 'sf_validate_ftp' ), 'pf_not_null' );
|
||||
if ( !\extension_loaded('ftp') )
|
||||
{
|
||||
\IPS\Member::loggedIn()->language()->words['sf_validate_ftp_desc'] = \IPS\Member::loggedIn()->language()->addToStack( 'sf_validate_ftp_noftp' );
|
||||
}
|
||||
elseif( !extension_loaded('ssh2') )
|
||||
elseif( !\extension_loaded('ssh2') )
|
||||
{
|
||||
\IPS\Member::loggedIn()->language()->words['sf_validate_ftp_warning'] = \IPS\Member::loggedIn()->language()->addToStack( 'sf_validate_ftp_nosftp' );
|
||||
}
|
||||
@@ -194,9 +194,10 @@ class _CustomField extends \IPS\CustomField
|
||||
*
|
||||
* @param mixed $value The value
|
||||
* @param callback $customValidationCode Custom validation code
|
||||
* @param \IPS\Content|NULL $content The associated content, if editing
|
||||
* @return \IPS\Helpers\Form\FormAbstract
|
||||
*/
|
||||
public function buildHelper( $value=NULL, $customValidationCode=NULL )
|
||||
public function buildHelper( $value=NULL, $customValidationCode=NULL, \IPS\Content $content = NULL )
|
||||
{
|
||||
if ( $this->type === 'UserPass' )
|
||||
{
|
||||
@@ -207,7 +208,7 @@ class _CustomField extends \IPS\CustomField
|
||||
return new \IPS\Helpers\Form\Ftp( static::$langKey . '_' . $this->id, $value, $this->not_null, array( 'validate' => $this->validate ), NULL, NULL, NULL, static::$langKey . '_' . $this->id );
|
||||
}
|
||||
|
||||
return parent::buildHelper( $value, $customValidationCode );
|
||||
return parent::buildHelper( $value, $customValidationCode, $content );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -221,7 +222,7 @@ class _CustomField extends \IPS\CustomField
|
||||
{
|
||||
if ( $this->type === 'UserPass' )
|
||||
{
|
||||
if ( !is_array( $value ) )
|
||||
if ( !\is_array( $value ) )
|
||||
{
|
||||
$value = json_decode( \IPS\Text\Encrypt::fromTag( $value )->decrypt(), TRUE );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user