Changeset 1157 for cpc/trunk/project/plugins
- Timestamp:
- Apr 13, 2010, 12:21:16 AM (11 years ago)
- Location:
- cpc/trunk/project/plugins
- Files:
-
- 2 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/plugins/sfDoctrineActAsTaggablePlugin/lib/TaggableTemplate.class.php
r154 r1157 303 303 else 304 304 { 305 $q = Doctrine_Query::create() 306 ->select('t.name') 307 ->from('Tag t INDEXBY t.name, t.Tagging tg') 308 ->where('tg.taggable_id = ?', $this->getInvoker()->id) 305 $q1 = Doctrine::getTable('Tagging')->createQuery('tg') 306 ->select('tg.tag_id') 307 ->where('tg.taggable_id = ?', $this->getInvoker()->id) 309 308 ->addWhere('tg.taggable_model = ?', get_class($this->getInvoker())) 310 309 ; 311 310 $ids = array(); 311 foreach($q1->execute(array(), Doctrine::HYDRATE_ARRAY) as $i ){ 312 $ids[] = $i['id']; 313 } 314 $q = Doctrine::getTable('Tag')->createQuery('t') 315 ->select('t.name') 316 ->whereIn('t.id', $ids); 312 317 $saved_tags = $q->execute(array(), Doctrine::HYDRATE_ARRAY); 313 318 $tags = array();
Note: See TracChangeset
for help on using the changeset viewer.