updater won't fail in case of error
This commit is contained in:
parent
44d99392be
commit
5a800c9931
2 changed files with 25 additions and 6 deletions
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
if (!RetailcrmConfigProvider::shouldSendPaymentAmount()) {
|
||||
RetailcrmConfigProvider::setSendPaymentAmount('Y');
|
||||
function update_5_5_0()
|
||||
{
|
||||
if (!RetailcrmConfigProvider::shouldSendPaymentAmount()) {
|
||||
RetailcrmConfigProvider::setSendPaymentAmount('Y');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,29 @@
|
|||
<?php
|
||||
|
||||
if(!CModule::IncludeModule('intaro.retailcrm') || !CModule::IncludeModule('sale') || !CModule::IncludeModule('iblock') || !CModule::IncludeModule('catalog'))
|
||||
return;
|
||||
$rcrmVersionFile = __DIR__ . '/install/version.php';
|
||||
|
||||
include_once __DIR__ . '/install/version.php';
|
||||
if(!CModule::IncludeModule('intaro.retailcrm')
|
||||
|| !CModule::IncludeModule('sale')
|
||||
|| !CModule::IncludeModule('iblock')
|
||||
|| !CModule::IncludeModule('catalog')
|
||||
|| !file_exists($rcrmVersionFile)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
include_once $rcrmVersionFile;
|
||||
|
||||
if (!isset($arModuleVersion['VERSION'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rcrmCurrentUpdateFile = __DIR__ . '/update/' . sprintf('updater-%s.php', $arModuleVersion['VERSION']);
|
||||
|
||||
if (file_exists($rcrmCurrentUpdateFile)) {
|
||||
include_once $rcrmCurrentUpdateFile;
|
||||
}
|
||||
$functionName = 'update_' . str_replace('.', '_', $arModuleVersion['VERSION']);
|
||||
|
||||
if (function_exists($functionName)) {
|
||||
$functionName();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue