Advanced search  


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.

Pages: [1]   Go Down

Author Topic: Archive  (Read 3155 times)

0 Members and 1 Guest are viewing this topic.


  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
« on: July 02, 2005, 09:07:41 am »

Hi, I'd like to suggest an archive feature for 1.5
It should be able to rotate out MySQL data from the cpg_picture table to an archive table after a certain amount of time using cron etc.
This would help to keep the main table clean and fast to process. A link to the archive could be placed eg below each album. Browsing the archive's using the same routines than the main image gallery.


  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From
    • Donovan Bray
Re: Archive
« Reply #1 on: July 02, 2005, 09:41:10 am »

You could code this without cron.

create your archive  table, create a config table entry like 'last_archive'

create code in your

if $config['last_archive'] is < today then run archive()

function archive runs the sql select into query and then delete from, then updates last_archive to todays date.

Thats pretty much it.

It will run once a day at some point, then not try to run again until the next day, and you only waste one "if" test, and the entire config table gets loaded in init anyway, so its not like you had to do an extra sql query to find out when it ran last..

coding user access to the archive is going to be the same with/without cron.

Pages: [1]   Go Up

Page created in 0.016 seconds with 19 queries.