示例#1
0
 /**
  * Returns true when last visible(!) cdate less one week 
  *
  * @return  boolean
  */
 public function hasNewChildren()
 {
     if (isNull($obEntity = iterFirst($this->_mapper->getList('descendent_id')->filter('ancestor_id = ?', $this->id)->sort('cdate', 'DESC')->limit(1)))) {
         return FALSE;
     }
     return time() - strtotime($obEntity->cdate) <= C('forum.topic-alive-duration') ? TRUE : FALSE;
 }
示例#2
0
 /**
  * @see RM_Forum_Mapper::_getRootNodes()
  */
 public function getThemeList()
 {
     return $this->_mapper->getList()->filter('parent_id = 0')->sort('cdate', 'ASC');
 }