Changeset 635 for trunk/app/controllers/comments_controller.php
- Timestamp:
- 07/09/08 19:24:21 (5 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/comments_controller.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/comments_controller.php
r631 r635 32 32 if ($username != null): 33 33 $user_id = $this->User->field('id', array("username"=>$username)); 34 $conditions["user_id"] = $user_id;34 $conditions["user_id"] = $user_id; 35 35 endif; 36 36 … … 51 51 if (!empty($this->data["Comment"]) ): 52 52 53 $this->Sanitize = new Sanitize; 53 $this->Sanitize = new Sanitize; 54 $this->Sanitize->clean($this->data["Comment"]); //Hopefully this is enough 55 $this->Comment->create(); 54 56 55 $this->Sanitize->clean($this->data["Comment"]); //Hopefully this is enough 56 57 $this->Comment->create(); 58 59 if ($this->Comment->save($this->data["Comment"])): 60 $this->msgFlash('Comment added', $this->data['Comment']['redirect_to'].'/#comments'); 61 endif; 57 if ($this->Comment->save($this->data["Comment"])): 58 $this->msgFlash(__('Comment added', true), $this->data['Comment']['redirect_to'].'/#comments'); 59 endif; 62 60 endif; 63 61 }
