diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-05-22 11:54:06 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2014-05-22 11:54:06 +0800 |
commit | 8bc2127b949562a9ccf7c0259cf6ec1b68414ca1 (patch) | |
tree | 7466703a6420f7a8738d44e1c303cf1e2d7cd663 | |
parent | 1d4994541f0119eaa3279666478cf614834324bc (diff) | |
download | pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar.gz pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar.bz2 pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar.lz pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar.xz pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.tar.zst pttbbs-8bc2127b949562a9ccf7c0259cf6ec1b68414ca1.zip |
Move perm check into psb.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@6004 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 6 | ||||
-rw-r--r-- | pttbbs/mbbsd/psb.c | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index c36cbf4c..03f7b3cc 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -4489,12 +4489,6 @@ manage_post(int ent, fileheader_t * fhdr, const char *direct) { #ifdef USE_COMMENTD case 'v': { - boardheader_t *bp = bp = getbcache(currbid); - assert(bp); - if (!(bp->brdattr & BRD_BM_MASK_CONTENT)) { - vmsg("要先開啟刪特定文字的權限。"); - return FULLUPDATE; - } psb_comment_manager(currboard, fhdr->filename); } break; diff --git a/pttbbs/mbbsd/psb.c b/pttbbs/mbbsd/psb.c index 96cbc22d..910ae8ab 100644 --- a/pttbbs/mbbsd/psb.c +++ b/pttbbs/mbbsd/psb.c @@ -704,6 +704,14 @@ pvcm_input_processor(int key, int curr, int total GCC_UNUSED, int rows GCC_UNUSE switch(key) { case KEY_DEL: case 'd': + { + boardheader_t *bp = bp = getbcache(currbid); + assert(bp); + if (!(bp->brdattr & BRD_BM_MASK_CONTENT)) { + vmsg("要先開啟刪特定文字的權限。"); + return FULLUPDATE; + } + } if (vans("確定要刪除嗎? (y/N) ") == 'y') { CommentsDeleteFromTextFile(cx->cmctx, curr); } @@ -723,7 +731,6 @@ pvcm_welcome() { " 目前沒辦法100%%確認找到正確的位置,但起碼內文是相同的。\n\n" " (2) 被編輯過造成內容有變動的推文無法刪除。\n\n" ""); - doupdate(); pressanykey(); return 0; } @@ -750,6 +757,7 @@ psb_comment_manager(const char *board, const char *file) { return FULLUPDATE; ctx.total = CommentsGetCount(pvcmctx.cmctx); if (ctx.total){ + pvcm_welcome(); psb_main(&ctx); } CommentsClose(pvcmctx.cmctx); |