Changeset 773 for trunk/app/controllers
- Timestamp:
- 09/22/08 23:22:18 (2 months ago)
- Location:
- trunk/app/controllers
- Files:
-
- 3 modified
-
chats_controller.php (modified) (1 diff)
-
messages_controller.php (modified) (1 diff)
-
vclassrooms_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/chats_controller.php
r762 r773 46 46 public function getMessages($vclassroom_id) 47 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; 48 $this->layout = 'ajax'; 49 $conditions = array('Chat.vclassroom_id'=>$vclassroom_id); 50 $fields = array('Chat.message', 'Chat.created', 'User.username');; 51 $order = 'Chat.id DESC'; 52 $limit = 15; 52 53 53 54 $this->set('data', $this->Chat->findAll($conditions, $fields, $order, $limit)); -
trunk/app/controllers/messages_controller.php
r759 r773 206 206 foreach ($this->data['Message'] as $v): 207 207 if ( $v != 0): 208 $this->Message->del($v);208 $this->Message->del($v); 209 209 endif; 210 210 endforeach; 211 211 212 $this->msgFlash( 'Message deleted.','/messages/listing');212 $this->msgFlash(__('Data removed', true),'/messages/listing'); 213 213 } 214 214 -
trunk/app/controllers/vclassrooms_controller.php
r756 r773 51 51 // student belongs to this class? 52 52 if ( $this->Auth->user()): 53 $this->set('belongs', $this->Vclassroom->belongs($this->Auth->user('id'), $vclassroom_id));53 $this->set('belongs', $this->Vclassroom->belongs($this->Auth->user('id'), $vclassroom_id)); 54 54 else: 55 $this->set('belongs', false);55 $this->set('belongs', false); 56 56 endif; 57 57 $this->Vclassroom->unbindAll();
