Incorrect Stats

I've noticed in the Admin that under Gallery Stats the number of images is incorrect. I've done quite a bit of deleting and re-uploading and my total images is way off.


  • trisweb Administrator
    Yep, that's a hard predicament.

    First, if the images haven't been viewed yet, then they're not in the database, and since I'm using the DB (not the filesystem -- too slow) to get the stats, it doesn't get updated instantly like that.

    Also, there is database garbage collection that is implemented, but not yet run, so deleted images will still have database entries.

    If you want to synchronize everything, and know PHP, just include classes.php in a page, make a new Gallery object, and run `$gallery->garbageCollect(true, true);` (or something like that, I'm not looking at the code right now).

    Eventually those garbage collection functions will be run every once in a while to keep everything clean.
  • could you expand upon this? i'm not familiar with php so maybe you could write out something we could paste somewhere.

    does the garbage command execute every so often? when does it?

    thanks a lot.
  • trisweb Administrator
    Garbage collection does *not* run at the moment, which is why I'm telling you how to run it.

    The only thing it does is get old entries out of the database. As they are, they don't hurt anything, so it *doesn't matter* except for the stupid count, which also doesn't matter. ;-) Don't worry about it. Please.
  • hello, i tried to find a solution to this problem adding after:

    query("DELETE FROM ".prefix('albums')." WHERE `id` = " . $this->albumid);

    in class php (about line 540)

    the line:

    query("DELETE FROM ".prefix('images')." WHERE `albumid` = " . $this->albumid);

    it doesnt give me any error, but the images are not deleted

    can anybody help me with this!!!

    thanks a lot for this great application!!
Sign In or Register to comment.