Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -204,7 +204,7 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
return in_array( $newType, array( 'Checkbox', 'YesNo' ) );
|
||||
|
||||
case 'CheckboxSet':
|
||||
return in_array( $newType, array( 'CheckboxSet' ) );
|
||||
return in_array( $newType, array( 'CheckboxSet', 'Select' ) );
|
||||
|
||||
case 'Code':
|
||||
case 'Codemirror':
|
||||
@@ -221,6 +221,9 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
|
||||
case 'Email':
|
||||
return in_array( $newType, array( 'Email', 'Password', 'Text' ) );
|
||||
|
||||
case 'Item':
|
||||
return in_array( $newType, array( 'Item', 'TextArea' ) );
|
||||
|
||||
case 'Member':
|
||||
return in_array( $newType, array( 'Member', 'Text', 'TextArea', 'Editor' ) );
|
||||
@@ -585,7 +588,7 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
{
|
||||
if( $value !== NULL AND $value !== '' )
|
||||
{
|
||||
$value = explode( ',', htmlentities( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
|
||||
$value = explode( ',', htmlspecialchars( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
|
||||
}
|
||||
|
||||
$options['multiple'] = $this->multiple;
|
||||
@@ -595,7 +598,8 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
$options['options'] = json_decode( $this->content, TRUE );
|
||||
$options['options'] = ( $options['options'] ) ? array_combine( $options['options'], $options['options'] ) : array();
|
||||
|
||||
if ( !$this->required AND !$this->multiple )
|
||||
$requiredColumn = ( isset( $this::$databaseColumnMap['not_null'] ) and $this::$databaseColumnMap['not_null'] ) ? $this::$databaseColumnMap['not_null'] : NULL;
|
||||
if ( !$this->$requiredColumn AND !$this->multiple )
|
||||
{
|
||||
array_unshift( $options['options'], '' );
|
||||
}
|
||||
@@ -691,7 +695,14 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
*/
|
||||
public function claimAttachments( $id1 = NULL )
|
||||
{
|
||||
\IPS\File::claimAttachments( md5( get_class( $this ) . '-' . $this->id ), $id1, $this->id );
|
||||
$options = static::$editorOptions;
|
||||
|
||||
if ( !isset( $options['autoSaveKey'] ) )
|
||||
{
|
||||
$options['autoSaveKey'] = md5( get_class( $this ) . '-' . $this->id );
|
||||
}
|
||||
|
||||
\IPS\File::claimAttachments( $options['autoSaveKey'], $id1, $this->id );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -740,11 +751,11 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
|
||||
if ( $this->multiple )
|
||||
{
|
||||
return implode( '<br>', explode( ',', htmlentities( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
return implode( '<br>', explode( ',', htmlspecialchars( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return htmlentities( \IPS\Lang::wordbreak( $value ), \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
return htmlspecialchars( \IPS\Lang::wordbreak( $value ), \IPS\HTMLENTITIES, 'UTF-8', FALSE );
|
||||
}
|
||||
|
||||
case 'Codemirror':
|
||||
@@ -772,7 +783,7 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
return \IPS\Theme::i()->getTemplate( 'global', 'core', 'front' )->rating( $this->options['max'], $value );
|
||||
|
||||
case 'TextArea':
|
||||
return \IPS\Lang::wordbreak( nl2br( htmlentities( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
return \IPS\Lang::wordbreak( nl2br( htmlspecialchars( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) ) );
|
||||
|
||||
case 'Url':
|
||||
$munged = ( $value ) ? \IPS\Http\Url::external( $value )->makeSafeForAcp() : NULL;
|
||||
@@ -786,7 +797,7 @@ abstract class _CustomField extends \IPS\Node\Model
|
||||
|
||||
|
||||
default:
|
||||
return \IPS\Lang::wordbreak( htmlentities( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
|
||||
return \IPS\Lang::wordbreak( htmlspecialchars( $value, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user