/home/freespar/www/protected/components/MyUrlRule.php(23)
11 if (isset($params["name_$lang"])) 12 return $params["name_$lang"]; 13 } 14 return false; // this rule does not apply 15 } 16 17 public function parseUrl($manager,$request,$pathInfo,$rawPathInfo) 18 { 19 $lang = Yii::app()->getLanguage(); 20 if(preg_match('%^[a-z0-9\-]+$%', $pathInfo, $matches)) 21 { 22 $adress=$matches[0]; 23 $command=Yii::app()->{$this->connectionID}->createCommand(); 24 $result=$command->select("name_$lang")->from('pages'); 25 $result->where("name_$lang=:name_$lang", array("name_$lang"=>$adress)); 26 $result = $result->queryRow(); 27 if(!empty($result)&&$result["name_$lang"]===$adress) 28 { 29 $_GET["name_$lang"]=$result["name_$lang"]; 30 return 'pages/view/id/'.$this->getId($adress); 31 } 32 } 33 return false; // this rule does not apply 34 } 35
#0 |
+
–
/home/freespar/www/yii/framework/db/CDbConnection.php(330): CDbConnection->open() 325 public function setActive($value) 326 { 327 if($value!=$this->_active) 328 { 329 if($value) 330 $this->open(); 331 else 332 $this->close(); 333 } 334 } 335 |
#1 |
+
–
/home/freespar/www/yii/framework/db/CDbConnection.php(308): CDbConnection->setActive(true) 303 */ 304 public function init() 305 { 306 parent::init(); 307 if($this->autoConnect) 308 $this->setActive(true); 309 } 310 311 /** 312 * Returns whether the DB connection is established. 313 * @return boolean whether the DB connection is established |
#2 |
+
–
/home/freespar/www/yii/framework/base/CModule.php(387): CDbConnection->init() 382 if(!isset($config['enabled']) || $config['enabled']) 383 { 384 Yii::trace("Loading \"$id\" application component",'system.CModule'); 385 unset($config['enabled']); 386 $component=Yii::createComponent($config); 387 $component->init(); 388 return $this->_components[$id]=$component; 389 } 390 } 391 } 392 |
#3 |
+
–
/home/freespar/www/yii/framework/base/CModule.php(103): CModule->getComponent("db") 098 * @return mixed the named property value 099 */ 100 public function __get($name) 101 { 102 if($this->hasComponent($name)) 103 return $this->getComponent($name); 104 else 105 return parent::__get($name); 106 } 107 108 /** |
#4 |
+
–
/home/freespar/www/protected/components/MyUrlRule.php(23): CModule->__get("db") 18 { 19 $lang = Yii::app()->getLanguage(); 20 if(preg_match('%^[a-z0-9\-]+$%', $pathInfo, $matches)) 21 { 22 $adress=$matches[0]; 23 $command=Yii::app()->{$this->connectionID}->createCommand(); 24 $result=$command->select("name_$lang")->from('pages'); 25 $result->where("name_$lang=:name_$lang", array("name_$lang"=>$adress)); 26 $result = $result->queryRow(); 27 if(!empty($result)&&$result["name_$lang"]===$adress) 28 { |
#5 |
+
–
/home/freespar/www/yii/framework/web/CUrlManager.php(370): MyUrlRule->parseUrl(CUrlManager, CHttpRequest, "roadmap", "roadmap") 365 $pathInfo=$this->removeUrlSuffix($rawPathInfo,$this->urlSuffix); 366 foreach($this->_rules as $i=>$rule) 367 { 368 if(is_array($rule)) 369 $this->_rules[$i]=$rule=Yii::createComponent($rule); 370 if(($r=$rule->parseUrl($this,$request,$pathInfo,$rawPathInfo))!==false) 371 return isset($_GET[$this->routeVar]) ? $_GET[$this->routeVar] : $r; 372 } 373 if($this->useStrictParsing) 374 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 375 array('{route}'=>$pathInfo))); |
#6 |
+
–
/home/freespar/www/yii/framework/web/CWebApplication.php(140): CUrlManager->parseUrl(CHttpRequest) 135 $route=$this->catchAllRequest[0]; 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. |
#7 |
+
–
/home/freespar/www/yii/framework/base/CApplication.php(180): CWebApplication->processRequest() 175 public function run() 176 { 177 if($this->hasEventHandler('onBeginRequest')) 178 $this->onBeginRequest(new CEvent($this)); 179 register_shutdown_function(array($this,'end'),0,false); 180 $this->processRequest(); 181 if($this->hasEventHandler('onEndRequest')) 182 $this->onEndRequest(new CEvent($this)); 183 } 184 185 /** |
#8 |
+
–
/home/freespar/www/index.php(12): CApplication->run() 07 defined('YII_DEBUG') or define('YII_DEBUG',true); 08 // specify how many levels of call stack should be shown in each log message 09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 10 11 require_once($yii); 12 Yii::createWebApplication($config)->run(); |