|
OK Chuck, updated the code above in the post:
added a left join for table ppgal_user so the lastimageid and lastimagetitle can be fetched..
IF the lastimageid == the edited imageid AND the 2 titles are not the same.. then it also updates the ppgal_user table's lastimageititle..
---
I also added a if ($imageinfo['catid'] == $image['catid']) to the code.. because now the lastimage for the category is only done when the user did only changed the title!!!! If he also changed the category (at the same time which he can) then the work with the titles (remove from old category.. pass to new etc..) is done in the update_count function that is called below.
Luc
probably the code can be shortened.. but I think editimage is not high traffic and it is clearer like this..
Last edited by Luciano; December 7th, 2008 at 07:25 AM.
|