- Timestamp:
- 09/23/08 21:41:15 (2 months ago)
- Location:
- trunk/app/controllers
- Files:
-
- 2 modified
-
comments_controller.php (modified) (2 diffs)
-
discussions_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/comments_controller.php
r696 r775 33 33 if ($this->Comment->save($this->data)): 34 34 $this->msgFlash(__('Comment added', true), $this->data['Comment']['redirect_to'].'/#comments'); 35 else:36 $this->flash('Problem, please report', $this->data['Comment']['redirect_to'].'/#comments');37 35 endif; 38 36 endif; … … 40 38 41 39 /** ===== ADMIN METHODS ====== **/ 40 public function admin_listing($paginate=0, $limit=20) 41 { 42 $this->layout = 'admin'; 43 44 $this->pageTitle = __('Comments on entries', true); 45 46 //$this->Comment->bindModel(array('belongsTo'=> array('News' =>array('className'=> 'News', 'foreignKey'=> 'new_id' )))); 47 48 $this->paginate['fields'] = array('Comment.id','Entry.id','Entry.title','Comment.id','Comment.comment', 'Comment.created', 'Comment.user_id', 'Comment.status', 'User.username'); 49 $this->paginate['conditions'] = null; 50 $this->paginate['order'] = "Comment.id DESC"; 51 $this->paginate['limit'] = 30; 52 $data = $this->paginate('Comment'); 53 $this->set(compact('data')); 54 55 } 42 56 43 57 // change status enabled/disabled actived -
trunk/app/controllers/discussions_controller.php
r696 r775 89 89 90 90 //Do not pass any args to send() 91 if ( $this->Email->send() ) 92 { 93 return true; 94 } 95 else 96 { 97 return false; 98 } 91 if ( $this->Email->send() ): 92 return true; 93 else: 94 return false; 95 endif; 99 96 } 100 97
