Exemplo n.º 1
0
 public function editAction()
 {
     $this->view->headTitle('View error');
     $errorCategory = RM_Error_Category::getById($this->_getParam('idLog'));
     RM_View_Top::getInstance()->getBreadcrumbs()->add($errorCategory->getName() . ' errors', array(), 'admin-error-list')->add('View error', array(), 'admin-error-edit');
     $this->view->error = RM_Error::getById($this->_getParam('id'));
     $this->view->error->read();
 }
Exemplo n.º 2
0
 public function errorAction()
 {
     $errors = $this->_getParam('error_handler');
     if (APPLICATION_ENV == 'development') {
         var_dump($errors);
         die;
     }
     RM_Error::addLogRow('Critical', $errors);
     $this->view->headTitle()->prepend('Ошибка 404');
 }
Exemplo n.º 3
0
 /**
  * Convert google string type to int
  * 
  * @name convertType
  * @param int $type
  * @return int
  */
 private function _convertType($type)
 {
     switch ($type) {
         case 'country':
             return Application_Model_Geocoder_Location::TYPE_COUNTRY;
         case 'administrative_area_level_1':
             return Application_Model_Geocoder_Location::TYPE_AREA_1;
         case 'administrative_area_level_2':
             return Application_Model_Geocoder_Location::TYPE_AREA_2;
         case 'administrative_area_level_3':
             return Application_Model_Geocoder_Location::TYPE_AREA_3;
         case 'locality':
             return Application_Model_Geocoder_Location::TYPE_LOCALITY;
         case 'sublocality':
             return Application_Model_Geocoder_Location::TYPE_SUB_LOCALITY;
         case 'neighborhood':
             return Application_Model_Geocoder_Location::TYPE_NEIGHBORHOOD;
         case 'route':
             return Application_Model_Geocoder_Location::TYPE_ROUTE;
         case 'street_number':
             return Application_Model_Geocoder_Location::TYPE_NUMBER;
         case 'floor':
         case 'premise':
         case 'subpremise':
         case 'natural_feature':
         case 'airport':
         case 'park':
         case 'point_of_interest':
         case 'post_box':
         case 'room':
         case 'postal_code_prefix':
         case 'postal_code':
             return false;
         default:
             //log error
             RM_Error::addLogRow('GeoLocation', 'Type ' . $type . ' not found');
     }
 }