Sfoglia il codice sorgente

회원가입 공백 지원 제거, 업로드 문구 설정

잉여개발기 (SPDV) 5 anni fa
parent
commit
d2d2dc7c51
6 ha cambiato i file con 23 aggiunte e 18 eliminazioni
  1. 1 1
      language/en-US.json
  2. 1 1
      language/ko-KR.json
  3. 13 13
      route/func_upload.py
  4. 1 1
      route/login_register.py
  5. 6 1
      route/setting.py
  6. 1 1
      version.json

+ 1 - 1
language/en-US.json

@@ -395,7 +395,7 @@
             "skin_error" : "This skin is not support settings.",
             "same_id_exist_error" : "There are users with the same username.",
             "long_id_error" : "Username must be shorter than 20 characters.",
-            "id_char_error" : "Only Korean letters, alphabets and spaces are allowed for Username.",
+            "id_char_error" : "Only Korean letters, alphabets are allowed for Username.",
             "file_exist_error" : "The file does not exist.",
             "password_error" : "The password is different.",
             "recaptcha_error" : "Go through the reCAPTCHA.",

+ 1 - 1
language/ko-KR.json

@@ -241,7 +241,7 @@
     "file_name": "파일명",
     "close_discussion": "닫힌 토론",
     "language": "언어",
-    "id_char_error": "오직 한글과 알파벳, 공백만 사용 가능합니다.",
+    "id_char_error": "오직 한글과 알파벳만 사용 가능합니다.",
     "id_filter_add": "ID 필터 추가",
     "skin": "스킨",
     "user_head": "사용자 <HEAD>",

+ 13 - 13
route/func_upload.py

@@ -116,35 +116,35 @@ def func_upload_2(conn, app_var):
 
         return redirect('/w/file:' + name)
     else:
-        license_list = '''
-            <option value="direct_input">''' + load_lang('direct_input') + '''</option>
-        '''
+        license_list = '<option value="direct_input">' + load_lang('direct_input') + '</option>'
 
         curs.execute(db_change("select html from html_filter where kind = 'image_license'"))
         db_data = curs.fetchall()
-        for i in db_data:
-            license_list += '''
-                <option value="''' + i[0] + '''">''' + i[0] + '''</option>
-            '''
+        license_list += ''.join(['<option value="' + i[0] + '">' + i[0] + '</option>' for i in db_data])
+
+        curs.execute(db_change("select data from other where name = 'upload_help'"))
+        db_data = curs.fetchall()
+        upload_help = ('<hr class="main_hr">' + db_data[0][0]) if db_data and db_data[0][0] != '' else ''
 
         return easy_minify(flask.render_template(skin_check(),
             imp = [load_lang('upload'), wiki_set(), custom(), other2([0, 0])],
             data = '''
                 <a href="/file_filter">(''' + load_lang('file_filter_list') + ''')</a>
-                <hr class=\"main_hr\">
+                ''' + upload_help + '''
+                <hr class="main_hr">
                 ''' + load_lang('max_file_size') + ''' : ''' + wiki_set(3) + '''MB
-                <hr class=\"main_hr\">
+                <hr class="main_hr">
                 <form method="post" enctype="multipart/form-data" accept-charset="utf8">
                     <input multiple="multiple" type="file" name="f_data[]">
-                    <hr class=\"main_hr\">
+                    <hr class="main_hr">
                     <input placeholder="''' + load_lang('file_name') + '''" name="f_name" value="''' + flask.request.args.get('name', '') + '''">
-                    <hr class=\"main_hr\">
+                    <hr class="main_hr">
                     <select name="f_lice_sel">
                         ''' + license_list + '''
                     </select>
-                    <hr class=\"main_hr\">
+                    <hr class="main_hr">
                     <textarea rows="10" placeholder="''' + load_lang('other') + '''" name="f_lice"></textarea>
-                    <hr class=\"main_hr\">
+                    <hr class="main_hr">
                     ''' + captcha_get() + '''
                     <button id="save" type="submit">''' + load_lang('save') + '''</button>
                 </form>

+ 1 - 1
route/login_register.py

@@ -29,7 +29,7 @@ def login_register_2(conn):
         if flask.request.form.get('pw', None) != flask.request.form.get('pw2', None):
             return re_error('/error/20')
 
-        if re.search(r'(?:[^A-Za-zㄱ-힣0-9 ])', flask.request.form.get('id', None)):
+        if re.search(r'(?:[^A-Za-zㄱ-힣0-9])', flask.request.form.get('id', None)):
             return re_error('/error/8')
 
         curs.execute(db_change('select html from html_filter where kind = "name"'))

+ 6 - 1
route/setting.py

@@ -227,7 +227,8 @@ def setting_2(conn, num, db_set):
             'error_401',
             'error_404',
             'approval_question',
-            'edit_help'
+            'edit_help',
+            'upload_help'
         ]
         if flask.request.method == 'POST':
             for i in i_list:
@@ -316,6 +317,10 @@ def setting_2(conn, num, db_set):
                         <hr class="main_hr">
                         <textarea rows="3" name="''' + i_list[13] + '''">''' + html.escape(d_list[13]) + '''</textarea>
                         <hr class="main_hr">
+                        <span>''' + load_lang('upload_help') + '''</span>
+                        <hr class="main_hr">
+                        <textarea rows="3" name="''' + i_list[14] + '''">''' + html.escape(d_list[14]) + '''</textarea>
+                        <hr class="main_hr">
                         <button id="save" type="submit">''' + load_lang('save') + '''</button>
                         <hr class="main_hr">
                         <ul>

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "beta" : {
-        "r_ver" : "v3.2.0-beta-29 (v3.2.0-dev-2020-08-27-02)",
+        "r_ver" : "v3.2.0-beta-30 (v3.2.0-dev-2020-08-28-01)",
         "c_ver" : "3202600",
         "s_ver" : "9"
     }