(ANNO_KEEP_DAYS, anno_keep_days): Replace macro ANNO_KEEP_DAYS by
new configuration key. Closes #780425. (delete_old_announcements): Do nothing when anno_keep_days is negative.
This commit is contained in:
parent
e16e38dfab
commit
f0b4381c98
4 changed files with 7 additions and 2 deletions
|
@ -58,8 +58,11 @@ delete_old_announcements(void)
|
|||
char tmp_filename[1024];
|
||||
int copy_file;
|
||||
|
||||
if (anno_keep_days < 0)
|
||||
return;
|
||||
|
||||
time(&now);
|
||||
old = now - days(ANNO_KEEP_DAYS);
|
||||
old = now - days(anno_keep_days);
|
||||
logerror("Deleting annos older than %s", ctime(&old));
|
||||
|
||||
if ((annfp = fopen(annfil, "rb")) == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue