Changeset 3985
- Timestamp:
- 05/09/07 17:49:56 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfBBPlugin/modules/sfBB/lib/sfBBPlugin_sfBBActions.class.php
r3959 r3985 20 20 class sfBBPlugin_sfBBActions extends sfActions 21 21 { 22 /** 23 * Determines the CSS theme, using default value if relevant config value 24 * hasn't been set. 25 */ 22 26 public function preExecute() 23 27 { … … 27 31 } 28 32 33 /** 34 * The homepage action of sfBB. 35 * Grabs a list of live categories. 36 */ 29 37 public function executeIndex() 30 38 { 39 $this->categories = array(); 40 31 41 $c = new Criteria(); 32 42 $c->add(sfBBCategoryPeer::IS_LIVE, true); 33 $this->categories = sfBBCategoryPeer::doSelect($c); 43 44 if ($categories = sfBBCategoryPeer::doSelect($c)) 45 { 46 $this->categories = $categories; 47 } 34 48 } 35 49 50 /** 51 * Grabs a live forum based on the request parameter. 52 * Invalid forum IDs result in a 404. 53 */ 36 54 public function executeViewForum() 37 55 { plugins/sfBBPlugin/modules/sfBB/templates/indexSuccess.php
r3677 r3985 1 1 <?php use_helper('sfBB', 'Text') ?> 2 2 3 <?php if (count($categories) > 0): ?> 3 4 <div id="categories"> 4 5 <?php foreach ($categories as $category): ?> … … 27 28 <?php endforeach ?> 28 29 </div> 30 <?php else: ?> 31 <div id="error"> 32 There are no categories; please log into the admin section and add some. 33 </div> 34 <?php endif ?>