summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 19:41:27 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-14 19:41:27 +0800
commitd08db5565702465469052e01d06ff76194d03cd4 (patch)
tree58db90bc271d5f58bdc0c75b7efd3a8228e93a68 /mbbsd/bbs.c
parent115cf628efd96f27a9f8b4379e1b87b31293921f (diff)
downloadpttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.gz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.bz2
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.lz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.xz
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.tar.zst
pttbbs-d08db5565702465469052e01d06ff76194d03cd4.zip
remove dircache
prevent error for push bottom git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1758 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index de6a385a..f1e09eaf 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -948,7 +948,7 @@ edit_post(int ent, fileheader_t * fhdr, char *direct)
fileheader_t postfile;
boardheader_t *bp = getbcache(currbid);
- if (strcmp(bp->brdname, "Security") == 0)
+ if (fhdr->filemode&FILE_BOTTOM && strcmp(bp->brdname, "Security") == 0)
return DONOTHING;
if (!HAS_PERM(PERM_SYSOP) && ((bp->brdattr & BRD_VOTEBOARD) || fhdr->filemode & FILE_VOTE))
@@ -1011,9 +1011,6 @@ edit_post(int ent, fileheader_t * fhdr, char *direct)
strlcpy(fhdr->title, save_title, sizeof(fhdr->title));
brc_addlist(postfile.filename);
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
- /* rocker.011018: 順便更新一下cache */
- touchdircache(currbid);
-
if (!(currbrdattr & BRD_HIDE) && (!bp->level || (currbrdattr & BRD_POSTMASK)))
do_crosspost(ALLPOST, fhdr, fpath);
}
@@ -1444,7 +1441,6 @@ edit_title(int ent, fileheader_t * fhdr, char *direct)
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
/* rocker.011018: 這裡應該改成用reference的方式取得原來的檔案 */
substitute_check(fhdr);
- touchdircache(currbid);
}
return FULLUPDATE;
}
@@ -1457,7 +1453,6 @@ solve_post(int ent, fileheader_t * fhdr, char *direct)
if (HAS_PERM(PERM_SYSOP)) {
fhdr->filemode ^= FILE_SOLVED;
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
- touchdircache(currbid);
return PART_REDRAW;
}
return DONOTHING;
@@ -1481,7 +1476,6 @@ recommend_cancel(int ent, fileheader_t * fhdr, char *direct)
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
substitute_check(fhdr);
- touchdircache(currbid);
return FULLUPDATE;
}
static int
@@ -1519,7 +1513,6 @@ do_add_recommend(char *direct, fileheader_t *fhdr, int ent, char *buf)
write(fd, &fhdr->recommend, sizeof(char));
close(fd);
- touchdircache(currbid);
}
return 0;
}
@@ -1762,7 +1755,6 @@ mark_post(int ent, fileheader_t * fhdr, char *direct)
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
substitute_check(fhdr);
- touchdircache(currbid);
return PART_REDRAW;
}
@@ -2346,7 +2338,6 @@ push_bottom(int ent, fileheader_t * fhdr, char *direct)
num = delete_record(direct, sizeof(fileheader_t), ent);
}
setbottomtotal(currbid);
- touchdircache(currbid);
return DIRCHANGED;
}
@@ -2415,7 +2406,6 @@ good_post(int ent, fileheader_t * fhdr, char *direct)
}
}
substitute_record(direct, fhdr, sizeof(*fhdr), ent);
- touchdircache(currbid);
/* rocker.011018: 串接模式用reference增進效率 */
if ((currmode & MODE_SELECT) && (fhdr->money & FHR_REFERENCE)) {
fileheader_t hdr;