diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-11-01 01:53:21 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2010-11-01 01:53:21 +0800 |
commit | 45981c663c7a8ef3a50176cebf23bcc55102b007 (patch) | |
tree | d81bac4d1d4526e9451800dd695a8b840a8bde6e | |
parent | 2b0974ef9cf4e6f0ce46a4ccd6c8e17a1225011b (diff) | |
download | pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar.gz pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar.bz2 pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar.lz pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar.xz pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.tar.zst pttbbs-45981c663c7a8ef3a50176cebf23bcc55102b007.zip |
change recycle bin limit and add todos
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5195 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/mbbsd/bbs.c | 12 | ||||
-rw-r--r-- | pttbbs/mbbsd/psb.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index dddb7e34..96ae7a7c 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -835,12 +835,14 @@ cancelpost2(const fileheader_t *fh, char *newpath, size_t sznewpath) { if(!fh->filename[0]) return -1; - setbfile(fpath, currboard, fh->filename); - // if (!dashf(fpath)) return -1; - log_filef(fpath, LOG_CREAT, "\n※ Deleted by: %s (%s) %s", - cuser.userid, fromhost, Cdatelite(&now)); - + // TODO touch modify time to now? save the name who deleted it? if (strncmp(fh->owner, RECYCLE_BIN_OWNER, strlen(RECYCLE_BIN_OWNER)) != 0) { + + setbfile(fpath, currboard, fh->filename); + // if (!dashf(fpath)) return -1; + log_filef(fpath, LOG_CREAT, "\n※ Deleted by: %s (%s) %s", + cuser.userid, fromhost, Cdatelite(&now)); + if (!timecapsule_archive_new_revision( fpath, fh, sizeof(*fh), newpath, sznewpath)) ret = -1; diff --git a/pttbbs/mbbsd/psb.c b/pttbbs/mbbsd/psb.c index e948f18d..df96641a 100644 --- a/pttbbs/mbbsd/psb.c +++ b/pttbbs/mbbsd/psb.c @@ -372,7 +372,8 @@ psb_view_edit_history(const char *base, const char *subject, /////////////////////////////////////////////////////////////////////////// // Time Capsule: Recycle Bin -#define PVRB_LIMIT_NUMBER (1000) +#define PVRB_LIMIT_NUMBER (10000) +// #define PVRB_LIMIT_NUMBER (103000) typedef struct { const char *dirbase; @@ -407,13 +408,14 @@ pvrb_renderer(int i, int curr, int total, int rows, void *ctx) { pvrb_ctx *cx = (pvrb_ctx*) ctx; fileheader_t *fh = &cx->records[total - i - 1]; + // TODO make this load-on-demand // quick display, but lack of recommend counter... outs(" "); if (i == curr) // prints(ANSI_COLOR(1;40;3%d), i%8); outs(ANSI_COLOR(1;40;31)); prints("%06d %-5.5s %-12.12s %s" ANSI_RESET "\n", - i+1, fh->date, fh->owner, fh->title); + total - i, fh->date, fh->owner, fh->title); return 0; } @@ -426,7 +428,7 @@ pvrb_input_processor(int key, int curr, int total, int rows, void *ctx) { const char *err_no_rev = "抱歉,本文歷史資料已被系統清除。"; switch (key) { - // TODO add 'x' to pull this mail back to mailbox + // TODO add '/' for search case 'x': setdirpath(fname, cx->dirbase, fh->filename); maxrev = timecapsule_get_max_revision_number(fname); |