diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-19 20:53:25 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-05-19 20:53:25 +0800 |
commit | de53988dcc23dc8e7eb588984570f6d1c9b7dab8 (patch) | |
tree | ac58b34f48ba48e99e1765029ccb8fe2ee2831c2 | |
parent | b78f37a8246a15f6e6fec5d9c673bbc2f4e57587 (diff) | |
download | pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar.gz pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar.bz2 pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar.lz pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar.xz pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.tar.zst pttbbs-de53988dcc23dc8e7eb588984570f6d1c9b7dab8.zip |
- make file types visible to all users
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4318 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/bbs.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c index c1fd6df4..c072c3bc 100644 --- a/mbbsd/bbs.c +++ b/mbbsd/bbs.c @@ -459,28 +459,35 @@ readdoent(int num, fileheader_t * ent) } } + // handle 'type' type = isunread ? '+' : ' '; if (isunread == 2) type = '~'; - // handle 'type" if ((currmode & MODE_BOARD) && (ent->filemode & FILE_DIGEST)) + { type = (type == ' ') ? '*' : '#'; - else if (currmode & MODE_BOARD || HasUserPerm(PERM_LOGINOK)) + } + else if (ent->filemode & FILE_MARKED) // marks should be visible to everyone. { - if (ent->filemode & FILE_MARKED) - { - if(ent->filemode & FILE_SOLVED) - type = '!'; - else if (isunread == 0) - type = 'm'; - else if (isunread == 1) - type = 'M'; - else if (isunread == 2) - type = '='; - } else if (TagNum && !Tagger(atoi(ent->filename + 2), 0, TAG_NIN)) + if(ent->filemode & FILE_SOLVED) + type = '!'; + else if (isunread == 0) + type = 'm'; + else if (isunread == 1) + type = 'M'; + else if (isunread == 2) + type = '='; + } + else if (ent->filemode & FILE_SOLVED) + { + type = (type == ' ') ? 's': 'S'; + } + + // tag should override everything + if ((currmode & MODE_BOARD) || HasUserPerm(PERM_LOGINOK)) + { + if (TagNum && !Tagger(atoi(ent->filename + 2), 0, TAG_NIN)) type = 'D'; - else if (ent->filemode & FILE_SOLVED) - type = (type == ' ') ? 's': 'S'; } // the only special case: ' ' with isunread == 2, |