Hi all, im new to cakephp and built a basic content manage system with
it. Now for some reason i seem to have a weird bug with my delete
function in the administration.

I can manage products with the system i have. And the products have
galleries attached to them that hold images. Now what happens is once
in a while when i delete a product for some reason it might delete
galleries of another product in the system. Now it doesnt happen every
time i delete a product, only once in a while.

Now i was wondering if anyone else ever had issues like this before?
Or if anyone might know what might be causing this.

Below is my admin delete function that is causing the issue.

Thankyou





function admin_delete($id) {
                $this->checkSession();
                $this->layout = 'admin_main';
                $this->pageTitle = $this->Navigator->get_page_title($id);

                $primary_model = $this->uses[0];

                $this->$primary_model->id = $id;
                $this->data = $this->$primary_model->read();

                if ($this->$primary_model->del($id)) {
                        // Add Log.
                        $this->log($this->data[$primary_model]['id']);

                        $this->flash('Item deleted.',$this->referer());
                }
        }

--~--~---------~--~----~------------~-------~--~----~
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