Changeset 43
- Timestamp:
- 05/20/08 10:22:03
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/apps/main/modules/jobs/actions/actions.class.php
r2 r43 71 71 { 72 72 $pager_route_params = array(); 73 73 74 $country = $this->getRequestParameter('country'); 75 $city = urldecode($this->getRequestParameter('city')); 76 $company = urldecode($this->getRequestParameter('company')); 77 74 78 $c = new Criteria(); 75 76 if ($ this->getRequestParameter('country'))77 { 78 $c->add(JobPeer::COUNTRY, $ this->getRequestParameter('country'));79 $pager_route_params['country'] = $ this->getRequestParameter('country');80 if ($ this->getRequestParameter('city'))79 80 if ($country) 81 { 82 $c->add(JobPeer::COUNTRY, $country); 83 $pager_route_params['country'] = $country; 84 if ($city) 81 85 { 82 $c->add(JobPeer::CITY, $ this->getRequestParameter('city'));83 $pager_route_params['city'] = $ this->getRequestParameter('city');86 $c->add(JobPeer::CITY, $city); 87 $pager_route_params['city'] = $city; 84 88 } 85 89 } 86 90 87 if ($ this->getRequestParameter('company'))88 { 89 $company = CompanyPeer::retrieveBySlug($ this->getRequestParameter('company'));90 $this->forward404Unless($company, sprintf('Company "%s" does not exist', $ this->getRequestParameter('company')));91 if ($company) 92 { 93 $company = CompanyPeer::retrieveBySlug($company); 94 $this->forward404Unless($company, sprintf('Company "%s" does not exist', $company)); 91 95 $this->company_name = $company->getName(); 92 96 $c->add(JobPeer::COMPANY_ID, $company->getId()); 93 $pager_route_params['company'] = $ this->getRequestParameter('company');97 $pager_route_params['company'] = $company; 94 98 } 95 99 trunk/apps/main/modules/jobs/templates/_countryCities.php
r2 r43 5 5 <?php echo link_to($city, sprintf('@jobs_home?country=%s&city=%s', 6 6 $sf_params->get('country'), 7 urlencode($city))) ?>7 $city)) ?> 8 8 (<?php echo $nbjobs ?>) 9 9 </li>
