Show
Ignore:
Timestamp:
07/11/08 14:28:03 (4 months ago)
Author:
aarkerio
Message:

Update FAQS

Files:
1 modified

Legend:

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

    r562 r642  
    2525 public function add()  
    2626 { 
    27    if (!empty($this->data['Reply'])) 
    28    {  
     27   if (!empty($this->data['Reply'])): 
     28  
    2929     $this->Sanitize = new Sanitize; 
    3030      
     
    3535     $this->Reply->create(); 
    3636      
    37      if ($this->Reply->save($this->data['Reply'])) 
    38      {  
    39           $this->msgFlash('Reply added', $this->data['Reply']['redirect_to']); 
    40      } 
    41    }  
     37     if ($this->Reply->save($this->data)):  
     38          $this->msgFlash(__('Reply saved', true), $this->data['Reply']['redirect_to']); 
     39     endif; 
     40  endif;  
    4241 } 
    4342  
     
    4645 public function admin_edit($id = null) 
    4746 { 
    48     if (empty($this->data)) 
    49     { 
     47   if (empty($this->data)): 
     48    
    5049        $this->Reply->id = $id; 
    5150         
    5251        $this->data = $this->Reply->read(); 
    53     } 
    54     else 
    55     { 
    56         if ($this->Reply->save($this->data['Reply'])) 
    57         { 
    58             $this->flash('Reply updated.','/admin/topics/listing/'.$topic_id); 
    59         } 
    60     } 
     52   else: 
     53    
     54        if ($this->Reply->save($this->data['Reply'])): 
     55             $this->flash(__('Reply updated', true),'/admin/topics/listing/'.$this->data['Reply']['topic_id']); 
     56    endif; 
     57   endif; 
    6158 } 
    6259 
     
    6865    $this->data['Reply']['id']     = $reply_id; 
    6966      
    70     if ($this->Reply->save($this->data['Reply'])) 
    71     { 
     67    if ($this->Reply->save($this->data['Reply'])): 
    7268       $this->msgFlash('Reply status changed', '/admin/topics/listing/'.$topic_id); 
    73     } 
     69    endif; 
    7470 } 
    7571 
    7672 public function admin_delete($topic_id, $reply_id) 
    7773 { 
    78      if ( $this->Reply->del($reply_id) ) 
    79      { 
    80         $this->msgFlash('Reply deleted','/admin/topics/listing/'.$topic_id); 
    81      } 
     74   if ( $this->Reply->del($reply_id) ): 
     75        $this->msgFlash(__('Data deleted', true),'/admin/topics/listing/'.$topic_id); 
     76   endif; 
    8277 } 
    8378}