Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Clean votes older votes  (Read 6822 times)

0 Members and 1 Guest are viewing this topic.

silyashevich

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • http://photo.shuya.ru
Clean votes older votes
« 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 :(
« Last Edit: January 21, 2006, 08:51:38 pm by silyashevich »
Logged

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Re: Clean votes older votes
« Reply #1 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.
Logged
PM me for Polish translations (new/update)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Clean votes older votes
« Reply #2 on: January 08, 2013, 12:22:45 pm »

Valid feature request.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.