}
                 unset($error);
                 throw new Main\SystemException(implode(',<br />', $res['errors']));
             }
         } catch (Main\SystemException $e) {
             // todo: do smth
             $lAdmin->AddUpdateError(Loc::getMessage('SALE_LOCATION_L_ITEM_SAVE_ERROR', array('#ITEM#' => $id)) . ": <br />" . $e->getMessage() . '<br />', $id);
             $DB->Rollback();
         }
         $DB->Commit();
     }
 }
 if (($ids = $lAdmin->GroupAction()) && $userIsAdmin) {
     if ($_REQUEST['action_target'] == 'selected') {
         // get all ids if they were not specified (user choice was "for all")
         $ids = Helper::getIdsByFilter($listParams['filter']);
     }
     @set_time_limit(0);
     foreach ($ids as $id) {
         if (!($id = intval($id))) {
             continue;
         }
         if ($_REQUEST['action'] == 'delete') {
             $DB->StartTransaction();
             try {
                 $res = Helper::delete($id);
                 if (!$res['success']) {
                     throw new Main\SystemException(Loc::getMessage('SALE_LOCATION_L_ITEM') . ' ' . $id . ' : ' . implode('<br />', $res['errors']));
                 }
                 $DB->Commit();
             } catch (Main\SystemException $e) {