summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-15 23:35:28 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-15 23:35:28 +0800
commit037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a (patch)
tree0697e1eadaeea1a57b22ebe8db772f5edadbc348 /mbbsd
parent6cd1e2dd9904da07992c18b77f0586a4d77b61de (diff)
downloadpttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar.gz
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar.bz2
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar.lz
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar.xz
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.tar.zst
pttbbs-037cd65ffe0cf7110d6eed2d98ddf9d6cc175c3a.zip
for SAFE_ARTICLE_DELETE
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1408 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/bbs.c9
-rw-r--r--mbbsd/record.c1
2 files changed, 8 insertions, 2 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 659e6544..49f62ae2 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -1656,16 +1656,21 @@ recommend(int ent, fileheader_t * fhdr, char *direct)
return FULLUPDATE;
}
if (!(currmode & MODE_POST) || bp->brdattr & BRD_VOTEBOARD || fhdr->filemode & FILE_VOTE) {
- vmsg("您因權限不足!");
+ vmsg("您權限不足, 無法推薦!");
return FULLUPDATE;
}
+#ifdef SAFE_ARTICLE_DELETE
+ if( fhdr->filename[0] == '.' ){
+ vmsg("本文已刪除");
+ return FULLUPDATE;
+ }
+#endif
if( fhdr->filemode & FILE_BID){
return do_bid(ent, fhdr, bp, direct, ptime);
}
setdirpath(path, direct, fhdr->filename);
-
if (fhdr->recommend == 0 && strcmp(cuser.userid, fhdr->owner) == 0){
vmsg("警告! 本人不能推薦第一次!");
return FULLUPDATE;
diff --git a/mbbsd/record.c b/mbbsd/record.c
index c28a0c6d..e1388abe 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -408,6 +408,7 @@ safe_article_delete(int ent, fileheader_t *fhdr, char *direct)
memcpy(&newfhdr, fhdr, sizeof(fileheader_t));
sprintf(newfhdr.title, "(本文已被刪除)");
strcpy(newfhdr.filename, ".deleted");
+ strcpy(newfhdr.owner, "-");
substitute_record(direct, &newfhdr, sizeof(newfhdr), ent);
return 0;
}