Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -240,9 +240,9 @@ class _Folder extends \IPS\Node\Model
|
||||
|
||||
try
|
||||
{
|
||||
$test = \IPS\cms\Pages\Folder::load( \IPS\Http\Url\Friendly::seoTitle( $val ), 'folder_name' );
|
||||
$test = \IPS\cms\Pages\Folder::load( ( $val === '.well-known' ) ? $val : \IPS\Http\Url\Friendly::seoTitle( $val ), 'folder_name' );
|
||||
|
||||
if ( ! empty( \IPS\Request::i()->id ) and $test->id != \IPS\Request::i()->id )
|
||||
if ( empty( \IPS\Request::i()->id ) or $test->id != \IPS\Request::i()->id )
|
||||
{
|
||||
throw new \InvalidArgumentException('content_folder_name_in_use');
|
||||
}
|
||||
@@ -250,7 +250,7 @@ class _Folder extends \IPS\Node\Model
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
/* If we hit here, we don't have an existing folder by that name so check for a collision */
|
||||
if ( \IPS\Request::i()->folder_parent_id == 0 AND \IPS\cms\Pages\Page::isFurlCollision( \IPS\Http\Url\Friendly::seoTitle( $val ) ) )
|
||||
if ( \IPS\Request::i()->folder_parent_id == 0 AND \IPS\cms\Pages\Page::isFurlCollision( ( $val === '.well-known' ) ? $val : \IPS\Http\Url\Friendly::seoTitle( $val ) ) )
|
||||
{
|
||||
throw new \InvalidArgumentException('content_folder_name_furl_collision');
|
||||
}
|
||||
@@ -300,7 +300,15 @@ class _Folder extends \IPS\Node\Model
|
||||
|
||||
if( isset( $values['folder_name'] ) )
|
||||
{
|
||||
$values['name'] = \IPS\Http\Url\Friendly::seoTitle( $values['folder_name'] );
|
||||
/* If the folder name is explicitly .well-known, allow that as it will allow sites on CiC to use Apple Pay */
|
||||
if ( $values['folder_name'] === '.well-known' )
|
||||
{
|
||||
$values['name'] = $values['folder_name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['name'] = \IPS\Http\Url\Friendly::seoTitle( $values['folder_name'] );
|
||||
}
|
||||
unset( $values['folder_name'] );
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user