1
0
mirror of synced 2025-01-19 17:31:43 +03:00
This commit is contained in:
Grisha Pomadchin 2014-03-13 13:21:43 +04:00
parent 6f70fcaac7
commit abb4bae99a

View File

@ -282,8 +282,6 @@ class ICrmOrderActions
public static function orderHistory() {
global $USER;
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = true;
if(isset($_SESSION["SESS_AUTH"]["USER_ID"]) && $_SESSION["SESS_AUTH"]["USER_ID"]) {
$realUser = $USER->GetID();
$USER->Logout();
@ -374,6 +372,8 @@ class ICrmOrderActions
$orderHistory = $api->orderHistory($dateStart);
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = false;
// pushing existing orders
foreach ($orderHistory as $order) {
@ -875,6 +875,8 @@ class ICrmOrderActions
$USER->Logout();
if($realUser) $USER->Authorize($realUser);
$GLOBALS['INTARO_CRM_FROM_HISTORY'] = false;
return true;
}