Ejemplo n.º 1
0
					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();
				}
			}
		}

		Location\LocationTable::resetLegacyPath();
	}

	$adminResult = Helper::getList($listParams, $sTableID);
	$lAdmin->NavText($adminResult->GetNavPrint(Loc::getMessage('SALE_LOCATION_L_PAGES'), true)); // do not relocate the call relative to DisplayList(), or you`ll catch a strange nav bar disapper bug
}
catch(Main\SystemException $e)
{
	$code = $e->getCode();
	$fatal = $e->getMessage().(!empty($code) ? ' ('.$code.')' : '');
}

#####################################
#### PAGE INTERFACE GENERATION
#####################################

if(empty($fatal))
{
	$headers = array();
Ejemplo n.º 2
0
 /**
  * Here we obtain data that is dependent to data in the cache 
  * @return void
  */
 protected function obtainCacheDependentData()
 {
     $listParams = Helper::getParametersForList($this->getListParameters());
     $dbRecordsList = Helper::getList($listParams, false, 20);
     // there is no pagenav api in d7, so use wrapper of the old api
     $dbRecordsList->bShowAll = false;
     $this->dbResult['LOCS'] = array();
     while ($arLoc = $dbRecordsList->Fetch()) {
         $arLoc['PATH_TO_LOCATIONS_EDIT'] = CComponentEngine::MakePathFromTemplate($this->arParams['PATH_TO_LOCATIONS_EDIT'], array('loc_id' => $arLoc['ID']));
         $arLoc['PATH_TO_LOCATIONS_DELETE'] = CHTTP::urlAddParams(CComponentEngine::MakePathFromTemplate($this->arParams['PATH_TO_LOCATIONS_LIST'], array('loc_id' => $arLoc['ID'])), array('action_' . $this->dbResult['GRID_ID'] => 'delete', 'ID' => $arLoc['ID'], 'sessid' => bitrix_sessid()));
         $arLoc['TYPE_ID'] = $this->dbResult['TYPES'][$arLoc['TYPE_ID']];
         $this->dbResult['LOCS'][$arLoc['ID']] = $arLoc;
     }
     $navComponentObject = 1;
     // formal
     $this->dbResult['ROWS_COUNT'] = $dbRecordsList->NavRecordCount;
     $this->dbResult['NAV_STRING'] = $dbRecordsList->GetPageNavStringEx($navComponentObject, Loc::getMessage("CRM_CLL2_INTS_TASKS_NAV"), "", false);
     $this->dbResult['NAV_RESULT'] = $dbRecordsList;
 }