Error

Undefined constant "CATALOG_PUBLICATION_TYPE"

/mnt/HC_Volume_23321257/focusextranet/public_html/protected/components/Functions.php(2397)

2385                                       b.cityId, IF( bc.businessId IS NULL, 0, 1 ) as hasContract";
2386         $condition->alias         = "b";
2387         $condition->join          = "LEFT JOIN business_contracts bc ON bc.businessId = b.id ";
2388         $condition->join          .= "LEFT JOIN business_publications bp ON bp.id = bc.businessPublicationId ";
2389         $condition->join          .= "LEFT JOIN business_publication_types bpt ON bpt.id = bp.businessPublicationTypeId ";
2390         if( $type == BUSINESS_TYPE_PRIMARIE )
2391         {
2392             $condition->addSearchCondition( "b.name", "primaria", TRUE );
2393         }
2394         if( $publicationId != 0 )
2395         {
2396             $condition->addCondition( "bc.businessPublicationId = '".$publicationId."'" );
2397             $businessPublicationType = CATALOG_PUBLICATION_TYPE;
2398         }
2399         $condition->addCondition( "b.status = 'active'" );
2400         $condition->addCondition( "b.countyId = '".$countyId."'" );
2401         $condition->addCondition( "b.businessTypeId IN ( ".$type." )" );
2402         $condition->addCondition( "( bpt.id = '".$businessPublicationType."' OR bpt.id IS NULL )" );
2403         $condition->order         = "IF( bc.businessId IS NULL, 0, 1 ) DESC, b.name ASC";
2404         $condition->order         = "IF( bc.businessId IS NULL, 0, 1 ) DESC, b.name ASC";
2405         $condition->distinct      = TRUE;
2406         $businessCount            = BusinessModel::model()->count( $condition );
2407 
2408         return $businessCount;
2409     }

Stack Trace

#0
+
 /mnt/HC_Volume_23321257/focusextranet/public_html/protected/components/Functions.php(1203): countBusinessesForCounty()
1198             $countyList = array();
1199             if( $counties )
1200             {
1201                 foreach( $counties as $county )
1202                 {
1203                     $businessCount = countBusinessesForCounty( $county->id, $type, "" );
1204                     $countyList []= array(
1205                                     "id"            => $county->id,
1206                                     "countryId"     => $county->countryId,
1207                                     "stateId"       => $county->stateId,
1208                                     "name"          => $county->name,
#1
+
 /mnt/HC_Volume_23321257/focusextranet/public_html/protected/controllers/Front_ListController.php(87): getCountyListByCountryId()
82         $attributes         = array(
83                                 "countryId" => $countryId
84                             );
85 
86 //        getStateListByCountryId( "", $type );
87         getCountyListByCountryId( "", $type );
88         
89         if( empty( $this->data["stateList"] ) && empty( $this->data["countyList"] ) )
90         {
91             ( empty( $this->data["stateList"] ) )
92                 ? setMessage( translate( "State_does_not_exists" ), "error" )
#2
+
 /mnt/HC_Volume_23321257/focusextranet/public_html/protected/controllers/Front_ListController.php(62): Front_ListController->getCounties()
57         }
58     }
59 
60     public function actionBusinessCounties()
61     {
62         $this->getCounties( BUSINESS_TYPE_BUSINESS );
63     }
64     
65     protected function getCounties( $type )
66     {
67         $countryId  = COUNTRY_ID;
2024-03-28 18:14:16 Apache Yii Framework/1.1.10