Changeset 667 for trunk/app/controllers
- Timestamp:
- 07/22/08 18:11:54 (4 months ago)
- Files:
-
- 1 modified
-
trunk/app/controllers/answers_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/controllers/answers_controller.php
r666 r667 47 47 public function admin_edit($answer_id = null) 48 48 { 49 if (empty($this->data["Answer"])) 50 { 49 $this->layout = 'admin'; 50 51 if (empty($this->data["Answer"])): 51 52 $this->data = $this->Answer->read(null, $answer_id ); 52 } 53 else 54 { 53 else: 54 55 55 $this->Sanitize = new Sanitize; 56 56 57 $this->Sanitize->clean($this->data[ "Answer"]);57 $this->Sanitize->clean($this->data['Answer']); 58 58 59 if ($this->Answer->save($this->data['Answer'])) 60 { 61 $this->msgFlash('Answer updated.','/admin/questions/answers/'.$this->data["Answer"]["question_id"]); 62 } 63 } 59 if ($this->Answer->save($this->data)): 60 $this->msgFlash(__('Answer updated', true),'/admin/questions/answers/'.$this->data['Answer']['question_id']); 61 endif; 62 endif; 64 63 } 65 64
