/var/www/html/web/protected/models/database/GfsModel.php(619)
607 $tot_temp += $m->teplota; 608 $tot_cloud_n += $m->oblacnost_n; 609 $tot_cloud_s += $m->oblacnost_s; 610 $tot_cloud_v += $m->oblacnost_v; 611 $tot_wind += $m->vietor; 612 $tot_gusts += $m->vietor_naraz; 613 $tot_dir += $m->vietor_smer; 614 } 615 if ($tot_precip > 0) 616 $this->sneh = $tot_snow / $tot_precip; 617 else 618 $this->sneh = 0; 619 $this->zrazky = $tot_precip / $count; 620 $this->teplota = $tot_temp / $count; 621 $this->oblacnost_n = $tot_cloud_n / $count; 622 $this->oblacnost_s = $tot_cloud_s / $count; 623 $this->oblacnost_v = $tot_cloud_v / $count; 624 $this->vietor = $tot_wind / $count; 625 $this->vietor_naraz = $tot_gusts / $count; 626 $this->vietor_smer = $tot_dir / $count; 627 } 628 629 /** 630 * produces abbreviated wind direction (e.g. SV, SZ, J, JV...) from numerical (angular) representation <0;360> 631 */
#0 |
+
–
/var/www/html/web/protected/modules/userprofile/controllers/BaseViewProfileController.php(150): GfsModel->makeAverage(array()) 145 $criteria = new CDbCriteria(); 146 $criteria->condition = 'model_point = \'' . $this->city->gfs_model_point_id . '\' and (datumcas between :start and :end)'; 147 $criteria->params = array(':start' => date('Y-m-d H:i:s', $tomorrow_start), ':end' => date('Y-m-d H:i:s', $tomorrow_end)); 148 $model_entries = GfsModel::model()->findAll($criteria); 149 $avg_model = new GfsModel(); 150 $avg_model->makeAverage($model_entries); 151 $forecast = new PpPouzivateliaMesta(); 152 $forecast->datum = date('Y-m-d', $tomorrow_start); 153 $forecast->cas = date('Y-m-d H:i:s'); 154 $forecast->min_nizsia = $minmax['mi']; 155 $forecast->min_vyssia = $minmax['ma']; |
#1 |
+
–
/var/www/html/web/protected/modules/userprofile/controllers/BaseViewProfileController.php(128): BaseViewProfileController->loadForecastFromModel() 123 $criteria->order = 'cas asc'; 124 $criteria->limit = 2; 125 126 $this->latestForecasts = PpPouzivateliaMesta::model()->findAll($criteria); 127 if (count($this->latestForecasts) == 0) 128 $this->loadForecastFromModel(); 129 130 } 131 132 private function loadForecastFromModel() { 133 $tomorrow_start = mktime(0,0,0,date('m'), date('d') + 1, date('Y')); |
#2 |
+
–
/var/www/html/web/protected/modules/userprofile/controllers/BaseViewProfileController.php(55): BaseViewProfileController->loadLatestForecasts() 50 $this->id = intval($_GET['id']); 51 $this->loadUserProfileInfo(); 52 $this->loadPath(); 53 $this->loadBreadCrumb(); 54 $this->loadLatestReport(); 55 $this->loadLatestForecasts(); 56 $this->nacitajAktuality(); 57 58 $chain->run(); 59 return true; 60 |
#3 |
+
–
/var/www/html/yii/framework/web/filters/CInlineFilter.php(59): BaseViewProfileController->filterLoadCommonData(CFilterChain) 54 * @param CFilterChain $filterChain the filter chain that the filter is on. 55 */ 56 public function filter($filterChain) 57 { 58 $method='filter'.$this->name; 59 $filterChain->controller->$method($filterChain); 60 } 61 } |
#4 |
+
–
/var/www/html/yii/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter(CFilterChain) 126 { 127 if($this->offsetExists($this->filterIndex)) 128 { 129 $filter=$this->itemAt($this->filterIndex++); 130 Yii::trace('Running filter '.($filter instanceof CInlineFilter ? get_class($this->controller).'.filter'.$filter->name.'()':get_class($filter).'.filter()'),'system.web.filters.CFilterChain'); 131 $filter->filter($this); 132 } 133 else 134 $this->controller->runAction($this->action); 135 } 136 } |
#5 |
+
–
/var/www/html/yii/framework/web/CController.php(292): CFilterChain->run() 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); 293 $this->_action=$priorAction; 294 } 295 } 296 297 /** |
#6 |
+
–
/var/www/html/yii/framework/web/CController.php(266): CController->runActionWithFilters(CInlineAction, array("loadCommonData")) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#7 |
+
–
/var/www/html/yii/framework/web/CWebApplication.php(276): CController->run("") 271 { 272 list($controller,$actionID)=$ca; 273 $oldController=$this->_controller; 274 $this->_controller=$controller; 275 $controller->init(); 276 $controller->run($actionID); 277 $this->_controller=$oldController; 278 } 279 else 280 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 281 array('{route}'=>$route===''?$this->defaultController:$route))); |
#8 |
+
–
/var/www/html/yii/framework/web/CWebApplication.php(135): CWebApplication->runController("userprofile/statistics") 130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 131 $_GET[$name]=$value; 132 } 133 else 134 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 135 $this->runController($route); 136 } 137 138 /** 139 * Registers the core application components. 140 * This method overrides the parent implementation by registering additional core components. |
#9 |
+
–
/var/www/html/yii/framework/base/CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#10 |
+
–
/var/www/html/web/index.php(27): CApplication->run() 22 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 23 24 date_default_timezone_set('Europe/Bratislava'); 25 26 require_once($yii); 27 Yii::createWebApplication($config)->run(); 28 |