From 6976ce2aebefebdd725b64d0d5ce143003a6990b Mon Sep 17 00:00:00 2001 From: ptt Date: Sun, 26 May 2002 05:31:26 +0000 Subject: recommend fix for junchoon git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@246 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/bbs.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index fad06d3f..5ad1789d 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -1,4 +1,4 @@ -/* $Id: bbs.c,v 1.33 2002/05/26 05:22:46 ptt Exp $ */ +/* $Id: bbs.c,v 1.34 2002/05/26 05:31:26 ptt Exp $ */ #include #include #include @@ -1147,8 +1147,17 @@ static int recommend(int ent, fileheader_t *fhdr, char *direct) { struct tm *ptime=localtime(&now); extern userec_t xuser; char buf[200],path[200], yn[5]; - if(!(currmode & MODE_POST) || !strcmp(fhdr->owner,cuser.userid)) - return DONOTHING; + boardheader_t *bp; + bp = getbcache(currbid); + + if(!(currmode & MODE_POST) || !strcmp(fhdr->owner,cuser.userid) || + bp->brdattr & BRD_VOTEBOARD) + { + move(b_lines-1,0); + prints("您因權限不足無法推薦 或 不能推薦自己的文章!"); + pressanykey(); + return FULLUPDATE; + } if(fhdr->recommend>9 || fhdr->recommend<0 )// 暫時性的code 原來舊有值取消 fhdr->recommend=0; -- cgit v1.2.3