Changeset 766 for trunk

Show
Ignore:
Timestamp:
09/16/08 13:35:20 (2 months ago)
Author:
aarkerio
Message:

Upodate

Location:
trunk/app
Files:
1 added
1 modified

Legend:

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

    r696 r766  
    4343 } 
    4444  
     45 private function __saveWiki()  
     46 { 
     47   if ($rev): 
     48       $wasReverted = true; 
     49   endif; 
     50 
     51   $this->data['Wiki']; 
     52    
     53   $this->Wiki->save(); 
     54 
     55 } 
    4556 /** ====  ADMIN SECTION ====*/ 
    4657  
     
    6778    $this->data['Wiki']['modified'] = 'now()'; 
    6879         
    69     $this->Wiki->create(); 
    70          
    71         if ($this->Wiki->save($this->data['Wiki'])):    
     80        if ($this->Wiki->save($this->data)):    
    7281               $id = $this->Wiki->getLastInsertID(); 
    73                $this->msgFlash('Wiki page added', '/admin/wikis/edit/'.$id); 
    74         else: 
    75            $this->flash('Error in DB, contact staff', '/admin/wikis/add'); 
     82               $this->msgFlash(__('WikiPage added', true), '/admin/wikis/edit/'.$id); 
    7683    endif;  
    7784   endif; 
     
    93100     
    94101  $this->set('subjects', Set::combine($this->Wiki->Subject->find('all', array('order' => 'title')), "{n}.Subject.id","{n}.Subject.title")); 
     102 
     103  //$this->set('subjects', Set::combine($this->Wiki->Subject->find('all', array('order' => 'title')), "{n}.Subject.id","{n}.Subject.title")); 
    95104      
    96105  if (empty($this->data['Wiki'])):