summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-26 13:31:26 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-26 13:31:26 +0800
commit6976ce2aebefebdd725b64d0d5ce143003a6990b (patch)
tree0351822c36a63cc24d75e194c75cf15d25d7e5a1
parent876787887633b7259a8647b4bb38190ec9c670ad (diff)
downloadpttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar.gz
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar.bz2
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar.lz
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar.xz
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.tar.zst
pttbbs-6976ce2aebefebdd725b64d0d5ce143003a6990b.zip
recommend fix for junchoon
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@246 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/bbs.c15
1 files changed, 12 insertions, 3 deletions
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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;