summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-14 17:33:10 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-14 17:33:10 +0800
commit69235ab6f7b279ff15443448b23b6944931c0275 (patch)
tree643fbf371396f6cbda0a336d349fedd1608d1b33
parentfdbae2339bd255d3bc75988a2c489786126a254a (diff)
downloadpttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar.gz
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar.bz2
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar.lz
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar.xz
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.tar.zst
pttbbs-69235ab6f7b279ff15443448b23b6944931c0275.zip
fix bug in del_range()
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1538 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 3e9972b1..b6bb9e52 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1748,12 +1748,17 @@ mark_post(int ent, fileheader_t * fhdr, char *direct)
}
int
-del_range(int ent, fileheader_t * fhdr, char *direct)
+del_range(int ent, fileheader_t *fhdr, char *direct)
{
char num1[8], num2[8];
int inum1, inum2;
- boardheader_t *bp;
- bp = getbcache(currbid);
+
+ /* 有三種情況會進這裡, 信件, 看板, 精華區 */
+ if( !(direct[0] == 'h') ){ /* 信件不用 check */
+ boardheader_t *bp = getbcache(currbid);
+ if (strcmp(bp->brdname, "Security") == 0)
+ return DONOTHING;
+ }
/* rocker.011018: 串接模式下還是不允許刪除比較好 */
if (currmode & MODE_SELECT) {
@@ -1762,8 +1767,7 @@ del_range(int ent, fileheader_t * fhdr, char *direct)
/* safe_sleep(1); */
return FULLUPDATE;
}
- if (strcmp(bp->brdname, "Security") == 0)
- return DONOTHING;
+
if ((currstat != READING) || (currmode & MODE_BOARD)) {
getdata(1, 0, "[設定刪除範圍] 起點:", num1, 6, DOECHO);
inum1 = atoi(num1);
@@ -1811,7 +1815,10 @@ del_range(int ent, fileheader_t * fhdr, char *direct)
}
}
#ifdef SAFE_ARTICLE_DELETE
- safe_article_delete_range(direct, inum1, inum2);
+ if( direct[0] == 'b' )
+ safe_article_delete_range(direct, inum1, inum2);
+ else
+ delete_range(direct, inum1, inum2);
#else
delete_range(direct, inum1, inum2);
#endif