Changeset 762 for trunk/app/controllers
- Timestamp:
- 09/07/08 21:53:53 (2 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/chats_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/chats_controller.php
r738 r762 22 22 23 23 if ( $this->Auth->user() ): 24 $this->Auth->allow(array('display', ' add'));24 $this->Auth->allow(array('display', 'getMessages')); 25 25 endif; 26 26 } … … 44 44 } 45 45 46 public function getMessages($vclassroom_id) 47 { 48 $conditions = array('Chat.vclassroom_id'=>$vclassroom_id); 49 $fields = array('Chat.message', 'Chat.created', 'User.username');; 50 $order = 'Chat.id DESC'; 51 $limit = 15; 52 53 $this->set('data', $this->Chat->findAll($conditions, $fields, $order, $limit)); 54 $this->render('getmessages', 'ajax'); 55 } 46 56 /*=== ADMIN METHODS ===*/ 47 57 public function admin_listing()
