Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: [Done] Garbage collection log's retention  (Read 3303 times)

0 Members and 1 Guest are viewing this topic.

wilk

  • Translator
  • Coppermine novice
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • #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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15212
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 novice
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 46
    • #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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • 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: 15212
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.062 seconds with 19 queries.