Selaa lähdekoodia

오래된 문서 추가

Surplus_Up (2DU) 6 vuotta sitten
vanhempi
sitoutus
b6651b7448
7 muutettua tiedostoa jossa 40 lisäystä ja 7 poistoa
  1. 4 0
      app.py
  2. 1 0
      language/en-US.json
  3. 2 1
      language/ko-KR.json
  4. 30 0
      route/list_old_page.py
  5. 1 5
      route/list_please.py
  6. 1 0
      route/main_other.py
  7. 1 1
      version.json

+ 4 - 0
app.py

@@ -297,6 +297,10 @@ def setting(num = 0):
 def list_not_close_topic():
     return list_not_close_topic_2(conn)
 
+@app.route('/old_page')
+def list_old_page():
+    return list_old_page_2(conn)
+
 @app.route('/acl_list')
 def list_acl():
     return list_acl_2(conn)

+ 1 - 0
language/en-US.json

@@ -179,6 +179,7 @@
         "last_edit_time" : "Last edited time",
         "admin_group" : "Admin group",
         "topic_setting" : "Topic setting(s)",
+        "old_page" : "Old decument(s)",
         "_comment_2.1_" : "Filter",
             "_comment_2.1.1_" : "List",
                 "interwiki_list" : "Interwiki(s) list",

+ 2 - 1
language/ko-KR.json

@@ -296,5 +296,6 @@
     "last_edit_time": "최근 수정 시각",
     "link": "링크",
     "icon": "아이콘",
-    "topic_setting" : "토론 설정"
+    "topic_setting" : "토론 설정",
+    "old_page" : "오래된 문서"
 }

+ 30 - 0
route/list_old_page.py

@@ -0,0 +1,30 @@
+from .tool.func import *
+
+def list_old_page_2(conn):
+    curs = conn.cursor()
+
+    num = int(number_check(flask.request.args.get('num', '1')))
+    if num * 50 > 0:
+        sql_num = num * 50 - 50
+    else:
+        sql_num = 0
+
+    div = '<ul>'
+    
+    curs.execute('' + \
+        'select title, date from history ' + \
+        "where title not like 'user:%' and title not like 'category:%' and title not like 'file:%' " + \
+        'order by id desc, date asc ' + \
+        'limit ?, "50"' + \
+    '', [str(sql_num)])
+    n_list = curs.fetchall()
+    for data in n_list:
+        div += '<li><a href="/w/' + url_pas(data[0]) + '">' + html.escape(data[0]) + '</a> (' + re.sub(' .*$', '', data[1]) + ')</li>'
+            
+    div += '</ul>' + next_fix('/old_page?num=', num, n_list)
+
+    return easy_minify(flask.render_template(skin_check(), 
+        imp = [load_lang('old_page'), wiki_set(), custom(), other2([0, 0])],
+        data = div,
+        menu = [['other', load_lang('return')]]
+    ))

+ 1 - 5
route/list_please.py

@@ -10,15 +10,11 @@ def list_please_2(conn):
         sql_num = 0
         
     div = '<ul>'
-    var = ''
     
     curs.execute("select distinct title from back where type = 'no' order by title asc limit ?, '50'", [str(sql_num)])
     data_list = curs.fetchall()
     for data in data_list:
-        if var != data[0]:
-            div += '<li><a id="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'   
-
-            var = data[0]
+        div += '<li><a id="not_thing" href="/w/' + url_pas(data[0]) + '">' + data[0] + '</a></li>'   
         
     div += '</ul>' + next_fix('/please?num=', num, data_list)
     

+ 1 - 0
route/main_other.py

@@ -22,6 +22,7 @@ def main_other_2(conn):
                 <li><a href="/block_log">''' + load_lang('recent_ban') + '''</a></li>
                 <li><a href="/user_log">''' + load_lang('member_list') + '''</a></li>
                 <li><a href="/admin_log">''' + load_lang('authority_use_list') + '''</a></li>
+                <li><a href="/old_page">''' + load_lang('old_page') + '''</a></li>
             </ul>
             <br>
             <h2>''' + load_lang('other') + '''</h2>

+ 1 - 1
version.json

@@ -1,6 +1,6 @@
 {
     "master" : {
-        "r_ver" : "v3.1.3-stable-04",
+        "r_ver" : "v3.1.4-master-06",
         "c_ver" : "400004",
         "s_ver" : "3"
     }, "stable" : {