- Timestamp:
- May 13, 2009, 8:16:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/apps/mobile_frontend/modules/community/actions/actions.class.php
r11014 r11622 53 53 parent::executeMemberList($request); 54 54 } 55 56 /** 57 * Executes search action 58 * 59 * @param sfWebRequest $request a request object 60 */ 61 public function executeSearch(sfWebRequest $request) 62 { 63 sfConfig::set('sf_nav_type', 'default'); 64 65 $params = $request->getParameter('community', array()); 66 $params['community_category_id'] = $request->getParameter('community_category_id'); 67 $this->isResult = false; 68 $this->category_id = 0; 69 if (isset($params['name'])) 70 { 71 $params['name'] = $params['name']; 72 $this->isResult = true; 73 } 74 if (isset($params['community_category_id'])) 75 { 76 $this->category_id = $params['community_category_id']; 77 $params['community_category_id'] = $this->category_id; 78 $this->isResult = true; 79 } 80 81 $this->filters = new CommunityFormFilter(); 82 $this->filters->bind($params); 83 $q = $this->filters->getQuery(); 84 85 $this->pager = new sfDoctrinePager('Community', 20); 86 $this->pager->setQuery($q); 87 $this->pager->setPage($request->getParameter('page', 1)); 88 $this->pager->init(); 89 90 $this->categorys = Doctrine::getTable('CommunityCategory') 91 ->createQuery() 92 ->where('lft > 1') 93 ->execute(); 94 95 return sfView::SUCCESS; 96 } 55 97 }
Note: See TracChangeset
for help on using the changeset viewer.