I have this in the controller

if ( $this->Award->deleteAll( array( 'Award.id' => $id, 'Award.profile_id'
=> $this->auth_id ), false, true ) ) {
                                
       $response = array(
        'status' => true);
                                
} else {
       $response = array(
                'status' => false,
                'message' => 'Error!');
                                
}
$this->_ajaxReturn( $response ); // <- simply encodes the response to JSON

Now when it deletes I see response = true in firebug so that's good. And it
comes back in JSON format {"status":true}


So I edit the link $id value with firebug so it will not meet the deleteAll
conditions so it should not delete and throw back error message but all it
does is nothing. The response comes back true but it does not delete
anything.

Tried changing deleteAll $callback to both true and false and still nothing.

Why can I not get the response to send back false? Makes no sense here.
Completely puzzled.

Dave

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