1
0
mirror of synced 2025-02-16 15:03:14 +03:00

update 0.3.7 -> 0.3.8

This commit is contained in:
Grisha Pomadchin 2013-08-14 19:56:52 +04:00
parent bba1df38dc
commit d0a5ad4cf0
3 changed files with 77 additions and 88 deletions

View File

@ -636,8 +636,8 @@ class intaro_intarocrm extends CModule
GetMessage('MODULE_INSTALL_TITLE'),
$_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/' . $this->MODULE_ID . '/install/step4.php'
);
} else if ($step == 5) {
} else if ($step == 5) {
if(isset($arResult['errCode']) && $arResult['errCode']) {
$APPLICATION->IncludeAdminFile(
GetMessage('MODULE_INSTALL_TITLE'),
@ -699,7 +699,6 @@ class intaro_intarocrm extends CModule
$loader->filename = $filename;
$loader->application = $APPLICATION;
$loader->Load();
}
if (!isset($_POST['TYPE_LOADING']))
$typeLoading = 0;
@ -735,11 +734,7 @@ class intaro_intarocrm extends CModule
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
$dateAgent->add($intAgent);
CAgent::AddAgent(
"CCatalogExport::PreGenerateExport(" . $PROFILE_ID . ");",
"catalog",
"N",
86400,
$dateAgent->format('d.m.Y H:i:s'), // date of first check
"CCatalogExport::PreGenerateExport(" . $PROFILE_ID . ");", "catalog", "N", 86400, $dateAgent->format('d.m.Y H:i:s'), // date of first check
"Y", // агент активен
$dateAgent->format('d.m.Y H:i:s'), // date of first start
30
@ -752,8 +747,7 @@ class intaro_intarocrm extends CModule
$agent_period = 24;
$agent_php_path = "/usr/local/php/bin/php";
if (!file_exists($_SERVER["DOCUMENT_ROOT"].CATALOG_PATH2EXPORTS."cron_frame.php"))
{
if (!file_exists($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS . "cron_frame.php")) {
CheckDirPath($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS);
$tmp_file_size = filesize($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS_DEF . "cron_frame.php");
$fp = fopen($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS_DEF . "cron_frame.php", "rb");
@ -769,8 +763,7 @@ class intaro_intarocrm extends CModule
}
$cfg_data = "";
if (file_exists($_SERVER["DOCUMENT_ROOT"]."/bitrix/crontab/crontab.cfg"))
{
if (file_exists($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg")) {
$cfg_file_size = filesize($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg");
$fp = fopen($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", "rb");
$cfg_data = fread($fp, $cfg_file_size);
@ -779,13 +772,10 @@ class intaro_intarocrm extends CModule
CheckDirPath($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS . "logs/");
if ($arProfile["IN_CRON"]=="Y")
{
if ($arProfile["IN_CRON"] == "Y") {
// remove
$cfg_data = preg_replace("#^.*?" . preg_quote(CATALOG_PATH2EXPORTS) . "cron_frame.php +" . $PROFILE_ID . " *>.*?$#im", "", $cfg_data);
}
else
{
} else {
$strTime = "0 */" . $agent_period . " * * * ";
if (strlen($cfg_data) > 0)
$cfg_data .= "\n";
@ -805,7 +795,6 @@ class intaro_intarocrm extends CModule
$arRetval = array();
@exec("crontab " . $_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", $arRetval, $return_var);
}
}

View File

@ -1,5 +1,5 @@
<?
$arModuleVersion = array(
'VERSION' => '0.3.7',
'VERSION_DATE' => '2013-08-14 10:59:00',
'VERSION' => '0.3.8',
'VERSION_DATE' => '2013-08-14 19:32:00',
);