Changeset 593 for trunk/app/models
- Timestamp:
- 06/07/08 20:48:51 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/models/entry.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/models/entry.php
r535 r593 37 37 'status' => VALID_NOT_EMPTY 38 38 ); 39 40 public function getComments($blogger_id) 41 { 42 43 $conditions = array('Entry.user_id'=>$blogger_id); 44 $fields = array('Entry.title', 'Entry.id'); 45 $order = 'Entry.id DESC'; 46 $limit = 30; 47 $data = $this->findAll($conditions, $fields, $order, $limit); 48 49 foreach($data as $k=>$v): 50 if ( count($v['Comment']) < 1): 51 unset($data[$k]); 52 endif; 53 endforeach; 54 55 return $data; 56 } 57 58 39 59 /* 40 60 public $validate = array( … … 61 81 ); */ 62 82 } 63 64 83 ?>
