You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2012-02-28 00:19:44

cdubks88
Member
Registered: 2012-01-31
Posts: 11

Deleting consumables

Ubuntu Server 10.04.4 LTS
mysql  Ver 14.14 Distrib 5.1.41, for debian-linux-gnu (i486) using readline 6.1
PHP Version 5.3.2-1ubuntu4.14
glpi 0.80.61

Can someone point me in the right direction for the location of the DELETE FROM that removes a consumable item from glpi_consumables when you click "to delete"?

I am wanting to track our usage and would like to set up an environment where I can write the rows that are getting deleted into another table for historical purposes that I can then query.

Can someone help me out with where this is happening exactly? I've searched the glpi directory for DELETE FROM but couldn't come up with any files that looked like they were removing the row from glpi_consumables, even though that is the behavior.

I'm sure I have just missed it, but any help is greatly appreciated.

C.

Offline

#2 2012-02-28 17:07:31

cdubks88
Member
Registered: 2012-01-31
Posts: 11

Re: Deleting consumables

I found a reference in inc/consumableitem.class.php in the function cleanDBonPurge.

My problem is I haven't done a lot of programming with the object stuff and db's. I've always done it the old school way, so I'm a little confused as to where the global $DB reference is coming from.

Can someone help me out with where I need to start looking?

Thanks,

C.

Offline

#3 2012-02-28 23:21:14

cdubks88
Member
Registered: 2012-01-31
Posts: 11

Re: Deleting consumables

You can close this thread.

I went ahead and wrote a workaround.

Thanks!

Offline

Board footer

Powered by FluxBB