--- lbbs/src/article_del.c 2025/06/15 05:09:19 1.3 +++ lbbs/src/article_del.c 2025/10/17 01:25:08 1.7 @@ -16,8 +16,8 @@ #include "article_del.h" #include "database.h" -#include "log.h" #include "io.h" +#include "log.h" #include "screen.h" #include "user_priv.h" #include @@ -44,7 +44,7 @@ int article_del(const SECTION_LIST *p_se { clearscr(); moveto(1, 1); - prints("该文章无法被删除,请联系版主。"); + prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); press_any_key(); return 0; @@ -52,15 +52,17 @@ int article_del(const SECTION_LIST *p_se clearscr(); moveto(1, 1); - prints("真的要删除文章?(Y)是, (N)否 [N]: "); + prints("鐪熺殑瑕佸垹闄ゆ枃绔狅紵(Y)鏄, (N)鍚 [N]: "); iflush(); for (ch = 0; !SYS_server_exit; ch = igetch_t(MAX_DELAY_TIME)) { switch (toupper(ch)) { + case KEY_NULL: + case KEY_TIMEOUT: + goto cleanup; case CR: - igetch_reset(); case KEY_ESC: case 'N': return 0; @@ -73,6 +75,11 @@ int article_del(const SECTION_LIST *p_se break; } + if (SYS_server_exit) // Do not save data on shutdown + { + goto cleanup; + } + db = db_open(); if (db == NULL) { @@ -128,7 +135,7 @@ int article_del(const SECTION_LIST *p_se clearscr(); moveto(1, 1); - prints("该文章已被删除,请稍后刷新列表。"); + prints("璇ユ枃绔犲凡琚垹闄わ紝璇风◢鍚庡埛鏂板垪琛ㄣ"); press_any_key(); goto cleanup; @@ -138,7 +145,7 @@ int article_del(const SECTION_LIST *p_se { clearscr(); moveto(1, 1); - prints("该文章无法被删除,请联系版主。"); + prints("璇ユ枃绔犳棤娉曡鍒犻櫎锛岃鑱旂郴鐗堜富銆"); press_any_key(); goto cleanup; @@ -222,7 +229,7 @@ int article_del(const SECTION_LIST *p_se clearscr(); moveto(1, 1); - prints("删除成功,请在%d秒后刷新列表。", BBS_section_list_load_interval); + prints("鍒犻櫎鎴愬姛锛岃鍦%d绉掑悗鍒锋柊鍒楄〃銆", BBS_section_list_load_interval); press_any_key(); ret = 1; // Success