summaryrefslogtreecommitdiffstats
path: root/mbbsd/edit.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-30 23:40:21 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2007-12-30 23:40:21 +0800
commitbc5173a637161e4751e759779ac6d1a708ed2b5e (patch)
tree37d8f73bfdf28a1ad6d3f975fe5854236bed3438 /mbbsd/edit.c
parent411661c4660d61b365224c5263e5ae93ef04c194 (diff)
downloadpttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar.gz
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar.bz2
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar.lz
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar.xz
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.tar.zst
pttbbs-bc5173a637161e4751e759779ac6d1a708ed2b5e.zip
- modify file size limitation control
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3765 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/edit.c')
-rw-r--r--mbbsd/edit.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 315cfc65..710406c2 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -44,7 +44,7 @@
#include "bbs.h"
#define EDIT_SIZE_LIMIT (32768*1024)
-#define EDIT_LINE_LIMIT (1048576)
+#define EDIT_LINE_LIMIT (65530) // (1048576)
#if 0
#define register
@@ -1667,6 +1667,10 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle, int upload)
stand_title("檔案處理");
move(1,0);
+#ifdef EDIT_UPLOAD_ALLOWALL
+ upload = 1;
+#endif // EDIT_UPLOAD_ALLOWALL
+
// common trail
if (currstat == SMAIL)
@@ -1697,7 +1701,8 @@ write_file(char *fpath, int saveheader, int *islocal, char *mytitle, int upload)
return KEEP_EDITING;
#ifdef EXP_EDIT_UPLOAD
case 'u':
- upload_file();
+ if (upload)
+ upload_file();
return KEEP_EDITING;
#endif // EXP_EDIT_UPLOAD
case 'r':
@@ -3210,10 +3215,11 @@ vedit2(char *fpath, int saveheader, int *islocal, int flags)
}
#ifdef MAX_EDIT_LINE
- if(curr_buf->totaln == MAX_EDIT_LINE
- && !(flags & EDITFLAG_UPLOAD))
+ if(curr_buf->totaln ==
+ ((flags & EDITFLAG_ALLOWLARGE) ?
+ MAX_EDIT_LINE_LARGE : MAX_EDIT_LINE))
{
- vmsg("已超過最大行數限制。");
+ vmsg("已到達最大行數限制。");
break;
}
#endif