clear trash && fix find user
This commit is contained in:
parent
f93924eed4
commit
8c90db7d2c
@ -1047,37 +1047,13 @@ class ICrmOrderActions
|
||||
public static function uploadOrdersAgent() {
|
||||
self::uploadOrders();
|
||||
$failedIds = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_FAILED_IDS, 0));
|
||||
if(is_array($failedIds) && !empty($failedIds))
|
||||
self::uploadOrders(50, true); // upload failed orders
|
||||
if (is_array($failedIds) && !empty($failedIds)) {
|
||||
self::uploadOrders(50, true);
|
||||
}
|
||||
|
||||
return 'ICrmOrderActions::uploadOrdersAgent();';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Agent function
|
||||
*
|
||||
* @return self name
|
||||
*/
|
||||
|
||||
public static function orderHistoryAgent() {
|
||||
self::orderHistory();
|
||||
return 'ICrmOrderActions::orderHistoryAgent();';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Agent function
|
||||
*
|
||||
* @return self name
|
||||
*/
|
||||
|
||||
public static function notForkedOrderAgent() {
|
||||
self::uploadOrdersAgent();
|
||||
self::orderHistory();
|
||||
return 'ICrmOrderActions::notForkedOrderAgent();';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Agent function
|
||||
@ -1086,18 +1062,12 @@ class ICrmOrderActions
|
||||
*/
|
||||
|
||||
public static function orderAgent() {
|
||||
$rsSites = CSite::GetList($by, $sort, array('DEF' => 'Y'));
|
||||
$defaultSite = array();
|
||||
while ($ar = $rsSites->Fetch()) {
|
||||
$defaultSite = $ar;
|
||||
break;
|
||||
}
|
||||
|
||||
if(COption::GetOptionString('main', 'agents_use_crontab', 'N') != 'N') {
|
||||
define('NO_AGENT_CHECK', true);
|
||||
}
|
||||
|
||||
self::notForkedOrderAgent();
|
||||
self::uploadOrdersAgent();
|
||||
self::orderHistory();
|
||||
|
||||
return 'ICrmOrderActions::orderAgent();';
|
||||
}
|
||||
@ -1520,7 +1490,7 @@ class RetailUser extends CUser
|
||||
public function GetID()
|
||||
{
|
||||
|
||||
$rsUser = CUser::GetList(($by='ID'), ($order='DESC'), array('LOGIN' => '%retailcrm%'));
|
||||
$rsUser = CUser::GetList(($by='ID'), ($order='DESC'), array('LOGIN' => 'retailcrm%'));
|
||||
if ($arUser = $rsUser->Fetch()) {
|
||||
return $arUser['ID'];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user