Changeset 3261


Ignore:
Timestamp:
Jul 4, 2013, 9:49:21 PM (7 years ago)
Author:
nosdeputes
Message:

Corrige le nom des parlementaires si slug pas correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpc/trunk/project/apps/frontend/modules/api/actions/actions.class.php

    r3124 r3261  
    165165    $this->forward404Unless($slug);
    166166    $depute = Doctrine::getTable('Parlementaire')->findOneBySlug($slug);
     167    if (!$depute) {
     168        $depute = Doctrine::getTable('Parlementaire')->findOneByNomSexeGroupeCirco($slug);
     169        if ($depute)
     170                return $this->redirect('api/parlementaire?slug='.$depute->slug.'&format='.$request->getParameter('format'));
     171    }
    167172    $this->forward404Unless($depute);
    168173    $this->res = array();
Note: See TracChangeset for help on using the changeset viewer.