Changeset 667 for trunk/app/controllers

Show
Ignore:
Timestamp:
07/22/08 18:11:54 (4 months ago)
Author:
aarkerio
Message:

Exmans and vclass

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/controllers/answers_controller.php

    r666 r667  
    4747 public function admin_edit($answer_id = null) 
    4848 {   
    49     if (empty($this->data["Answer"])) 
    50     {    
     49   $this->layout = 'admin'; 
     50 
     51   if (empty($this->data["Answer"])): 
    5152        $this->data = $this->Answer->read(null, $answer_id ); 
    52     } 
    53     else 
    54     { 
     53   else: 
     54 
    5555       $this->Sanitize = new Sanitize; 
    5656         
    57        $this->Sanitize->clean($this->data["Answer"]);  
     57       $this->Sanitize->clean($this->data['Answer']);  
    5858         
    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;   
    6463 }   
    6564