Changeset 2935


Ignore:
Timestamp:
Aug 28, 2012, 12:36:20 PM (8 years ago)
Author:
goya
Message:

display list of speakers on sub-dossiers

File:
1 edited

Legend:

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

    r2840 r2935  
    9494    $interventions = array();
    9595
    96     $interventions = Doctrine_Query::create()
     96    $query = Doctrine_Query::create()
    9797      ->select('i.id')
    9898      ->from('Intervention i')
    99       ->leftJoin('i.Section s')
    100       ->where('s.section_id = ?', $this->section->id)
    101       ->andWhere('i.nb_mots > 20')
     99      ->leftJoin('i.Section s');
     100    if ($this->section->id == $this->section->section_id)
     101      $query->where('s.section_id = ?', $this->section->id);
     102    else $query->where('s.id = ?', $this->section->id);
     103    $interventions = $query->andWhere('i.nb_mots > 20')
    102104      ->execute(array(), Doctrine_Core::HYDRATE_SINGLE_SCALAR);
    103105
Note: See TracChangeset for help on using the changeset viewer.