Changeset 43

Show
Ignore:
Timestamp:
05/20/08 10:22:03
Author:
nperriault
Message:

fixed wrong encoded urls in jobs cities filter links

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/apps/main/modules/jobs/actions/actions.class.php

    r2 r43  
    7171  { 
    7272    $pager_route_params = array(); 
    73  
     73     
     74    $country = $this->getRequestParameter('country'); 
     75    $city    = urldecode($this->getRequestParameter('city')); 
     76    $company = urldecode($this->getRequestParameter('company')); 
     77     
    7478    $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
    8185      { 
    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
    8488      } 
    8589    } 
    8690 
    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)); 
    9195      $this->company_name = $company->getName(); 
    9296      $c->add(JobPeer::COMPANY_ID, $company->getId()); 
    93       $pager_route_params['company'] = $this->getRequestParameter('company')
     97      $pager_route_params['company'] = $company
    9498    } 
    9599 
  • trunk/apps/main/modules/jobs/templates/_countryCities.php

    r2 r43  
    55      <?php echo link_to($city, sprintf('@jobs_home?country=%s&city=%s', 
    66                                        $sf_params->get('country'), 
    7                                         urlencode($city))) ?> 
     7                                        $city)) ?> 
    88      (<?php echo $nbjobs ?>) 
    99    </li>