update 0.3.7 -> 0.3.8
This commit is contained in:
parent
bba1df38dc
commit
d0a5ad4cf0
@ -636,8 +636,8 @@ class intaro_intarocrm extends CModule
|
|||||||
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'
|
||||||
);
|
);
|
||||||
} else if ($step == 5) {
|
|
||||||
|
|
||||||
|
} else if ($step == 5) {
|
||||||
if(isset($arResult['errCode']) && $arResult['errCode']) {
|
if(isset($arResult['errCode']) && $arResult['errCode']) {
|
||||||
$APPLICATION->IncludeAdminFile(
|
$APPLICATION->IncludeAdminFile(
|
||||||
GetMessage('MODULE_INSTALL_TITLE'),
|
GetMessage('MODULE_INSTALL_TITLE'),
|
||||||
@ -699,7 +699,6 @@ class intaro_intarocrm extends CModule
|
|||||||
$loader->filename = $filename;
|
$loader->filename = $filename;
|
||||||
$loader->application = $APPLICATION;
|
$loader->application = $APPLICATION;
|
||||||
$loader->Load();
|
$loader->Load();
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!isset($_POST['TYPE_LOADING']))
|
if (!isset($_POST['TYPE_LOADING']))
|
||||||
$typeLoading = 0;
|
$typeLoading = 0;
|
||||||
@ -735,11 +734,7 @@ class intaro_intarocrm extends CModule
|
|||||||
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
$intAgent = new DateInterval('PT60S'); // PT60S - 60 sec;
|
||||||
$dateAgent->add($intAgent);
|
$dateAgent->add($intAgent);
|
||||||
CAgent::AddAgent(
|
CAgent::AddAgent(
|
||||||
"CCatalogExport::PreGenerateExport(" . $PROFILE_ID . ");",
|
"CCatalogExport::PreGenerateExport(" . $PROFILE_ID . ");", "catalog", "N", 86400, $dateAgent->format('d.m.Y H:i:s'), // date of first check
|
||||||
"catalog",
|
|
||||||
"N",
|
|
||||||
86400,
|
|
||||||
$dateAgent->format('d.m.Y H:i:s'), // date of first check
|
|
||||||
"Y", // агент активен
|
"Y", // агент активен
|
||||||
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
$dateAgent->format('d.m.Y H:i:s'), // date of first start
|
||||||
30
|
30
|
||||||
@ -752,8 +747,7 @@ class intaro_intarocrm extends CModule
|
|||||||
$agent_period = 24;
|
$agent_period = 24;
|
||||||
$agent_php_path = "/usr/local/php/bin/php";
|
$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);
|
CheckDirPath($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS);
|
||||||
$tmp_file_size = filesize($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS_DEF . "cron_frame.php");
|
$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");
|
$fp = fopen($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS_DEF . "cron_frame.php", "rb");
|
||||||
@ -769,8 +763,7 @@ class intaro_intarocrm extends CModule
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cfg_data = "";
|
$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");
|
$cfg_file_size = filesize($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg");
|
||||||
$fp = fopen($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", "rb");
|
$fp = fopen($_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", "rb");
|
||||||
$cfg_data = fread($fp, $cfg_file_size);
|
$cfg_data = fread($fp, $cfg_file_size);
|
||||||
@ -779,13 +772,10 @@ class intaro_intarocrm extends CModule
|
|||||||
|
|
||||||
CheckDirPath($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS . "logs/");
|
CheckDirPath($_SERVER["DOCUMENT_ROOT"] . CATALOG_PATH2EXPORTS . "logs/");
|
||||||
|
|
||||||
if ($arProfile["IN_CRON"]=="Y")
|
if ($arProfile["IN_CRON"] == "Y") {
|
||||||
{
|
|
||||||
// remove
|
// remove
|
||||||
$cfg_data = preg_replace("#^.*?" . preg_quote(CATALOG_PATH2EXPORTS) . "cron_frame.php +" . $PROFILE_ID . " *>.*?$#im", "", $cfg_data);
|
$cfg_data = preg_replace("#^.*?" . preg_quote(CATALOG_PATH2EXPORTS) . "cron_frame.php +" . $PROFILE_ID . " *>.*?$#im", "", $cfg_data);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$strTime = "0 */" . $agent_period . " * * * ";
|
$strTime = "0 */" . $agent_period . " * * * ";
|
||||||
if (strlen($cfg_data) > 0)
|
if (strlen($cfg_data) > 0)
|
||||||
$cfg_data .= "\n";
|
$cfg_data .= "\n";
|
||||||
@ -805,7 +795,6 @@ class intaro_intarocrm extends CModule
|
|||||||
|
|
||||||
$arRetval = array();
|
$arRetval = array();
|
||||||
@exec("crontab " . $_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", $arRetval, $return_var);
|
@exec("crontab " . $_SERVER["DOCUMENT_ROOT"] . "/bitrix/crontab/crontab.cfg", $arRetval, $return_var);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?
|
<?
|
||||||
$arModuleVersion = array(
|
$arModuleVersion = array(
|
||||||
'VERSION' => '0.3.7',
|
'VERSION' => '0.3.8',
|
||||||
'VERSION_DATE' => '2013-08-14 10:59:00',
|
'VERSION_DATE' => '2013-08-14 19:32:00',
|
||||||
);
|
);
|
Loading…
x
Reference in New Issue
Block a user