summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-08-01 09:29:26 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2011-08-01 09:29:26 +0800
commit22bb8201118bb815e2fc3a3c955b71fda57bf4b3 (patch)
tree8ea2ebaef2de7a81f189b45957a0e653751a305d
parentff9904e83c1d194a5cc12ac49925905ae71e294a (diff)
downloadpttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar.gz
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar.bz2
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar.lz
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar.xz
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.tar.zst
pttbbs-22bb8201118bb815e2fc3a3c955b71fda57bf4b3.zip
do not allow changing topic in ALLPOST
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5384 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index 486bbd53..6ead53d2 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/mbbsd/bbs.c
@@ -2546,7 +2546,7 @@ cite_post(int ent, const fileheader_t * fhdr, const char *direct)
int
edit_title(int ent, fileheader_t * fhdr, const char *direct)
{
- char genbuf[200] = "";
+ char genbuf[PATHLEN] = "";
fileheader_t tmpfhdr = *fhdr;
int dirty = 0;
int allow = 0;
@@ -2556,6 +2556,8 @@ edit_title(int ent, fileheader_t * fhdr, const char *direct)
allow = 0;
else if (HasUserPerm(PERM_SYSOP))
allow = 2;
+ else if (strcmp(BN_ALLPOST, currboard) == 0)
+ allow = 0;
else if (currmode & MODE_BOARD || is_file_owner(fhdr, &cuser))
allow = 1;