From a9253065d48fb023ce89289b9ee481fa38f55687 Mon Sep 17 00:00:00 2001 From: ptt Date: Wed, 14 Apr 2004 14:19:06 +0000 Subject: delete with threshold git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1760 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/read.c | 17 ++++++++++++----- mbbsd/record.c | 7 ------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mbbsd/read.c b/mbbsd/read.c index 55a446c8..699d8cec 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -161,7 +161,7 @@ TagThread(char *direct) int TagPruner(int bid) { - boardheader_t *bp; + boardheader_t *bp=NULL; assert(bid >= 0); /* bid == 0 means in mailbox */ if (bid){ bp = getbcache(bid); @@ -169,9 +169,14 @@ TagPruner(int bid) return DONOTHING; } if (TagNum && ((currstat != READING) || (currmode & MODE_BOARD))) { - if (tolower(getans("刪除所有標記[N]?")) != 'y') + if (getans("刪除所有標記[N]?") != 'y') return READ_REDRAW; - delete_range(currdirect, 0, 0); +#ifdef SAFE_ARTICLE_DELETE + if(bp && bp->nuser>20) + safe_delete_range(currdirect, 0, 0); + else +#endif + delete_range(currdirect, 0, 0); TagNum = 0; if (bid) setbtotal(bid); @@ -899,7 +904,8 @@ i_read(int cmdmode, char *direct, void (*dotitle) (), void (*doentry) (), onekey if(recbase <= bottom_line) entries = get_records(currdirect, headers, FHSZ, recbase, p_lines); - if( entries>=0 && entries=0 && entries=0 && entries=0 && entries