Changeset 1274 for cpc/trunk/project/apps
- Timestamp:
- Aug 22, 2010, 8:42:40 PM (11 years ago)
- Location:
- cpc/trunk/project/apps/frontend/modules
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/apps/frontend/modules/amendement/actions/actions.class.php
r1186 r1274 7 7 public function executeShow(sfWebRequest $request) 8 8 { 9 $query = doctrine::getTable('Amendement')->createquery('a')9 $query = Doctrine::getTable('Amendement')->createquery('a') 10 10 ->where('a.texteloi_id = ?', $request->getParameter('loi')) 11 11 ->andWhere('a.numero = ?', $request->getParameter('numero')) … … 21 21 else $this->section = $section->getSection(1); 22 22 23 $this->identiques = doctrine::getTable('Amendement')->createQuery('a')23 $this->identiques = Doctrine::getTable('Amendement')->createQuery('a') 24 24 ->where('content_md5 = ?', $this->amendement->content_md5) 25 25 ->orderBy('numero') … … 48 48 ->fetchArray(); 49 49 50 $this->loi = doctrine::getTable('TitreLoi')->findLightLoi($this->amendement->texteloi_id);50 $this->loi = Doctrine::getTable('TitreLoi')->findLightLoi($this->amendement->texteloi_id); 51 51 } 52 52 53 53 public function executeParlementaire(sfWebRequest $request) 54 54 { 55 $this->parlementaire = doctrine::getTable('Parlementaire')55 $this->parlementaire = Doctrine::getTable('Parlementaire') 56 56 ->findOneBySlug($request->getParameter('slug')); 57 57 $this->forward404Unless($this->parlementaire); 58 $this->amendements = doctrine::getTable('Amendement')->createQuery('a')58 $this->amendements = Doctrine::getTable('Amendement')->createQuery('a') 59 59 ->leftJoin('a.ParlementaireAmendement pa') 60 60 ->where('pa.parlementaire_id = ?', $this->parlementaire->id) … … 69 69 public function executeParlementaireSection(sfWebRequest $request) 70 70 { 71 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));71 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 72 72 $this->forward404Unless($this->parlementaire); 73 73 74 $this->section = doctrine::getTable('Section')->find($request->getParameter('id'));74 $this->section = Doctrine::getTable('Section')->find($request->getParameter('id')); 75 75 $this->forward404Unless($this->section); 76 76 … … 80 80 'return' => 'value')); 81 81 82 $this->qamendements = doctrine::getTable('Amendement')->createQuery('a')82 $this->qamendements = Doctrine::getTable('Amendement')->createQuery('a') 83 83 ->leftJoin('a.ParlementaireAmendement pa') 84 84 ->where('pa.parlementaire_id = ?', $this->parlementaire->id) … … 117 117 $ids[] = $s['id']; 118 118 119 $this->query = doctrine::getTable('Amendement')->createQuery('a');119 $this->query = Doctrine::getTable('Amendement')->createQuery('a'); 120 120 if (count($ids)) 121 121 $this->query->whereIn('a.id', $ids); … … 129 129 130 130 if ($slug = $request->getParameter('parlementaire')) { 131 $this->parlementaire = doctrine::getTable('Parlementaire')131 $this->parlementaire = Doctrine::getTable('Parlementaire') 132 132 ->findOneBySlug($slug); 133 133 if ($this->parlementaire) … … 149 149 if ($amdt == 'all' || $amdt == 'new' ) { 150 150 if (count($this->lois) == 1) 151 $this->loi = doctrine::getTable('TitreLoi')->findLightLoi($this->lois[0]);152 $this->amendements_query = doctrine::getTable('Amendement')151 $this->loi = Doctrine::getTable('TitreLoi')->findLightLoi($this->lois[0]); 152 $this->amendements_query = Doctrine::getTable('Amendement') 153 153 ->createQuery('a') 154 154 ->whereIn('a.texteloi_id', $this->lois) -
cpc/trunk/project/apps/frontend/modules/api/actions/actions.class.php
r1216 r1274 72 72 public function executeListParlementaires(sfWebRequest $request) 73 73 { 74 $deputes = doctrine::getTable('Parlementaire')->createQuery('p')->execute();74 $deputes = Doctrine::getTable('Parlementaire')->createQuery('p')->execute(); 75 75 $this->res = array('deputes' => array()); 76 76 $this->champs = array(); … … 104 104 $this->forward404Unless($slug); 105 105 106 $depute = doctrine::getTable('Parlementaire')->findOneBySlug($slug);106 $depute = Doctrine::getTable('Parlementaire')->findOneBySlug($slug); 107 107 $this->res = array(); 108 108 $this->multi = array(); -
cpc/trunk/project/apps/frontend/modules/commentaire/actions/actions.class.php
r1265 r1274 86 86 87 87 // On teste l'existence préalable du même commentaire 88 if ($existing = doctrine::getTable('Commentaire')->createQuery('c')88 if ($existing = Doctrine::getTable('Commentaire')->createQuery('c') 89 89 ->select('created_at') 90 90 ->where('citoyen_id = ?', $this->getUser()->getAttribute('user_id')) … … 104 104 $commentaire->object_id = $this->id; 105 105 $commentaire->lien = $redirect_url[$this->type].$this->id; 106 $object = doctrine::getTable($this->type)->find($this->id);106 $object = Doctrine::getTable($this->type)->find($this->id); 107 107 if (isset($object->texteloi_id)) { 108 $loi = doctrine::getTable('TitreLoi')->findLightLoi($object->texteloi_id);108 $loi = Doctrine::getTable('TitreLoi')->findLightLoi($object->texteloi_id); 109 109 if ($this->type != 'Amendement') { 110 110 $present = preg_replace('/<br\/>.*$/', '', $loi['titre']).' - A propos de l\'article '; 111 111 if ($this->type == 'Alinea') { 112 $article = doctrine::getTable('ArticleLoi')->createQuery('a')112 $article = Doctrine::getTable('ArticleLoi')->createQuery('a') 113 113 ->select('titre') 114 114 ->where('texteloi_id = ?', $object->texteloi_id) … … 164 164 $commentaire->addObject('Section', $section->getSection(1)->id); 165 165 if (!($seance = $object->getIntervention($object->numero))) { 166 $identiques = doctrine::getTable('Amendement')->createQuery('a')166 $identiques = Doctrine::getTable('Amendement')->createQuery('a') 167 167 ->where('content_md5 = ?', $object->content_md5) 168 168 ->orderBy('numero')->execute(); … … 177 177 if (preg_match('/^Article\s+(.*)$/', $object->sujet, $match)) { 178 178 $art = preg_replace('/premier/i', '1er', $match[1]); 179 if ($art_obj = doctrine::getTable('ArticleLoi')->findOneByLoiTitre($object->texteloi_id,$art))179 if ($art_obj = Doctrine::getTable('ArticleLoi')->findOneByLoiTitre($object->texteloi_id,$art)) 180 180 $commentaire->addObject('ArticleLoi', $art_obj->id); 181 181 } else $commentaire->addObject('TitreLoi', $loi->id); -
cpc/trunk/project/apps/frontend/modules/commentaire/actions/components.class.php
r1212 r1274 45 45 $id = $this->object->id; 46 46 $type = get_class($this->object); 47 $query = doctrine::getTable('Commentaire')->createQuery('c')47 $query = Doctrine::getTable('Commentaire')->createQuery('c') 48 48 ->leftJoin('c.Objects co') 49 49 ->where('co.object_type = ?', $type) -
cpc/trunk/project/apps/frontend/modules/intervention/actions/actions.class.php
r964 r1274 14 14 { 15 15 if (!$this->type = $request->getParameter('type')) $this->type = 'all'; 16 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));16 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 17 17 $this->forward404Unless($this->parlementaire); 18 $this->interventions = doctrine::getTable('Intervention')->createQuery('i')18 $this->interventions = Doctrine::getTable('Intervention')->createQuery('i') 19 19 ->where('i.parlementaire_id = ?', $this->parlementaire->id); 20 20 if (preg_match('/(commission|question|loi)$/', $this->type)) { … … 39 39 40 40 public function executeParlementaireOrganisme(sfWebRequest $request) { 41 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));41 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 42 42 $this->forward404Unless($this->parlementaire); 43 $this->orga = doctrine::getTable('Organisme')->find($request->getParameter('orga'));43 $this->orga = Doctrine::getTable('Organisme')->find($request->getParameter('orga')); 44 44 $this->forward404Unless($this->orga); 45 $this->interventions = doctrine::getTable('Intervention')->createQuery('i')45 $this->interventions = Doctrine::getTable('Intervention')->createQuery('i') 46 46 ->leftJoin('i.Seance s') 47 47 ->where('i.parlementaire_id = ?', $this->parlementaire->id) … … 54 54 55 55 public function executeShow(sfWebRequest $request) { 56 $this->intervention = doctrine::getTable('Intervention')->createquery('i')56 $this->intervention = Doctrine::getTable('Intervention')->createquery('i') 57 57 ->where('i.id = ?', $request->getParameter('id')) 58 58 ->fetchOne(); … … 72 72 public function executeSeance(sfWebRequest $request) { 73 73 $seance_id = $request->getParameter('seance'); 74 $this->seance = doctrine::getTable('Seance')->find($seance_id);74 $this->seance = Doctrine::getTable('Seance')->find($seance_id); 75 75 $this->forward404Unless($this->seance); 76 76 if ($this->seance->type == 'commission') $this->orga = $this->seance->getOrganisme(); 77 $query = doctrine::getTable('Intervention')->createquery('i')77 $query = Doctrine::getTable('Intervention')->createquery('i') 78 78 ->where('i.seance_id = ?', $seance_id) 79 79 ->orderBy('i.timestamp ASC'); … … 90 90 $this->tags = split('\|', $request->getParameter('tags')); 91 91 92 if ( doctrine::getTable('Tag')->findOneByName($this->tags[0]))92 if (Doctrine::getTable('Tag')->findOneByName($this->tags[0])) 93 93 $query = PluginTagTable::getObjectTaggedWithQuery('Intervention', $this->tags); 94 94 else 95 $query = doctrine::getTable('Intervention')95 $query = Doctrine::getTable('Intervention') 96 96 ->createQuery('Intervention')->where('0'); 97 97 98 98 if ($slug = $request->getParameter('parlementaire')) { 99 $this->parlementaire = doctrine::getTable('Parlementaire')99 $this->parlementaire = Doctrine::getTable('Parlementaire') 100 100 ->findOneBySlug($slug); 101 101 if ($this->parlementaire) … … 145 145 } 146 146 147 $this->query = doctrine::getTable('Intervention')->createQuery('i');147 $this->query = Doctrine::getTable('Intervention')->createQuery('i'); 148 148 if (count($ids)) 149 149 $this->query->whereIn('i.id', $ids); … … 157 157 158 158 if ($slug = $request->getParameter('parlementaire')) { 159 $this->parlementaire = doctrine::getTable('Parlementaire')159 $this->parlementaire = Doctrine::getTable('Parlementaire') 160 160 ->findOneBySlug($slug); 161 161 if ($this->parlementaire) -
cpc/trunk/project/apps/frontend/modules/intervention/actions/components.class.php
r876 r1274 8 8 public function executeParlementaireQuestion() 9 9 { 10 $this->questions = doctrine::getTable('Intervention')->createQuery('i')10 $this->questions = Doctrine::getTable('Intervention')->createQuery('i') 11 11 ->where('i.parlementaire_id = ?', $this->parlementaire->id) 12 12 ->andWhere('i.type = ?', 'question') -
cpc/trunk/project/apps/frontend/modules/loi/actions/actions.class.php
r1242 r1274 14 14 private function getAmendements($loi, $articles = 'all', $alineas = 0) { 15 15 $amendements = array(); 16 $admts = doctrine::getTable('Amendement')->createquery('a')16 $admts = Doctrine::getTable('Amendement')->createquery('a') 17 17 ->where('a.texteloi_id = ?', $loi) 18 18 ->andWhere('a.sort <> ?', 'Rectifié') … … 46 46 public function executeLoi(sfWebRequest $request) { 47 47 $loi_id = $this->getLoi($request); 48 $this->soussections = doctrine::getTable('TitreLoi')->createquery('t')48 $this->soussections = Doctrine::getTable('TitreLoi')->createquery('t') 49 49 ->where('t.texteloi_id = ?', $loi_id) 50 50 ->andWhere('t.id != t.titre_loi_id') 51 51 ->orderBy('t.chapitre, t.section') 52 52 ->execute(); 53 $this->articles = doctrine::getTable('ArticleLoi')->createquery('a')53 $this->articles = Doctrine::getTable('ArticleLoi')->createquery('a') 54 54 ->where('a.texteloi_id = ?', $loi_id) 55 55 ->orderBy('a.ordre') 56 56 ->fetchArray(); 57 $this->amendements = count( doctrine::getTable('Amendement')->createquery('a')57 $this->amendements = count(Doctrine::getTable('Amendement')->createquery('a') 58 58 ->where('a.texteloi_id = ?', $loi_id) 59 59 ->andWhere('a.sort <> ?', 'Rectifié') … … 69 69 $loi_id = $this->getLoi($request, 1); 70 70 $n_chapitre = $request->getParameter('chapitre'); 71 $this->chapitre = doctrine::getTable('TitreLoi')->findChapitre($loi_id, $n_chapitre);71 $this->chapitre = Doctrine::getTable('TitreLoi')->findChapitre($loi_id, $n_chapitre); 72 72 $this->forward404Unless($this->chapitre); 73 73 $n_section = $request->getParameter('section'); 74 $artquery = doctrine::getTable('ArticleLoi')->createquery('a');74 $artquery = Doctrine::getTable('ArticleLoi')->createquery('a'); 75 75 if ($n_section && $n_section != 0) { 76 $this->section = doctrine::getTable('TitreLoi')->findSection($loi_id, $n_chapitre, $n_section);76 $this->section = Doctrine::getTable('TitreLoi')->findSection($loi_id, $n_chapitre, $n_section); 77 77 $this->forward404Unless($this->section); 78 78 $artquery->where('a.titre_loi_id = ?', $this->section->id); 79 79 } else { 80 $this->soussections = doctrine::getTable('TitreLoi')->createquery('t')80 $this->soussections = Doctrine::getTable('TitreLoi')->createquery('t') 81 81 ->where('t.texteloi_id = ?', $loi_id) 82 82 ->andWhere('t.chapitre = ?', $n_chapitre) … … 99 99 if (preg_match('/^(\d+)\s+bis$/',$n_section, $match)) { 100 100 $this->precedent = $match[1]; 101 if ( doctrine::getTable('TitreLoi')->findSection($loi_id, $n_chapitre, $match[1]+1))101 if (Doctrine::getTable('TitreLoi')->findSection($loi_id, $n_chapitre, $match[1]+1)) 102 102 $this->suivant = $match[1] + 1; 103 103 } else { 104 104 $pre = $n_section - 1; 105 $voisins = doctrine::getTable('TitreLoi')->createQuery('c')105 $voisins = Doctrine::getTable('TitreLoi')->createQuery('c') 106 106 ->select('c.section') 107 107 ->where('c.texteloi_id = ?', $loi_id) … … 143 143 if (preg_match('/^(\d+)\s+bis$/',$n_chapitre, $match)) { 144 144 $this->precedent = $match[1]; 145 if ( doctrine::getTable('TitreLoi')->findChapitre($loi_id, $match[1]+1)) $this->suivant = $match[1]+1;145 if (Doctrine::getTable('TitreLoi')->findChapitre($loi_id, $match[1]+1)) $this->suivant = $match[1]+1; 146 146 } else { 147 147 $pre = $n_chapitre - 1; 148 $voisins = doctrine::getTable('TitreLoi')->createQuery('c')148 $voisins = Doctrine::getTable('TitreLoi')->createQuery('c') 149 149 ->select('c.chapitre') 150 150 ->where('c.texteloi_id = ?', $loi_id) … … 188 188 public function executeAlinea(sfWebRequest $request) { 189 189 $id = $request->getParameter('id'); 190 $this->alinea = doctrine::getTable('Alinea')->find($id);190 $this->alinea = Doctrine::getTable('Alinea')->find($id); 191 191 $this->forward404Unless($this->alinea); 192 192 $article = $this->alinea->getArticle(); 193 193 $this->forward404Unless($article); 194 $this->loi = doctrine::getTable('TitreLoi')->findLightLoi($article->texteloi_id);194 $this->loi = Doctrine::getTable('TitreLoi')->findLightLoi($article->texteloi_id); 195 195 $loi_id = $this->loi->texteloi_id; 196 196 $index = array(); … … 198 198 if ($i > 0) $index[] = $i; 199 199 } 200 $this->alineas = doctrine::getTable('Alinea')200 $this->alineas = Doctrine::getTable('Alinea') 201 201 ->createquery('a') 202 202 ->where('a.article_loi_id = ?', $article->id) … … 213 213 public function executeArticle(sfWebRequest $request) { 214 214 if ($id = $request->getParameter('id')) 215 $this->article = doctrine::getTable('ArticleLoi')->find($id);215 $this->article = Doctrine::getTable('ArticleLoi')->find($id); 216 216 else { 217 217 $loi_id = $this->getLoi($request, 1); 218 218 $slug_article = $request->getParameter('article'); 219 $this->article = doctrine::getTable('ArticleLoi')->findOneByLoiSlug($loi_id, $slug_article);219 $this->article = Doctrine::getTable('ArticleLoi')->findOneByLoiSlug($loi_id, $slug_article); 220 220 } 221 221 $this->forward404Unless($this->article); 222 222 if (!(isset($slug_article))) { 223 $this->loi = doctrine::getTable('TitreLoi')->findLightLoi($this->article->texteloi_id);223 $this->loi = Doctrine::getTable('TitreLoi')->findLightLoi($this->article->texteloi_id); 224 224 $loi_id = $this->loi->texteloi_id; 225 225 } 226 $this->alineas = doctrine::getTable('Alinea')226 $this->alineas = Doctrine::getTable('Alinea') 227 227 ->createquery('a') 228 228 ->where('a.article_loi_id = ?', $this->article->id) … … 243 243 $loi_id = $request->getParameter('loi'); 244 244 if ($light) 245 $this->loi = doctrine::getTable('TitreLoi')->findLightLoi($loi_id);246 else $this->loi = doctrine::getTable('TitreLoi')->findLoi($loi_id);245 $this->loi = Doctrine::getTable('TitreLoi')->findLightLoi($loi_id); 246 else $this->loi = Doctrine::getTable('TitreLoi')->findLoi($loi_id); 247 247 $this->forward404Unless($this->loi); 248 248 return $loi_id; -
cpc/trunk/project/apps/frontend/modules/parlementaire/actions/actions.class.php
r1257 r1274 178 178 } 179 179 } else { 180 $ctquery = doctrine_query::create()180 $ctquery = Doctrine_Query::create() 181 181 ->from('Parlementaire p') 182 182 ->select('count(distinct p.id) as ct') 183 183 ->fetchOne(); 184 184 $this->total = $ctquery['ct']; 185 $ctquery = doctrine_query::create()185 $ctquery = Doctrine_Query::create() 186 186 ->from('Parlementaire p') 187 187 ->select('count(distinct p.id) as ct') -
cpc/trunk/project/apps/frontend/modules/presence/actions/actions.class.php
r1238 r1274 38 38 $this->seance = Doctrine::getTable('Seance')->findOneById($seance_id); 39 39 $this->forward404Unless($this->seance); 40 $this->preuves = doctrine::getTable('PreuvePresence')40 $this->preuves = Doctrine::getTable('PreuvePresence') 41 41 ->createQuery('pp') 42 42 ->leftJoin('pp.Presence p') … … 50 50 $seance_id = $request->getParameter('seance'); 51 51 $this->forward404Unless($seance_id); 52 $this->seance = doctrine::getTable('Seance')->createQuery('s')52 $this->seance = Doctrine::getTable('Seance')->createQuery('s') 53 53 ->where('s.id = ?', $seance_id) 54 54 ->leftJoin('s.Organisme') 55 55 ->fetchOne(); 56 56 $this->forward404Unless($this->seance); 57 $this->intervenants = doctrine::getTable('Presence')->createQuery('p')57 $this->intervenants = Doctrine::getTable('Presence')->createQuery('p') 58 58 ->leftJoin('p.Parlementaire pa') 59 59 ->leftJoin('p.Preuves pr') … … 63 63 ->orderBy('pa.nom_de_famille') 64 64 ->execute(); 65 $this->presents = doctrine::getTable('Presence')->createQuery('p')65 $this->presents = Doctrine::getTable('Presence')->createQuery('p') 66 66 ->where('p.seance_id = ?', $seance_id) 67 67 ->leftJoin('p.Parlementaire pa') -
cpc/trunk/project/apps/frontend/modules/questions/actions/actions.class.php
r1186 r1274 15 15 //respect de l'existant : il est possible d'appeler les questions ecrites par leur id 16 16 //Mais lorsque c'est le cas on redirige vers une url plus parlante utilisant le numéro définit par l'AN 17 $question = doctrine::getTable('QuestionEcrite')->find($request->getParameter('id'));17 $question = Doctrine::getTable('QuestionEcrite')->find($request->getParameter('id')); 18 18 $this->forward404Unless($question); 19 19 return $this->redirect('@question_numero?numero='.$question->numero); … … 22 22 { 23 23 $numero = $request->getParameter('numero'); 24 $this->question = doctrine::getTable('QuestionEcrite')24 $this->question = Doctrine::getTable('QuestionEcrite') 25 25 ->createquery('q') 26 26 ->where('q.numero = ?', $numero) … … 28 28 ->fetchOne(); 29 29 $this->forward404Unless($this->question); 30 $this->parlementaire = doctrine::getTable('Parlementaire')->find($this->question->parlementaire_id);30 $this->parlementaire = Doctrine::getTable('Parlementaire')->find($this->question->parlementaire_id); 31 31 $this->forward404Unless($this->parlementaire); 32 32 } … … 34 34 public function executeParlementaire(sfWebRequest $request) 35 35 { 36 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));36 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 37 37 $this->forward404Unless($this->parlementaire); 38 $this->questions = doctrine::getTable('QuestionEcrite')->createQuery('q')38 $this->questions = Doctrine::getTable('QuestionEcrite')->createQuery('q') 39 39 ->where('q.parlementaire_id = ?', $this->parlementaire->id) 40 40 ->orderBy('q.date DESC, q.numero DESC'); … … 77 77 } 78 78 79 $this->query = doctrine::getTable('QuestionEcrite')->createQuery('i');79 $this->query = Doctrine::getTable('QuestionEcrite')->createQuery('i'); 80 80 if (count($ids)) 81 81 $this->query->whereIn('i.id', $ids); … … 91 91 92 92 if ($slug = $request->getParameter('parlementaire')) { 93 $this->parlementaire = doctrine::getTable('Parlementaire')93 $this->parlementaire = Doctrine::getTable('Parlementaire') 94 94 ->findOneBySlug($slug); 95 95 if ($this->parlementaire) … … 104 104 } 105 105 } 106 ?> -
cpc/trunk/project/apps/frontend/modules/section/actions/actions.class.php
r1120 r1274 18 18 public function executeParlementaire(sfWebRequest $request) 19 19 { 20 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));20 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 21 21 $this->forward404Unless($this->parlementaire); 22 22 $this->titre = 'Dossiers parlementaires'; … … 26 26 public function executeParlementaireSection(sfWebRequest $request) 27 27 { 28 $this->parlementaire = doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug'));28 $this->parlementaire = Doctrine::getTable('Parlementaire')->findOneBySlug($request->getParameter('slug')); 29 29 $this->forward404Unless($this->parlementaire); 30 30 31 $this->section = doctrine::getTable('Section')->find($request->getParameter('id'));31 $this->section = Doctrine::getTable('Section')->find($request->getParameter('id')); 32 32 $this->forward404Unless($this->section); 33 33 34 $this->qinterventions = doctrine::getTable('Intervention')->createQuery('i')34 $this->qinterventions = Doctrine::getTable('Intervention')->createQuery('i') 35 35 ->where('i.parlementaire_id = ?', $this->parlementaire->id) 36 36 ->leftJoin('i.Section s') … … 41 41 public function executeShow(sfWebRequest $request) 42 42 { 43 $this->section = doctrine::getTable('Section')->find($request->getParameter('id'));43 $this->section = Doctrine::getTable('Section')->find($request->getParameter('id')); 44 44 $this->forward404Unless($this->section); 45 45 … … 99 99 if (!($this->order = $request->getParameter('order'))) 100 100 $this->order = 'plus'; 101 $query = doctrine::getTable('Section')->createQuery('s')101 $query = Doctrine::getTable('Section')->createQuery('s') 102 102 ->where('s.id = s.section_id') 103 103 ->andWhere('s.nb_interventions > 5'); -
cpc/trunk/project/apps/frontend/modules/section/actions/components.class.php
r1113 r1274 9 9 public function executeParlementaire() 10 10 { 11 $sql = doctrine_query::create()11 $sql = Doctrine_Query::create() 12 12 ->from('Section s') 13 13 ->select('s.section_id, sp.titre, count(i.id) as nb') -
cpc/trunk/project/apps/frontend/modules/solr/actions/actions.class.php
r1160 r1274 66 66 $res = $this->results['docs'][$i]; 67 67 $this->results['docs'][$i]['highlighting'] = implode('...', $results['highlighting'][$res['id']]['text']); 68 // $this->results['docs'][$i]['object'] = doctrine::getTable($res['object_name'])->find($res['object_id']);68 // $this->results['docs'][$i]['object'] = Doctrine::getTable($res['object_name'])->find($res['object_id']); 69 69 } 70 70 $this->results['end'] = $deb + $nb;
Note: See TracChangeset
for help on using the changeset viewer.