summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-27 18:09:30 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-10-27 18:09:30 +0800
commit5a0f5170fb1a70975a51d074ba48265386677a4e (patch)
treeff12af7480fe6bdbee10795852d32f2de869edbb
parent84f2e19610f3b0a699dc006806ccc82659686130 (diff)
downloadpttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar.gz
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar.bz2
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar.lz
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar.xz
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.tar.zst
pttbbs-5a0f5170fb1a70975a51d074ba48265386677a4e.zip
ignore readmark for deleted posts
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5169 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index e4541767..e1e9c041 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/mbbsd/bbs.c
@@ -607,13 +607,25 @@ readdoent(int num, fileheader_t * ent)
char *typeattr = "";
char isunread = 0, oisunread = 0;
-#ifdef DETECT_SAFEDEL
+#ifdef SAFE_ARTICLE_DELETE
+ // TODO maybe we should also check .filename because admin can't change that
char iscorpse = (ent->owner[0] == '-') && (ent->owner[1] == 0);
- if (!iscorpse)
- {
-#endif
-
+ if (iscorpse) {
+#ifdef COLORIZED_SAFEDEL
+ // quick display
+ prints("%7d ", num);
+ outs(ANSI_COLOR(1;30));
+ prints("%-6.5s", ent->date);
+ prints("%-13.12s", ent->owner);
+ prints("¢® %-.*s" ANSI_RESET "\n",
+ t_columns-34, ent->title);
+ return;
+#else // COLORIZED_SAFEDEL
+ oisunread = isunread = 0;
+#endif // COLORIZED_SAFEDEL
+ } else
+#endif // SAFE_ARTICLE_DELETE
oisunread = isunread =
brc_unread(currbid, ent->filename, ent->modified);
@@ -671,20 +683,6 @@ readdoent(int num, fileheader_t * ent)
typeattr = ANSI_COLOR(1;30);
type = '+';
}
-#ifdef DETECT_SAFEDEL
- } // if(!iscorpse)
- else {
- // quick display
- SOLVE_ANSI_CACHE();
- outs(ANSI_COLOR(1;30));
- prints("%7d ", num);
- prints("%-6.5s", ent->date);
- prints("%-13.12s", ent->owner);
- prints("¢® %-.*s" ANSI_RESET "\n",
- t_columns-34, ent->title);
- return;
- }
-#endif
title = ent->filename[0]!='L' ? subject(ent->title) : "<¥»¤åÂê©w>";
if (ent->filemode & FILE_VOTE)