summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-23 14:11:10 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-03-23 14:11:10 +0800
commite0234349d759b2a9f71455283fd3096deb134265 (patch)
tree2a287237bff4b639f3fae6e80f56e8f171f822cc
parentd2f8418a5cdb1ff9348066f10f6666d8a570ec44 (diff)
downloadpttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar.gz
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar.bz2
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar.lz
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar.xz
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.tar.zst
pttbbs-e0234349d759b2a9f71455283fd3096deb134265.zip
Check if the board is already in fav list when adding
through 'i' or 'a' in favorite list. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2671 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/board.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mbbsd/board.c b/mbbsd/board.c
index 44f1e45f..420f3f60 100644
--- a/mbbsd/board.c
+++ b/mbbsd/board.c
@@ -1089,7 +1089,10 @@ choose_board(int newflag)
if (ptr == NULL)
vmsg("你的最愛太多了啦 真花心");
- else {
+ else if (ptr->attr & NBRD_FAV) { // already in fav list
+ // move curser to item
+ for (num = 0; bid != nbrd[num].bid; ++num);
+ } else {
ptr->attr |= NBRD_FAV;
if (ch == 'i') {