Update
This commit is contained in:
50
core/bitrix/modules/landing/lib/internals/blockfavourite.php
Normal file
50
core/bitrix/modules/landing/lib/internals/blockfavourite.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
namespace Bitrix\Landing\Internals;
|
||||
|
||||
use \Bitrix\Main\Entity;
|
||||
use \Bitrix\Main\Localization\Loc;
|
||||
|
||||
Loc::loadMessages(__FILE__);
|
||||
|
||||
/**
|
||||
* Class BlockFavouriteTable
|
||||
*/
|
||||
class BlockFavouriteTable extends Entity\DataManager
|
||||
{
|
||||
/**
|
||||
* Returns DB table name for entity.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getTableName(): string
|
||||
{
|
||||
return 'b_landing_block_favourite';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns entity map definition.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getMap(): array
|
||||
{
|
||||
return array(
|
||||
'ID' => new Entity\IntegerField('ID', array(
|
||||
'title' => 'ID',
|
||||
'primary' => true,
|
||||
'autocomplete' => true,
|
||||
)),
|
||||
'USER_ID' => new Entity\IntegerField('USER_ID', array(
|
||||
'title' => Loc::getMessage('LANDING_TABLE_BLOCK_FAVOURITE_FIELD_USER_ID'),
|
||||
'required' => true
|
||||
)),
|
||||
'CODE' => new Entity\StringField('CODE', array(
|
||||
'title' => Loc::getMessage('LANDING_TABLE_BLOCK_FAVOURITE_FIELD_CODE'),
|
||||
'required' => true
|
||||
)),
|
||||
'DATE_CREATE' => new Entity\DatetimeField('DATE_CREATE', array(
|
||||
'title' => Loc::getMessage('LANDING_TABLE_BLOCK_FAVOURITE_FIELD_DATE_CREATE')
|
||||
))
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class SiteTable extends Entity\DataManager
|
||||
'default_value' => 'Y'
|
||||
)),
|
||||
'DELETED' => new Entity\StringField('DELETED', array(
|
||||
'title' => Loc::getMessage('LANDING_TABLE_FIELD_LANDING_DELETED'),
|
||||
'title' => Loc::getMessage('LANDING_TABLE_FIELD_SITE_DELETED'),
|
||||
'default_value' => 'N'
|
||||
)),
|
||||
'TITLE' => new Entity\StringField('TITLE', array(
|
||||
@@ -937,34 +937,7 @@ class SiteTable extends Entity\DataManager
|
||||
{
|
||||
try
|
||||
{
|
||||
//todo: revert changes after change .by domain
|
||||
if (
|
||||
!str_ends_with($domainName, '.b24site.online')
|
||||
&& !str_ends_with($domainName, '.b24shop.online')
|
||||
)
|
||||
{
|
||||
$domainExist = $siteController::isDomainExists($domainName);
|
||||
}
|
||||
else
|
||||
{
|
||||
$byDomainName = '';
|
||||
if (str_ends_with($domainName, '.b24site.online'))
|
||||
{
|
||||
$byDomainName = str_replace('.b24site.online', '.bitrix24site.by', $domainName);
|
||||
}
|
||||
if (str_ends_with($domainName, '.b24shop.online'))
|
||||
{
|
||||
$byDomainName = str_replace('.b24shop.online', '.bitrix24shop.by', $domainName);
|
||||
}
|
||||
if ($byDomainName !== '' && $siteController::isDomainExists($byDomainName))
|
||||
{
|
||||
$domainExist = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$domainExist = $siteController::isDomainExists($domainName);
|
||||
}
|
||||
}
|
||||
$domainExist = $siteController::isDomainExists($domainName);
|
||||
}
|
||||
catch (SystemException $ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user