In my dataman, I have this function...
Code:
function post_save_once()
{
build_comment_count($this->fetch_field('mediaID'));
return true;
}
And it works GREAT! So my question of course, from the title... is there a function for running post delete? I tried both post_delete() and post_delete_once() and neither of them did anything. Is there something I am missing, or am I just out of luck?
Code:
function post_delete_once()
{
build_comment_count($this->fetch_field('mediaID'));
return true;
}
Basically, right now, whenever I post a comment to my mod, it will run the build_comment_count script, and update the number of comments in my database. However, when I delete a comment, I wish it to also run the build_comment_count script, so that it can update the number of comments again; but I doesn't seem to do it with the code above.
BTW, are there any comprehensive guides on datamanagers? The manual is a little lacking.
--------------- Added [DATE]1270223838[/DATE] at [TIME]1270223838[/TIME] ---------------
Looking at the datamanager class... yes, post_delete does exist...
However, it seems that $this->fetch_field fails, since the data entry no longer exists.
Would there be a viable solution to this problem?