[Done] Garbage collection log's retention [Done] Garbage collection log's retention
 

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

Main Menu

[Done] Garbage collection log's retention

Started by wilk, July 23, 2015, 12:53:20 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

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.
PM me for Polish translations (new/update)

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

wilk

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

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

phill104

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

Αndré