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: [Done] Garbage collection log's retention  (Read 19617 times)

0 Members and 1 Guest are viewing this topic.

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
[Done] Garbage collection log's retention
« on: July 23, 2015, 12:53:20 am »

It looks like this topic was raised in http://forum.coppermine-gallery.net/index.php?topic=67708.0 but no one made (or it was rejected) a feature request, so here it is.

FR: Option to specify precise duration for logs retention.

It might be a hidden (DB only) option.
« Last Edit: July 27, 2015, 02:51:27 pm by Αndré »
Logged
PM me for Polish translations (new/update)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Garbage collection log's retention
« Reply #1 on: July 23, 2015, 11:04:03 am »

Unfortunately I cannot commit the hidden feature to our SVN repository currently, as SourceForge hasn't restored the SVN service yet. As there's no ETA, here's at least the patch:
Code: [Select]
Index: cpg1.6.x/include/init.inc.php
===================================================================
--- cpg1.6.x/include/init.inc.php (revision 8796)
+++ cpg1.6.x/include/init.inc.php (working copy)
@@ -191,7 +191,7 @@
 }
 
 if ($CONFIG['log_mode']) {
-    spring_cleaning('logs', CPG_DAY * 2);
+    spring_cleaning('logs', ($CONFIG['log_retention'] > 0 ? $CONFIG['log_retention'] : CPG_DAY * 2));
 }
 
 // Record User's IP address
Index: cpg1.6.x/CHANGELOG.txt
===================================================================
--- cpg1.6.x/CHANGELOG.txt (revision 8797)
+++ cpg1.6.x/CHANGELOG.txt (working copy)
@@ -23,6 +23,7 @@
 [S] = Security fix (issues that are related to security)
 *********************************************
 
+2015-07-23 [A] Added hidden feature to adjust log file retention (thread ID 78309) {eenemeenemuu}
 2015-07-07 [B] Fixed album sort order for "first level" albums (thread ID 77314) {eenemeenemuu}
 2015-07-06 [B] Fixed GIF support check when resizing images (thread ID 78279) {eenemeenemuu}
 2015-06-10 [B] Fixed typo in user manager that created invalid user passwords (thread ID 76021) {eenemeenemuu}
Index: cpg1.5.x/include/init.inc.php
===================================================================
--- cpg1.5.x/include/init.inc.php (revision 8796)
+++ cpg1.5.x/include/init.inc.php (working copy)
@@ -191,7 +191,7 @@
 }
 
 if ($CONFIG['log_mode']) {
-    spring_cleaning('logs', CPG_DAY * 2, array('log_header.inc.php'));
+    spring_cleaning('logs', ($CONFIG['log_retention'] > 0 ? $CONFIG['log_retention'] : CPG_DAY * 2), array('log_header.inc.php'));
 }
 
 // Record User's IP address
Index: cpg1.5.x/CHANGELOG.txt
===================================================================
--- cpg1.5.x/CHANGELOG.txt (revision 8797)
+++ cpg1.5.x/CHANGELOG.txt (working copy)
@@ -23,6 +23,7 @@
 [S] = Security fix (issues that are related to security)
 *********************************************
 
+2015-07-23 [A] Added hidden feature to adjust log file retention (thread ID 78309) {eenemeenemuu}
 2015-07-07 [B] Fixed album sort order for "first level" albums (thread ID 77314) {eenemeenemuu}
 2015-07-06 [B] Fixed GIF support check when resizing images (thread ID 78279) {eenemeenemuu}
 2015-07-03 [M] Counted version count up in SVN repository from cpg1.5.36 to cpg1.5.37 {eenemeenemuu}
Logged

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Re: Garbage collection log's retention
« Reply #2 on: July 26, 2015, 12:58:33 am »

Thank you, applied and running. :) Had this hardcoded.

Maybe move to other solutions. SF has a bad rep lately...
Logged
PM me for Polish translations (new/update)

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Garbage collection log's retention
« Reply #3 on: July 26, 2015, 07:57:43 pm »

We have discussed alternatives for future development but moving had proven to very difficult.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Garbage collection log's retention
« Reply #4 on: July 27, 2015, 02:51:04 pm »

Committed in SVN revision 8798.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.