Răsfoiți Sursa

Merge pull request #688 from 2du/master

버그 수정
잉여개발기 (SPDV) 6 ani în urmă
părinte
comite
c20db87e82
6 a modificat fișierele cu 23 adăugiri și 21 ștergeri
  1. 3 2
      language/en-US.json
  2. 2 1
      language/ko-KR.json
  3. 13 13
      route/setting.py
  4. 2 2
      route/tool/set_mark/namu.py
  5. 1 1
      route/user_info.py
  6. 2 2
      version.json

+ 3 - 2
language/en-US.json

@@ -163,6 +163,7 @@
         "password_change" : "Password change",
         "email_change" : "Email change",
         "acl_change" : "Change document ACL",
+        "user_tool" : "User tool",
         "_comment_2.1_" : "Filter",
             "_comment_2.1.1_" : "List",
                 "interwiki_list" : "Interwiki(s) list",
@@ -210,7 +211,7 @@
                 "register_text" : "Terms of sign-up",
                 "non_login_alert" : "Non-login alert",
                 "edit_bottom_text" : "Editing textarea bottom notice",
-                "Check authentication key" : "Check authentication key notice",
+                "check_key_text" : "Check authentication key notice",
                 "email_title" : "Email subject",
                 "email_text" : "Email content",
                 "email_insert_text" : "Email input box text",
@@ -272,7 +273,7 @@
             "admin_acl" : "Admin only",
             "member_acl" : "Member only",
             "50_edit_acl" : "Only members with 50 or more all document edits",
-            "all_acl" : "All Users",
+            "all_acl" : "All users",
             "email_acl" : "Only users with email",
     "_comment_3_" : "Long",
         "ie_no_data_required" : "Operation cannot continue because all required data has not been collected.",

+ 2 - 1
language/ko-KR.json

@@ -286,5 +286,6 @@
     "topic_long_error" : "토론 이름이 256자를 넘지 않아야 합니다.",
     "email_error" : "이런 이메일을 가진 사용자가 없습니다.",
     "regex_error" : "정규표현식에 오류가 있습니다.",
-    "decument_404_error" : "이 문서는 존재하지 않습니다."
+    "decument_404_error" : "이 문서는 존재하지 않습니다.",
+    "user_tool" : "사용자 도구",
 }

+ 13 - 13
route/setting.py

@@ -70,11 +70,11 @@ def setting_2(conn, num):
         }
         
         if flask.request.method == 'POST':
-            i = 0
-            
-            for data in i_list:
-                curs.execute("update other set data = ? where name = ?", [flask.request.form.get(data, n_list[i]), data])
-                i += 1
+            for i in i_list:
+                curs.execute("update other set data = ? where name = ?", [
+                    flask.request.form.get(i_list[i], n_list[i]), 
+                    i_list[i]]
+                )
 
             conn.commit()
 
@@ -84,24 +84,24 @@ def setting_2(conn, num):
         else:
             d_list = []
             
-            x = 0
-            
             for i in i_list:
-                curs.execute('select data from other where name = ?', [i])
+                curs.execute('select data from other where name = ?', [i_list[i]])
                 sql_d = curs.fetchall()
                 if sql_d:
                     d_list += [sql_d[0][0]]
                 else:
-                    curs.execute('insert into other (name, data) values (?, ?)', [i, n_list[x]])
+                    curs.execute('insert into other (name, data) values (?, ?)', [i_list[i], n_list[i]])
                     
-                    d_list += [n_list[x]]
-
-                x += 1
+                    d_list += [n_list[i]]
 
             conn.commit()
             
             div = ''
-            acl_list = [[load_lang('member'), 'login'], [load_lang('ip'), 'normal'], [load_lang('admin'), 'admin']]
+            acl_list = [
+                [load_lang('member'), 'login'], 
+                [load_lang('ip'), 'normal'], 
+                [load_lang('admin'), 'admin']
+            ]
             for i in acl_list:
                 if i[1] == d_list[6]:
                     div = '<option value="' + i[1] + '">' + i[0] + '</option>' + div

+ 2 - 2
route/tool/set_mark/namu.py

@@ -438,7 +438,7 @@ def namu(conn, data, title, main_num):
 
                 include_parser = re.sub('\[\[(?:category|분류):(((?!\]\]|#include).)+)\]\]', '', include_parser)
 
-                data = include_re.sub('<include>\n<a id="include_link" href="/w/' + tool.url_pas(include_link) + '">[' + include_link + ']</a>\n' + include_parser + '\n</include>', data, 1)
+                data = include_re.sub('<include><a id="include_link" href="/w/' + tool.url_pas(include_link) + '">\n[' + include_link + ']</a>\n' + include_parser + '\n</include>', data, 1)
             else:
                 data = include_re.sub('<a id="not_thing" href="/w/' + tool.url_pas(include_link) + '">' + include_link + '</a>', data, 1)
         else:
@@ -1032,7 +1032,7 @@ def namu(conn, data, title, main_num):
             i += 1
     
     data = re.sub('<\/td_end>', '</td>', data)
-    data = re.sub('<include>\n', '', data)
+    data = re.sub('<include>(?P<in><a (?:[^>]+)>)\n', '\g<in>', data)
     data = re.sub('\n<\/include>', '', data)
     
     data = re.sub('(?P<in><\/h[0-9]>)(\n)+', '\g<in>', data)

+ 1 - 1
route/user_info.py

@@ -69,7 +69,7 @@ def user_info_2(conn):
             plus += '<li><a href="/pass_find">' + load_lang('password_search') + '</a></li>'
 
     return easy_minify(flask.render_template(skin_check(), 
-        imp = [load_lang('user') + ' ' + load_lang('tool'), wiki_set(), custom(), other2([0, 0])],
+        imp = [load_lang('user_tool'), wiki_set(), custom(), other2([0, 0])],
         data = '''
             <h2>''' + load_lang('state') + '''</h2>
             <ul>

+ 2 - 2
version.json

@@ -1,10 +1,10 @@
 {
     "master" : {
-        "r_ver" : "v3.1.1-stable-02",
+        "r_ver" : "v3.1.1-stable-03",
         "c_ver" : "400001",
         "s_ver" : "2"
     }, "stable" : {
-        "r_ver" : "v3.1.0-stable-05",
+        "r_ver" : "v3.1.1-stable-03",
         "c_ver" : "400001",
         "s_ver" : "2"
     }