host url fix.
This commit is contained in:
parent
55b76fd9c7
commit
6f4f617d6a
@ -75,6 +75,10 @@ class intaro_intarocrm extends CModule
|
|||||||
$api_host = htmlspecialchars(trim($_POST[$this->CRM_API_HOST_OPTION]));
|
$api_host = htmlspecialchars(trim($_POST[$this->CRM_API_HOST_OPTION]));
|
||||||
$api_key = htmlspecialchars(trim($_POST[$this->CRM_API_KEY_OPTION]));
|
$api_key = htmlspecialchars(trim($_POST[$this->CRM_API_KEY_OPTION]));
|
||||||
|
|
||||||
|
// form correct url
|
||||||
|
$api_host = parse_url($api_host);
|
||||||
|
$api_host = $api_host['scheme'] . '://' . $api_host['host'];
|
||||||
|
|
||||||
if(!$api_host || !$api_key) {
|
if(!$api_host || !$api_key) {
|
||||||
$arResult['errCode'] = 'ERR_FIELDS_API_HOST';
|
$arResult['errCode'] = 'ERR_FIELDS_API_HOST';
|
||||||
$APPLICATION->IncludeAdminFile(
|
$APPLICATION->IncludeAdminFile(
|
||||||
@ -100,10 +104,6 @@ class intaro_intarocrm extends CModule
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// form correct url
|
|
||||||
$api_host = parse_url($api_host);
|
|
||||||
$api_host = $api_host['scheme'] . '://' . $api_host['host'];
|
|
||||||
|
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, $api_host);
|
COption::SetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, $api_host);
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, $api_key);
|
COption::SetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, $api_key);
|
||||||
|
|
||||||
@ -348,6 +348,7 @@ class intaro_intarocrm extends CModule
|
|||||||
GetMessage('MODULE_UNINSTALL_TITLE'),
|
GetMessage('MODULE_UNINSTALL_TITLE'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/unstep1.php'
|
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/unstep1.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CopyFiles() {
|
function CopyFiles() {
|
||||||
|
Loading…
Reference in New Issue
Block a user