summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-09 16:17:34 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-02-09 16:17:34 +0800
commit3ab9b834fc5375693d8219563850c93b37f4d946 (patch)
tree534ff07cb38b9e8c692d4eeeaf87364f0f2f0273
parent6c77da3c9604a957f9d4eb0e474072bc74b2cf81 (diff)
downloadpttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar.gz
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar.bz2
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar.lz
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar.xz
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.tar.zst
pttbbs-3ab9b834fc5375693d8219563850c93b37f4d946.zip
Prevent editing symlink boards.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5922 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/admin.c29
1 files changed, 21 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/admin.c b/pttbbs/mbbsd/admin.c
index 6ac28169..a4959e43 100644
--- a/pttbbs/mbbsd/admin.c
+++ b/pttbbs/mbbsd/admin.c
@@ -512,11 +512,28 @@ m_mod_board(char *bname)
/* Ptt 這邊斷行會檔到下面 */
move(9, 0);
- snprintf(genbuf, sizeof(genbuf), "(E)設定 (V)發文獎勵%s%s [Q]取消? ",
- HasUserPerm(PERM_SYSOP |
- PERM_BOARD) ? " (B)Vote (S)救回 (C)合併 (G)樂透解卡" : "",
- HasUserPerm(PERM_SYSSUBOP | PERM_SYSSUPERSUBOP | PERM_BOARD) ? " (D)刪除" : "");
+ if (bh.brdattr & BRD_SYMBOLIC) {
+ snprintf(genbuf, sizeof(genbuf), "[看板連結] (D)刪除 [Q]取消? ");
+ } else {
+ snprintf(genbuf, sizeof(genbuf), "(E)設定 (V)發文獎勵%s%s [Q]取消? ",
+ HasUserPerm(PERM_SYSOP |
+ PERM_BOARD) ? " (B)Vote (S)救回 (C)合併 (G)樂透解卡" : "",
+ HasUserPerm(PERM_SYSSUBOP | PERM_SYSSUPERSUBOP | PERM_BOARD) ? " (D)刪除" : "");
+ }
getdata(10, 0, genbuf, ans, 3, LCECHO);
+ if (isascii(*ans))
+ *ans = tolower(*ans);
+
+ if ((bh.brdattr & BRD_SYMBOLIC) && *ans) {
+ switch (*ans) {
+ case 'd':
+ case 'q':
+ break;
+ default:
+ vmsg("禁止更動連結看板,請直接修正原看板");
+ break;
+ }
+ }
switch (*ans) {
case 'g':
@@ -610,10 +627,6 @@ m_mod_board(char *bname)
}
break;
case 'e':
- if( bh.brdattr & BRD_SYMBOLIC ){
- vmsg("禁止更動連結看板,請直接修正原看板");
- break;
- }
y = 8;
move(y++, 0); clrtobot();
outs("直接按 [Return] 不修改該項設定");