fixes after revert
This commit is contained in:
parent
f101809165
commit
d2949b1a80
@ -58,10 +58,10 @@ class intaro_intarocrm extends CModule
|
|||||||
{
|
{
|
||||||
global $APPLICATION, $step, $arResult;
|
global $APPLICATION, $step, $arResult;
|
||||||
|
|
||||||
if (!in_array('curl', get_loaded_extensions())) {
|
if (!in_array('curl', get_loaded_extensions())) {
|
||||||
$APPLICATION->ThrowException( GetMessage("INTAROCRM_CURL_ERR") );
|
$APPLICATION->ThrowException(GetMessage("INTAROCRM_CURL_ERR"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
include($this->INSTALL_PATH . '/../classes/general/RestApi.php');
|
include($this->INSTALL_PATH . '/../classes/general/RestApi.php');
|
||||||
include($this->INSTALL_PATH . '/../classes/general/ICrmOrderActions.php');
|
include($this->INSTALL_PATH . '/../classes/general/ICrmOrderActions.php');
|
||||||
@ -254,15 +254,9 @@ class intaro_intarocrm extends CModule
|
|||||||
|
|
||||||
$percent = 100 - round(($countLeft * 100 / $countAll), 1);
|
$percent = 100 - round(($countLeft * 100 / $countAll), 1);
|
||||||
|
|
||||||
if(!$countLeft) {
|
if(!$countLeft)
|
||||||
$api_host = COption::GetOptionString($mid, $this->CRM_API_HOST_OPTION, 0);
|
|
||||||
$api_key = COption::GetOptionString($mid, $this->CRM_API_KEY_OPTION, 0);
|
|
||||||
$this->INTARO_CRM_API = new \IntaroCrm\RestApi($api_host, $api_key);
|
|
||||||
$this->INTARO_CRM_API->statisticUpdate();
|
|
||||||
$finish = 1;
|
$finish = 1;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$APPLICATION->RestartBuffer();
|
$APPLICATION->RestartBuffer();
|
||||||
header('Content-Type: application/x-javascript; charset='.LANG_CHARSET);
|
header('Content-Type: application/x-javascript; charset='.LANG_CHARSET);
|
||||||
die(json_encode(array("finish" => $finish, "percent" => $percent)));
|
die(json_encode(array("finish" => $finish, "percent" => $percent)));
|
||||||
@ -397,7 +391,13 @@ class intaro_intarocrm extends CModule
|
|||||||
);
|
);
|
||||||
|
|
||||||
$this->CopyFiles();
|
$this->CopyFiles();
|
||||||
|
|
||||||
|
// statistic update
|
||||||
|
$api_host = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_HOST_OPTION, 0);
|
||||||
|
$api_key = COption::GetOptionString($this->MODULE_ID, $this->CRM_API_KEY_OPTION, 0);
|
||||||
|
$this->INTARO_CRM_API = new \IntaroCrm\RestApi($api_host, $api_key);
|
||||||
|
$this->INTARO_CRM_API->statisticUpdate();
|
||||||
|
|
||||||
$APPLICATION->IncludeAdminFile(
|
$APPLICATION->IncludeAdminFile(
|
||||||
GetMessage('MODULE_INSTALL_TITLE'),
|
GetMessage('MODULE_INSTALL_TITLE'),
|
||||||
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
|
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
$arModuleVersion = array(
|
$arModuleVersion = array(
|
||||||
'VERSION' => '0.3.6',
|
'VERSION' => '0.3.7',
|
||||||
'VERSION_DATE' => '2013-07-29 12:29:00',
|
'VERSION_DATE' => '2013-08-06 15:07:00',
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user