Subversion-Projekte lars-tiefland.cakephp

Revision

Revision 9 | Revision 14 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 9 Revision 11
Zeile 31... Zeile 31...
31
        function view( $id = null )
31
        function view( $id = null )
32
        {
32
        {
33
            $this->Post->id = $id;
33
            $this->Post->id = $id;
34
            $this->set( 'post', $this->Post->read() );
34
            $this->set( 'post', $this->Post->read() );
35
        }
35
        }
-
 
36
        function add()
-
 
37
        {
-
 
38
            if ( ! empty($this->data) )
-
 
39
            {
-
 
40
                if ( $this->Post->save($this->data) )
-
 
41
                {
-
 
42
                    $this->Session->setFlash( 'Your post has been saved.' );
-
 
43
                    $this->redirect( array('action' => 'index') );
-
 
44
                }
-
 
45
            }
-
 
46
        }
36
    }
47
    }
Zeile 37... Zeile 48...
37
 
48
 
38
?>
49
?>