Clean votes older votes Clean votes older votes
 

News:

CPG Release 1.6.28
added submissions from {406man}
cleaned up a few PHP (8.4) deprecations
fixed PHP deprecation in calendar
removed security vulnerability
(please upgrade when possible)

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Ă©