forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: silyashevich on January 21, 2006, 08:41:51 pm

Title: Clean votes older votes
Post by: silyashevich on January 21, 2006, 08:41:51 pm
In ratepic.php i find this code:
Code: [Select]
// Clean votes older votes
$curr_time = time();
$clean_before = $curr_time - $CONFIG['keep_votes_time'] * 86400;
$sql = "DELETE " . "FROM {$CONFIG['TABLE_VOTES']} " . "WHERE vote_time < $clean_before";
$result = cpg_db_query($sql);
Its clean all votes older then keep_votes_time value in config table and wos surprise for me  :-\ :)
But value for this variable not editable on admin.php
Maybe make this settings editable without sql in future?

PS. sorry for bad english :(
Title: Re: Clean votes older votes
Post by: wilk on January 05, 2013, 08:45:59 pm
Indeed, I've just get troubled why I could vote again on already voted images. I've even repopulated *_votes table using data from *_vote_stats table, but then it all got cleaned up again. Soon I've found this piece of code, but "keep_votes_time" variable is unfortunately accessible only from phpMyAdmin. I wonder why it is not in gallery config.
Title: Re: Clean votes older votes
Post by: Αndré on January 08, 2013, 12:22:45 pm
Valid feature request.