Error

Undefined class constant 'TYPE_OLD_PROPERTY'

/home2/pinnacle/public_html/pinnacle.ph/protected/controllers/PropertyController.php(68)

56     //ideally, should be called by htaccess on the following format for convience http://domain/p/P3117346    
57     //also to be used by the old site to permanently redirect the old page to the new page
58     public function actionView($pid = ""){
59         
60         //basic sanitazion
61         $pid = CHtml::encode(strip_tags($pid));
62         
63         //check if request from old website link 
64         if(isset($_GET['isArchive'])){
65             //record this request in the error table
66             $model = new Error;
67             $model->url = Yii::app()->request->url;
68             $model->type = Error::TYPE_OLD_PROPERTY;
69             $model->time = time();
70             @$model->ip = CHttpRequest::getUserHostAddress();
71             $model->referer = Yii::app()->user->getState(SESS_SOURCE_DOMAIN);
72             $model->save();
73         }
74         $p = Property::model()->find(array('condition' => "pid = '".$pid."'"));
75         if($p != null){
76             $this->redirect(Url::property($p->permalink), true, 301); //permanent redirect
77         }else{
78             echo "Backend viewer says: Property not found.";
79         }
80     }

Stack Trace

#14
+
 /home2/pinnacle/public_html/pinnacle.ph/index.php(30): CApplication->run()
25 
26 
27 
28 require_once($yii);
29 
30 Yii::createWebApplication($config)->run();
2024-03-19 01:39:23 Apache Yii Framework/1.1.14