From 936306efc3fd3091717b41b2dd6ecda988e5d824 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 4 May 2012 15:25:06 +0000 Subject: Use "board link" instead of "symbolic link". git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5675 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/include/proto.h | 6 +++--- pttbbs/mbbsd/admin.c | 12 ++++++------ pttbbs/mbbsd/board.c | 7 +++---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h index 74cda234..8c51d051 100644 --- a/pttbbs/include/proto.h +++ b/pttbbs/include/proto.h @@ -24,9 +24,9 @@ int m_register(void); int cat_register(void); unsigned int setperms(unsigned int pbits, const char * const pstring[]); void setup_man(const boardheader_t * board, const boardheader_t * oldboard); -void delete_symbolic_link(boardheader_t *bh, int bid); -int make_symbolic_link(const char *bname, int gid); -int make_symbolic_link_interactively(int gid); +void delete_board_link(boardheader_t *bh, int bid); +int make_board_link(const char *bname, int gid); +int make_board_link_interactively(int gid); void merge_dir(const char *dir1, const char *dir2, int isoutter); /* angel */ diff --git a/pttbbs/mbbsd/admin.c b/pttbbs/mbbsd/admin.c index 587971fb..a49ab3ad 100644 --- a/pttbbs/mbbsd/admin.c +++ b/pttbbs/mbbsd/admin.c @@ -421,7 +421,7 @@ setup_man(const boardheader_t * board, const boardheader_t * oldboard) #endif } -void delete_symbolic_link(boardheader_t *bh, int bid) +void delete_board_link(boardheader_t *bh, int bid) { assert(0<=bid-1 && bid-1brdattr & BRD_SYMBOLIC) { - /* Only SYSOP knows a board is symbolic */ + /* Only SYSOP knows a board is a link or not. */ if (HasUserPerm(PERM_SYSOP) || HasUserPerm(PERM_SYSSUPERSUBOP)) state |= NBRD_SYMBOLIC; else { @@ -1925,8 +1925,7 @@ choose_board(int newflag) case 'L': if ((HasUserPerm(PERM_SYSOP) || (HasUserPerm(PERM_SYSSUPERSUBOP) && GROUPOP())) && IN_CLASS()) { - // TODO XXX why need symlink here? Can we remove it? - if (make_symbolic_link_interactively(class_bid) < 0) + if (make_board_link_interactively(class_bid) < 0) break; brdnum = -1; head = 9999; @@ -2133,7 +2132,7 @@ choose_board(int newflag) ptr = &nbrd[num]; if (ptr->myattr & NBRD_SYMBOLIC) { if (vans("確定刪除連結?[N/y]") == 'y') - delete_symbolic_link(getbcache(ptr->bid), ptr->bid); + delete_board_link(getbcache(ptr->bid), ptr->bid); } brdnum = -1; } -- cgit v1.2.3