Subversion-Projekte lars-tiefland.cakephp

Revision

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

Revision 14 Revision 15
Zeile 49... Zeile 49...
49
            $this->Post->del( $id );
49
            $this->Post->del( $id );
50
            $this->Session->setFlash( 'The post with id: ' . $id .
50
            $this->Session->setFlash( 'The post with id: ' . $id .
51
                ' has been deleted.' );
51
                ' has been deleted.' );
52
            $this->redirect( array('action' => 'index') );
52
            $this->redirect( array('action' => 'index') );
53
        }
53
        }
-
 
54
 
-
 
55
        function edit( $id = null )
-
 
56
        {
-
 
57
            $this->Post->id = $id;
-
 
58
            if ( empty($this->data) )
-
 
59
            {
-
 
60
                $this->data = $this->Post->read();
-
 
61
            }
-
 
62
            else
-
 
63
            {
-
 
64
                if ( $this->Post->save($this->data) )
-
 
65
                {
-
 
66
                    $this->Session->setFlash( 'Your post has been updated.' );
-
 
67
                    $this->redirect( array('action' => 'index') );
-
 
68
                }
-
 
69
            }
-
 
70
        }
54
    }
71
    }
Zeile 55... Zeile 72...
55
 
72
 
56
?>
73
?>