Przeglądaj źródła

버그 2가지 수정

Surplus_Up (2DU) 7 lat temu
rodzic
commit
d0e1f5bac0
7 zmienionych plików z 42 dodań i 21 usunięć
  1. 1 1
      app.py
  2. 1 1
      language/ko-KR.json
  3. 16 16
      route/admin_plus.py
  4. 1 1
      route/manager.py
  5. 1 1
      route/other.py
  6. 1 1
      route/topic_admin.py
  7. 21 0
      route/topic_block.py

+ 1 - 1
app.py

@@ -321,7 +321,7 @@ def acl_list():
 
 @app.route('/admin_plus/<name>', methods=['POST', 'GET'])
 def admin_plus(name = None):
-    return admin_plus_2(conn)
+    return admin_plus_2(conn, name)
         
 @app.route('/admin_list')
 def admin_list():

+ 1 - 1
language/ko-KR.json

@@ -208,7 +208,7 @@
             "discussion_list" : "토론 목록",
             "admin_list" : "관리자 목록",
             "member_list" : "사용자 목록",
-            "authority_use_list" : "권한 목록",
+            "authority_use_list" : "권한 사용 목록",
             "admin_group_list" : "관리자 그룹 목록",
             "all_document_list" : "모든 문서 목록",
             "watchlist" : "주시 목록",

+ 16 - 16
route/admin_plus.py

@@ -1,6 +1,6 @@
 from .tool.func import *
 
-def admin_plus_2(conn):
+def admin_plus_2(conn, name):
     curs = conn.cursor()
     
     if flask.request.method == 'POST':
@@ -62,24 +62,24 @@ def admin_plus_2(conn):
             state = ''
 
         data += '''
-                    <li><input type="checkbox" ''' + state +  ' name="ban" ' + exist_list[0] + '> ' + load_lang('ban_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="toron" ' + exist_list[2] + '> ' + load_lang('discussion_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="check" ' + exist_list[3] + '> ' + load_lang('user_check_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="acl" ' + exist_list[4] + '> ' + load_lang('document_acl_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="hidel" ' + exist_list[5] + '> ' + load_lang('history_hide_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="give" ' + exist_list[6] + '> ' + load_lang('authorization_authority') + '''</li>
-                    <li><input type="checkbox" ''' + state +  ' name="owner" ' + exist_list[7] + '> ' + load_lang('owner_authority') + '''</li>
-                </ul>
-                '''
+                <li><input type="checkbox" ''' + state +  ' name="ban" ' + exist_list[0] + '> ' + load_lang('ban_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="toron" ' + exist_list[2] + '> ' + load_lang('discussion_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="check" ' + exist_list[3] + '> ' + load_lang('user_check_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="acl" ' + exist_list[4] + '> ' + load_lang('document_acl_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="hidel" ' + exist_list[5] + '> ' + load_lang('history_hide_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="give" ' + exist_list[6] + '> ' + load_lang('authorization_authority') + '''</li>
+                <li><input type="checkbox" ''' + state +  ' name="owner" ' + exist_list[7] + '> ' + load_lang('owner_authority') + '''</li>
+            </ul>
+        '''
 
         return easy_minify(flask.render_template(skin_check(), 
             imp = [load_lang('admin_group_add'), wiki_set(), custom(), other2([0, 0])],
             data =  '''
-                    <form method="post">
-                        ''' + data + '''
-                        <hr class=\"main_hr\">
-                        <button id="save" ''' + state +  ''' type="submit">''' + load_lang('save') + '''</button>
-                    </form>
-                    ''',
+                <form method="post">
+                    ''' + data + '''
+                    <hr class=\"main_hr\">
+                    <button id="save" ''' + state +  ''' type="submit">''' + load_lang('save') + '''</button>
+                </form>
+            ''',
             menu = [['manager', load_lang('return')]]
         ))     

+ 1 - 1
route/manager.py

@@ -26,11 +26,11 @@ def manager_2(conn, num):
             data =  '''
                     <h2>''' + load_lang('admin') + '''</h2>
                     <ul>
-                        <li><a href="/manager/2">''' + load_lang('acl_document_list') + '''</a></li>
                         <li><a href="/manager/3">''' + load_lang('check_user') + '''</a></li>
                         <li><a href="/manager/4">''' + load_lang('ban') + '''</a></li>
                         <li><a href="/manager/5">''' + load_lang('authorize') + '''</a></li>
                         <li><a href="/edit_filter">''' + load_lang('edit_filter_list') + '''</a></li>
+                        <li><a href="/give_log">''' + load_lang('admin_group_list') + '''</a></li>
                     </ul>
                     <br>
                     <h2>''' + load_lang('owner') + '''</h2>

+ 1 - 1
route/other.py

@@ -14,8 +14,8 @@ def other_2(conn, r_ver):
             <br>
             <h2>''' + load_lang('list') + '''</h2>
             <ul>
+                <li><a href="/manager/2">''' + load_lang('acl_document_list') + '''</a></li>
                 <li><a href="/admin_list">''' + load_lang('admin_list') + '''</a></li>
-                <li><a href="/give_log">''' + load_lang('admin_group_list') + '''</a></li>
                 <li><a href="/not_close_topic">''' + load_lang('open_discussion_list') + '''</a></li>
                 <li><a href="/title_index">''' + load_lang('all_document_list') + '''</a></li>
                 <li><a href="/acl_list">''' + load_lang('acl_document_list') + '''</a></li>

+ 1 - 1
route/topic_admin.py

@@ -54,7 +54,7 @@ def topic_admin_2(conn, name, sub, num):
             <h2>''' + load_lang('other_tool') + '''</h2>
             <ul>
                 <li>
-                    <a href="/topic/''' + url_pas(name) + '/sub/' + url_pas(sub) + '/raw/' + str(num) + '''">raw</a>
+                    <a href="/topic/''' + url_pas(name) + '/sub/' + url_pas(sub) + '/raw/' + str(num) + '''">''' + load_lang('raw') + '''</a>
                 </li>
             '''
     ban = '<li>' + load_lang('time') + ' : ' + data[0][2] + '</li>' + ban

+ 21 - 0
route/topic_block.py

@@ -0,0 +1,21 @@
+from .tool.func import *
+
+def topic_block_2(conn, name, sub, num):
+    curs = conn.cursor()
+
+    if admin_check(3, 'blind (' + name + ' - ' + sub + '#' + str(num) + ')') != 1:
+        return re_error('/error/3')
+
+    curs.execute("select block from topic where title = ? and sub = ? and id = ?", [name, sub, str(num)])
+    block = curs.fetchall()
+    if block:
+        if block[0][0] == 'O':
+            curs.execute("update topic set block = '' where title = ? and sub = ? and id = ?", [name, sub, str(num)])
+        else:
+            curs.execute("update topic set block = 'O' where title = ? and sub = ? and id = ?", [name, sub, str(num)])
+        
+        rd_plus(name, sub, get_time())
+        
+        conn.commit()
+        
+    return redirect('/topic/' + url_pas(name) + '/sub/' + url_pas(sub) + '#' + str(num))