From 747104a997297c7531d5e2aa637125836e28d2c8 Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 13 Feb 2008 15:43:44 +0000 Subject: - SRexpire: enable expiring search cache records - EDITFLAG_ALLOWTITLE: prevent editor to prompt for non-changable titles - user: general message fix git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3912 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/read.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mbbsd/read.c') diff --git a/mbbsd/read.c b/mbbsd/read.c index 73cf2b90..694eee82 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -574,6 +574,22 @@ select_read(const keeploc_t * locmem, int sr_mode) filetime = dasht(newdirect); count = dashs(newdirect) / sizeof(fileheader_t); + if (currstat != RMAIL && currboard[0] && currbid > 0) + { + time4_t filecreate = dashc(newdirect); + boardheader_t *bp = getbcache(currbid); + assert(bp); + + if (bp->SRexpire) + { + if (bp->SRexpire > now) // invalid expire time. + bp->SRexpire = now; + + if (bp->SRexpire > filecreate) + filetime = -1; + } + } + if(filetime<0 || now-filetime>60*60) { reload = 1; inc = 0; -- cgit v1.2.3