Hi all

That's the delete action which Cake baked me:

        function delete($id = null) {
                if (!$id) {
                        $this->flash(__('Invalid User', true), array('action' 
=> 'index'));
                }
                if ($this->User->del($id)) {
                        $this->flash(__('User deleted', true), array('action' 
=> 'index'));
                }
                $this->flash(__('The User could not be deleted. Please, try 
again.',
true), array('action' => 'index'));
        }

This results in showing two flashes, "User deleted" AND "The User
could not be deleted. Please, try again."! IMO there's missing an else
statement for the last line of the action...

That's not the first time that I thought Cake baked me some pretty bad
code... Is this normal?? If so, it doesn't really strengthen my trust
in CakePHP...

Thanks for any reply, Josh

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to