$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) { $lAdmin->AddGroupError(Loc::getMessage('SALE_LOCATION_L_ITEM_DELETE_ERROR').": <br /><br />".$e->getMessage(), $id); $DB->Rollback(); } } } } $adminResult = Helper::getList($listParams, $sTableID); $adminResult->NavStart();