Clean votes older votes Clean votes older votes
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Clean votes older votes

Started by silyashevich, January 21, 2006, 08:41:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

silyashevich

In ratepic.php i find this code:

// 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 :(

wilk

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.
PM me for Polish translations (new/update)

ΑndrĂ©