diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-07-13 00:12:58 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-07-13 00:12:58 +0800 |
commit | 522f8447e66d63c71a5d81e706e8b7f7d6f8413e (patch) | |
tree | 2f1d17b5497c89017d4ddd9753f3049fcbca0290 | |
parent | 70fb4932e4b143b943e12d8258faf4ed5dd97819 (diff) | |
download | pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar.gz pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar.bz2 pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar.lz pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar.xz pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.tar.zst pttbbs-522f8447e66d63c71a5d81e706e8b7f7d6f8413e.zip |
* make API param ordering more natural
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5089 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/include/proto.h | 2 | ||||
-rw-r--r-- | pttbbs/mbbsd/cache.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pttbbs/include/proto.h b/pttbbs/include/proto.h index f9fe7e3f..f4a4702f 100644 --- a/pttbbs/include/proto.h +++ b/pttbbs/include/proto.h @@ -118,7 +118,7 @@ char*getuserid(int num); int getuser(const char *userid, userec_t *xuser); int searchnewuser(int mode); int count_logins(int uid, int show); -int is_BM_expired(time4_t user_firstlogin, time4_t BMexpire); +int is_BM_expired(time4_t BMexpire, time4_t user_firstlogin); int is_BM_cache(int); int apply_boards(int (*func)(boardheader_t *)); int haspostperm(const char *bname); diff --git a/pttbbs/mbbsd/cache.c b/pttbbs/mbbsd/cache.c index be426743..bee7dee0 100644 --- a/pttbbs/mbbsd/cache.c +++ b/pttbbs/mbbsd/cache.c @@ -141,7 +141,7 @@ apply_boards(int (*func) (boardheader_t *)) } int -is_BM_expired(time4_t user_firstlogin, time4_t BMexpire) +is_BM_expired(time4_t BMexpire, time4_t user_firstlogin) { // XXX 為了解決有人挑過期的帳號註冊以取得 BM 權 // 這是很笨很笨而且相關 bug 可能一堆的 workaround, @@ -170,7 +170,7 @@ is_BM_cache(int bid) /* bid starts from 1 */ // reject user who haven't complete registration. if (!HasUserPerm(PERM_LOGINOK)) return 0; - if (is_BM_expired(cuser.firstlogin, bp->BMexpire)) + if (is_BM_expired(bp->BMexpire, cuser.firstlogin)) return 0; // XXX hard coded MAX_BMs=4 if( currutmp->uid == pbm[0] || |