No Support > Feature requests

[Done] Garbage collection log's retention

(1/1)

wilk:
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.

Αndré:
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: ---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}

--- End code ---

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

Maybe move to other solutions. SF has a bad rep lately...

phill104:
We have discussed alternatives for future development but moving had proven to very difficult.

Αndré:
Committed in SVN revision 8798.

Navigation

[0] Message Index

Go to full version