diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-13 23:43:44 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-02-13 23:43:44 +0800 |
commit | 747104a997297c7531d5e2aa637125836e28d2c8 (patch) | |
tree | dacc490f2e1dfa9658c262f3f3ac100ce645351f /mbbsd/read.c | |
parent | 8ecd8bddde9a768e94096f68ac25dd3bf6adf589 (diff) | |
download | pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar.gz pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar.bz2 pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar.lz pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar.xz pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.tar.zst pttbbs-747104a997297c7531d5e2aa637125836e28d2c8.zip |
- 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
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r-- | mbbsd/read.c | 16 |
1 files changed, 16 insertions, 0 deletions
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; |