Changeset 776 for trunk/app/models

Show
Ignore:
Timestamp:
09/23/08 22:04:26 (2 months ago)
Author:
aarkerio
Message:

Test Unit fixed

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/models/entry.php

    r734 r776  
    2424 public $hasMany = array('Comment' => 
    2525                         array('className'     => 'Comment', 
    26                                'conditions'    =>  null, 
     26                               'conditions'    => 'Comment.status = 1', 
    2727                               'order'         => 'Comment.created', 
    2828                               'limit'         => null, 
     
    5252 public function getComments($blogger_id) 
    5353 { 
     54  $this->unbindAll(); 
     55   
     56  $this->bindModel(array('hasMany' => array('Comment' => 
     57                         array('className'     => 'Comment', 
     58                               'conditions'    => null, 
     59                               'order'         => 'Comment.created', 
     60                               'limit'         => null, 
     61                               'foreignKey'    => 'entry_id', 
     62                               'dependent'     => true, 
     63                               'exclusive'     => false, 
     64                               'finderQuery'   => '' 
     65                         ) 
     66                  ))); 
     67 
    5468  $conditions   = array('Entry.user_id'=>$blogger_id); 
    5569  $fields       = array('Entry.title', 'Entry.id');