From abb4bae99a6b6e00bf27ff7379cc6536f4e6761d Mon Sep 17 00:00:00 2001 From: Grisha Pomadchin Date: Thu, 13 Mar 2014 13:21:43 +0400 Subject: [PATCH] v1.0.1 --- intaro.intarocrm/classes/general/ICrmOrderActions.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index 9c243a45..063ec739 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -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; }