From af72b546138741c3ef237f54be180f655103c543 Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 10 Feb 2014 08:07:24 +0000 Subject: Revide locked post appearance. git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5923 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/mbbsd/bbs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index b3948234..a458eeaf 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -624,7 +624,6 @@ readdoent(int num, fileheader_t * ent) { int type = ' ', title_type = SUBJECT_NORMAL; const char *title; - char xtitle[STRLEN]; char *mark, color, special = 0, isonline = 0, recom[8]; char *typeattr = ""; char isunread = 0, oisunread = 0; @@ -708,13 +707,10 @@ readdoent(int num, fileheader_t * ent) type = '+'; } - if (ent->filename[0] == 'L') { - snprintf(xtitle, sizeof(xtitle), "<Âê©w> %s", subject_ex(ent->title, &title_type)); - title = xtitle; - } else { - title = subject_ex(ent->title, &title_type); - } + title = subject_ex(ent->title, &title_type); + if (ent->filename[0] == 'L') + title_type = SUBJECT_LOCKED; #ifdef SAFE_ARTICLE_DELETE if (iscorpse) @@ -731,6 +727,9 @@ readdoent(int num, fileheader_t * ent) case SUBJECT_FORWARD: color = '6', mark = "Âà"; break; + case SUBJECT_LOCKED: + color = '5', mark = "Âê"; + break; case SUBJECT_NORMAL: default: color = '1', mark = "¡¼"; @@ -743,7 +742,9 @@ readdoent(int num, fileheader_t * ent) isonline = query_online(ent->owner); - if(ent->recommend >= MAX_RECOMMENDS) + if (title_type == SUBJECT_LOCKED) + strcpy(recom,"0m--"); + else if(ent->recommend >= MAX_RECOMMENDS) strcpy(recom,"1mÃz"); else if(ent->recommend>9) sprintf(recom,"3m%2d",ent->recommend); -- cgit v1.2.3