Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Clean votes older votes  (Read 6790 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.019 seconds with 19 queries.