Show
Ignore:
Timestamp:
07/09/08 19:24:21 (5 months ago)
Author:
aarkerio
Message:

Added image and comments fixed

Files:
1 modified

Legend:

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

    r631 r635  
    3232    if ($username != null): 
    3333      $user_id    = $this->User->field('id', array("username"=>$username)); 
    34     $conditions["user_id"] = $user_id; 
     34      $conditions["user_id"] = $user_id; 
    3535    endif; 
    3636       
     
    5151    if (!empty($this->data["Comment"]) ): 
    5252          
    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(); 
    5456        
    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; 
    6260    endif; 
    6361  }