Prechádzať zdrojové kódy

Merge pull request #1683 from openNAMU/dev

Dev
잉여개발기 (SPDV) 3 rokov pred
rodič
commit
02ca339553

+ 4 - 0
app.py

@@ -133,6 +133,10 @@ with get_db_connect() as conn:
 
                 if db_pass == 0:
                     raise
+        try:
+            curs.execute(db_change("create index history_index on history (title, ip)"))
+        except:
+            pass
 
         if setup_tool == 'update':
             update(int(ver_set_data[0][0]), set_data)

+ 15 - 0
emergency_tool.py

@@ -9,6 +9,7 @@ from route.tool.func import *
 
 while True:
     data_db_load = input('Load DB (Y) [Y, N] : ')
+    data_db_load = data_db_load.upper()
     if data_db_load in ('Y', 'N'):
         break
 
@@ -46,6 +47,8 @@ print('16. Delete 2FA password')
 print('17. Change markup')
 print('18. Change wiki access password')
 print('19. Forced update')
+print('20. Change domain')
+print('21. Change TLS')
 
 print('----')
 what_i_do = input('Select : ')
@@ -249,6 +252,18 @@ elif what_i_do == '19':
             os.system('del update.zip')
         else:
             print('Error : update failed')
+elif what_i_do == '20':
+    print('----')
+    domain = input('Domain (EX : 2du.pythonanywhere.com) : ')
+
+    curs.execute(db_change("update other set data = ? where name = 'domain'"), [domain])
+elif what_i_do == '21':
+    print('----')
+    tls_v = input('TLS (http) [http, https] : ')
+    if not tls_v in ['http', 'https']:
+        tls_v = 'http'
+
+    curs.execute(db_change("update other set data = ? where name = 'http_select'"), [tls_v])
 else:
     raise ValueError(what_i_do)
 

+ 4 - 5
route/give_acl.py

@@ -39,12 +39,11 @@ def give_acl_2(name):
             acl_data += [['view', flask.request.form.get('view', '')]]
             acl_data += [['why', flask.request.form.get('why', '')]]
 
-            curs.execute(db_change("select title from acl where title = ?"), [name])
-            if curs.fetchall():
-                for i in acl_data:
+            for i in acl_data:
+                curs.execute(db_change("select title from acl where title = ? and type = ?"), [name, i[0]])
+                if curs.fetchall():
                     curs.execute(db_change("update acl set data = ? where title = ? and type = ?"), [i[1], name, i[0]])
-            else:
-                for i in acl_data:
+                else:
                     curs.execute(db_change("insert into acl (title, data, type) values (?, ?, ?)"), [name, i[1], i[0]])
 
             all_d = ''

+ 3 - 3
route/give_user_check.py

@@ -48,7 +48,7 @@ def give_user_check_2(name):
                 if num == 1:
                     curs.execute(db_change("" + \
                         "select distinct ip from ua_d " + \
-                        "where " + ('ip' if ip_or_user(name) == 1 else 'name') + " = ? or " + ('ip' if ip_or_user(plus_id) == 1 else 'name') + " = ? "
+                        "where " + ('ip' if ip_or_user(name) == 1 else 'name') + " = ? or " + ('ip' if ip_or_user(plus_id) == 1 else 'name') + " = ?"
                     ""), [name, plus_id])
                     all_ip_count = len(curs.fetchall())
 
@@ -60,7 +60,7 @@ def give_user_check_2(name):
 
                     curs.execute(db_change("" + \
                         "select distinct ip from ua_d " + \
-                        "where " + ('ip' if ip_or_user(plus_id) == 1 else 'name') + " = ? "
+                        "where " + ('ip' if ip_or_user(plus_id) == 1 else 'name') + " = ?"
                     ""), [plus_id])
                     b_ip_count = len(curs.fetchall())
 
@@ -154,7 +154,7 @@ def give_user_check_2(name):
             ))
         else:
             curs.execute(db_change("" + \
-                "select distinct " + ('name' if ip_or_user(name) == 1 else 'ip') + " from ua_d " + \
+                "select distinct " + ('name' if ip_or_user(name) == 1 else 'ip') + ", today from ua_d " + \
                 "where " + ('ip' if ip_or_user(name) == 1 else 'name') + " = ? "
                 "order by today desc limit ?, 50" + \
             ""), [name, sql_num])

+ 2 - 10
route/list_title_index.py

@@ -30,19 +30,14 @@ def list_title_index_2():
             curs.execute(db_change('select data from other where name = "count_all_title"'))
             all_title = curs.fetchall()
             if int(all_title[0][0]) < 30000:
-                curs.execute(db_change("select count(*) from data"))
-                count = curs.fetchall()
-                if count:
-                    count_end += [count[0][0]]
-                else:
-                    count_end += [0]
+                count_end += [int(all_title[0][0])]
 
                 sql_list = ['category:', 'user:', 'file:']
                 for sql in sql_list:
                     curs.execute(db_change("select count(*) from data where title like ?"), [sql + '%'])
                     count = curs.fetchall()
                     if count:
-                        count_end += [count[0][0]]
+                        count_end += [int(count[0][0])]
                     else:
                         count_end += [0]
 
@@ -50,11 +45,9 @@ def list_title_index_2():
 
                 data += '''
                     </ul>
-                    <hr class="main_hr">
                     <ul class="opennamu_ul">
                         <li>''' + load_lang('all') + ' : ' + str(count_end[0]) + '''</li>
                     </ul>
-                    <hr class="main_hr">
                     <ul class="opennamu_ul">
                         <li>''' + load_lang('category') + ' : ' + str(count_end[1]) + '''</li>
                         <li>''' + load_lang('user_document') + ' : ' + str(count_end[2]) + '''</li>
@@ -64,7 +57,6 @@ def list_title_index_2():
             else:
                 data += '''
                     </ul>
-                    <hr class="main_hr">
                     <ul class="opennamu_ul">
                         <li>''' + load_lang('all') + ' : ' + all_title[0][0] + '''</li>
                 '''

+ 22 - 16
route/main_func_setting_acl.py

@@ -65,43 +65,49 @@ def main_func_setting_acl():
 
             return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('main_acl_setting'), wiki_set(), wiki_custom(), wiki_css([0, 0])],
-                data = '''
+                data = render_simple_set('''
                     <form method="post">
-                        <a href="/acl/TEST#exp">(''' + load_lang('reference') + ''')</a>
                         <hr class="main_hr">
+                        <a href="/acl/TEST#exp">(''' + load_lang('reference') + ''')</a>
                         
-                        <span>''' + load_lang('document_acl') + '''</span> 
-                        <hr class="main_hr">
+                        <h2>''' + load_lang('document_acl') + '''</h2>
                         <select ''' + disable + ''' name="edit">''' + acl_div[0] + '''</select>
                         <hr class="main_hr">
-                        
-                        <span>''' + load_lang('discussion_acl') + '''</span>
+
+                        <h3>''' + load_lang('document_edit_acl') + '''</h3>
+                        <select ''' + disable + ''' name="document_edit_acl">''' + acl_div[6] + '''</select>
                         <hr class="main_hr">
-                        <select ''' + disable + ''' name="discussion">''' + acl_div[1] + '''</select>
+
+                        <h3>''' + load_lang('document_move_acl') + '''</h3>
+                        <select ''' + disable + ''' name="document_move_acl">''' + acl_div[7] + '''</select>
+                        <hr class="main_hr">
+
+                        <h3>''' + load_lang('document_delete_acl') + '''</h3>
+                        <select ''' + disable + ''' name="document_delete_acl">''' + acl_div[8] + '''</select>
                         <hr class="main_hr">
                         
-                        <span>''' + load_lang('upload_acl') + '''</span>
+                        <h2>''' + load_lang('discussion_acl') + '''</h2>
+                        <select ''' + disable + ''' name="discussion">''' + acl_div[1] + '''</select>
                         <hr class="main_hr">
+                        
+                        <h2>''' + load_lang('upload_acl') + '''</h2>
                         <select ''' + disable + ''' name="upload_acl">''' + acl_div[2] + '''</select>
                         <hr class="main_hr">
                         
-                        <span>''' + load_lang('view_acl') + '''</span>
-                        <hr class="main_hr">
+                        <h2>''' + load_lang('view_acl') + '''</h2>
                         <select ''' + disable + ''' name="all_view_acl">''' + acl_div[3] + '''</select>
                         <hr class="main_hr">
                         
-                        <span>''' + load_lang('many_upload_acl') + '''</span>
-                        <hr class="main_hr">
+                        <h2>''' + load_lang('many_upload_acl') + '''</h2>
                         <select ''' + disable + ''' name="many_upload_acl">''' + acl_div[4] + '''</select>
                         <hr class="main_hr">
                         
-                        <span>''' + load_lang('vote_acl') + '''</span>
-                        <hr class="main_hr">
+                        <h2>''' + load_lang('vote_acl') + '''</h2>
                         <select ''' + disable + ''' name="vote_acl">''' + acl_div[5] + '''</select>
-                        <hr class="main_hr">
                         
+                        <hr class="main_hr">
                         <button id="opennamu_save_button" type="submit">''' + load_lang('save') + '''</button>
                     </form>
-                ''',
+                '''),
                 menu = [['setting', load_lang('return')]]
             ))

+ 33 - 11
route/tool/func.py

@@ -630,6 +630,10 @@ def update(ver_num, set_data):
             "update other set coverage = '' where coverage is null"
         ))
 
+    if ver_num < 3500358:
+        curs.execute(db_change("drop index history_index"))
+        curs.execute(db_change("create index history_index on history (title, ip)"))
+
     conn.commit()
     
     # 아이피 상태인 이메일 제거 예정
@@ -1038,6 +1042,8 @@ def skin_check(set_n = 0):
         if 'skin' in flask.session:
             user_need_skin = flask.session['skin']
 
+    user_need_skin = '' if user_need_skin == 'default' else user_need_skin
+
     if user_need_skin == '':
         curs.execute(db_change('select data from other where name = "skin"'))
         skin_exist = curs.fetchall()
@@ -1695,7 +1701,7 @@ def acl_check(name = 'test', tool = '', topic_num = '1'):
                 return 0
     
             return 1
-    elif tool == 'document_edit' or tool == 'document_move' or tool == 'document_delete':
+    elif tool in ['document_edit', 'document_move', 'document_delete']:
         if acl_check(name, '') == 1:
             return 1
     elif tool == 'topic':
@@ -1705,7 +1711,7 @@ def acl_check(name = 'test', tool = '', topic_num = '1'):
 
     if tool in ['topic']:
         end = 3
-    elif tool in ['render', 'vote', '']:
+    elif tool in ['render', 'vote', '', 'document_edit', 'document_move', 'document_delete']:
         end = 2
     else:
         end = 1
@@ -1729,21 +1735,36 @@ def acl_check(name = 'test', tool = '', topic_num = '1'):
 
             num = 5
         elif tool == 'document_move':
-            curs.execute(db_change(
-                "select data from acl where title = ? and type = 'document_move_acl'"
-            ), [name])
+            if i == 0:
+                curs.execute(db_change(
+                    "select data from acl where title = ? and type = 'document_move_acl'"
+                ), [name])
+            else:
+                curs.execute(db_change(
+                    'select data from other where name = "document_move_acl"'
+                ))
 
             num = 5
         elif tool == 'document_edit':
-            curs.execute(db_change(
-                "select data from acl where title = ? and type = 'document_edit_acl'"
-            ), [name])
+            if i == 0:
+                curs.execute(db_change(
+                    "select data from acl where title = ? and type = 'document_edit_acl'"
+                ), [name])
+            else:
+                curs.execute(db_change(
+                    'select data from other where name = "document_edit_acl"'
+                ))
 
             num = 5
         elif tool == 'document_delete':
-            curs.execute(db_change(
-                "select data from acl where title = ? and type = 'document_delete_acl'"
-            ), [name])
+            if i == 0:
+                curs.execute(db_change(
+                    "select data from acl where title = ? and type = 'document_delete_acl'"
+                ), [name])
+            else:
+                curs.execute(db_change(
+                    'select data from other where name = "document_delete_acl"'
+                ))
 
             num = 5
         elif tool == 'topic':
@@ -2303,6 +2324,7 @@ def ban_insert(name, end, why, login, blocker, type_d = None):
 
 def history_plus(title, data, date, ip, send, leng, t_check = '', mode = ''):
     curs = conn.cursor()
+    # 여기 좀 느린 듯
     
     curs.execute(db_change('select data from other where name = "history_recording_off"'))
     db_data = curs.fetchall()

+ 59 - 58
route/tool/func_render_namumark.py

@@ -1065,76 +1065,78 @@ class class_do_render_namumark:
             elif not match:
                 break
             else:
-                match_org = match.group(0)
-                match = match.groups()
+                if self.doc_include != '':
+                    self.render_data = re.sub(include_regex, '', self.render_data, 1)
+                else:
+                    match_org = match.group(0)
+                    match = match.groups()
 
-                macro_split_regex = r'(?:^|,) *([^,]+)'
-                macro_split_sub_regex = r'^([^=]+) *= *(.*)$'
+                    macro_split_regex = r'(?:^|,) *([^,]+)'
+                    macro_split_sub_regex = r'^([^=]+) *= *(.*)$'
 
-                include_name = ''
+                    include_name = ''
 
-                data = re.findall(macro_split_regex, match[0])
-                for for_a in data:
-                    data_sub = re.search(macro_split_sub_regex, for_a)
-                    if data_sub:
-                        data_sub = data_sub.groups()
-                        
-                        data_sub_name = data_sub[0]
-                        data_sub_data = self.get_tool_data_restore(data_sub[1], do_type = 'slash')
-                        
-                        data_sub_data = re.sub(r'^분류:', ':분류:', data_sub_data)
-                        data_sub_data = re.sub(r'^파일:', ':파일:', data_sub_data)
-
-                        include_change_list[data_sub_name] = data_sub_data
-                    else:
-                        include_name = for_a
+                    data = re.findall(macro_split_regex, match[0])
+                    for for_a in data:
+                        data_sub = re.search(macro_split_sub_regex, for_a)
+                        if data_sub:
+                            data_sub = data_sub.groups()
+                            
+                            data_sub_name = data_sub[0]
+                            data_sub_data = self.get_tool_data_restore(data_sub[1], do_type = 'slash')
+                            
+                            data_sub_data = re.sub(r'^분류:', ':분류:', data_sub_data)
+                            data_sub_data = re.sub(r'^파일:', ':파일:', data_sub_data)
 
-                include_name_org = include_name
-                
-                include_name = self.get_tool_data_restore(include_name, do_type = 'slash')
-                include_name = html.unescape(include_name)
+                            include_change_list[data_sub_name] = data_sub_data
+                        else:
+                            include_name = for_a
 
-                # load include db data
-                self.curs.execute(db_change("select data from data where title = ?"), [include_name])
-                db_data = self.curs.fetchall()
-                if db_data:
-                    self.data_backlink += [[self.doc_name, include_name, 'include']]
-                    include_data = db_data[0][0].replace('\r', '')
+                    include_name_org = include_name
+                    
+                    include_name = self.get_tool_data_restore(include_name, do_type = 'slash')
+                    include_name = html.unescape(include_name)
 
-                    # include link func
-                    if ip_or_user(self.ip) == 0:
-                        self.curs.execute(db_change('select data from user_set where name = "main_css_include_link" and id = ?'), [self.ip])
-                        db_data = self.curs.fetchall()
-                        include_set_data = db_data[0][0] if db_data else 'normal'
-                    else:
-                        include_set_data = flask.session['main_css_include_link'] if 'main_css_include_link' in flask.session else 'normal'
+                    # load include db data
+                    self.curs.execute(db_change("select data from data where title = ?"), [include_name])
+                    db_data = self.curs.fetchall()
+                    if db_data:
+                        self.data_backlink += [[self.doc_name, include_name, 'include']]
+                        include_data = db_data[0][0].replace('\r', '')
+
+                        # include link func
+                        if ip_or_user(self.ip) == 0:
+                            self.curs.execute(db_change('select data from user_set where name = "main_css_include_link" and id = ?'), [self.ip])
+                            db_data = self.curs.fetchall()
+                            include_set_data = db_data[0][0] if db_data else 'normal'
+                        else:
+                            include_set_data = flask.session['main_css_include_link'] if 'main_css_include_link' in flask.session else 'normal'
 
-                    include_link = ''
-                    if include_set_data == 'use':
-                        include_link = '<div><a href="/w/' + url_pas(include_name) + '">(' + include_name_org + ')</a></div>'
+                        include_link = ''
+                        if include_set_data == 'use':
+                            include_link = '<div><a href="/w/' + url_pas(include_name) + '">(' + include_name_org + ')</a></div>'
 
-                    # parameter replace
-                    include_data = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z]+)=((?:\\@|[^@\n])+)@', do_render_include_default_sub, include_data)
-                    include_data = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z]+)@', do_render_include_default_sub, include_data)
+                        # parameter replace
+                        include_data = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z]+)=((?:\\@|[^@\n])+)@', do_render_include_default_sub, include_data)
+                        include_data = re.sub(r'(\\+)?@([ㄱ-힣a-zA-Z]+)@', do_render_include_default_sub, include_data)
 
-                    # remove include
-                    include_data = re.sub(include_regex, '', include_data)
-                    include_data = re.sub('^\n+', '', include_data)
+                        # remove end br
+                        include_data = re.sub('^\n+', '', include_data)
 
-                    self.data_include += [[self.doc_include + 'opennamu_include_' + str(include_num), include_name, include_data, 'style="display: inline;"']]
+                        self.data_include += [[self.doc_include + 'opennamu_include_' + str(include_num), include_name, include_data, 'style="display: inline;"']]
 
-                    data_name = self.get_tool_data_storage('' + \
-                        include_link + \
-                        '<div id="' + self.doc_include + 'opennamu_include_' + str(include_num) + '"></div>' + \
-                    '', '', match_org)
-                else:
-                    self.data_backlink += [[self.doc_name, include_name, 'no']]
+                        data_name = self.get_tool_data_storage('' + \
+                            include_link + \
+                            '<div id="' + self.doc_include + 'opennamu_include_' + str(include_num) + '"></div>' + \
+                        '', '', match_org)
+                    else:
+                        self.data_backlink += [[self.doc_name, include_name, 'no']]
 
-                    include_link = '<div><a class="opennamu_not_exist_link" href="/w/' + url_pas(include_name) + '">(' + include_name_org + ')</a></div>'
+                        include_link = '<div><a class="opennamu_not_exist_link" href="/w/' + url_pas(include_name) + '">(' + include_name_org + ')</a></div>'
 
-                    data_name = self.get_tool_data_storage(include_link, '', match_org)
+                        data_name = self.get_tool_data_storage(include_link, '', match_org)
 
-                self.render_data = re.sub(include_regex, '<' + data_name + '></' + data_name + '>', self.render_data, 1)
+                    self.render_data = re.sub(include_regex, '<' + data_name + '></' + data_name + '>', self.render_data, 1)
 
             include_count_max -= 1
 
@@ -1887,8 +1889,8 @@ class class_do_render_namumark:
         self.do_render_slash()
         self.do_render_redirect()
         if self.data_redirect == 0:
-            self.do_render_include()
             self.do_render_middle()
+            self.do_render_include()
             self.do_render_math()
             self.do_render_table()
             self.do_render_list()
@@ -1902,7 +1904,6 @@ class class_do_render_namumark:
         self.do_render_last()
 
         # print(self.data_temp_storage)
-        # print(self.render_data)
 
         return [
             self.render_data, # html

+ 6 - 6
route/topic_tool_setting.py

@@ -91,26 +91,26 @@ def topic_tool_setting(topic_num = 1):
 
             return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('topic_setting'), wiki_set(), wiki_custom(), wiki_css([0, 0])],
-                data = '''
+                data = render_simple_set('''
                     <form method="post">
-                        <h2>1. ''' + load_lang('topic_progress') + '''</h2>
+                        <h2>''' + load_lang('topic_progress') + '''</h2>
                         <select name="stop_d">
                             ''' + stop_d_list + '''
                         </select>
                         <hr class="main_hr">
                         <input type="checkbox" name="agree" value="O" ''' + agree_check + '''> ''' + load_lang('topic_change_agree') + '''
 
-                        <h2>2. ''' + load_lang('topic_associate') + '''</h2>
+                        <h2>''' + load_lang('topic_associate') + '''</h2>
                         ''' + load_lang('topic_link_vote') + ''' (''' + load_lang('not_working') + ''')
                         <hr class="main_hr">
                         <input placeholder="''' + load_lang('topic_insert_vote_number') + '''" name="vote_number" type="number">
 
-                        <h2>3. ''' + load_lang('why') + '''</h2>
+                        <h2>''' + load_lang('why') + '''</h2>
                         <input placeholder="''' + load_lang('why') + ''' (''' + load_lang('markup_enabled') + ''')" name="why" type="text">
+                        
                         <hr class="main_hr">
-
                         <button type="submit">''' + load_lang('save') + '''</button>
                     </form>
-                ''',
+                '''),
                 menu = [['thread/' + topic_num + '/tool', load_lang('return')]]
             ))

+ 1 - 1
route/view_diff.py

@@ -51,7 +51,7 @@ def view_diff(name = 'Test', num_a = 1, num_b = 1):
                 result = '<pre>' + end_data + '</pre>'
 
             return easy_minify(flask.render_template(skin_check(),
-                imp = [name, wiki_set(), wiki_custom(), wiki_css(['(' + load_lang('compare') + ')', 0])],
+                imp = [name, wiki_set(), wiki_custom(), wiki_css(['(' + load_lang('compare') + ') (r' + first + ') (r' + second + ')', 0])],
                 data = result,
                 menu = [['history/' + url_pas(name), load_lang('return')]]
             ))

+ 1 - 1
route/view_xref.py

@@ -25,7 +25,7 @@ def view_xref(name = 'Test', xref_type = 1):
         curs.execute(db_change("" + \
             "select distinct " + sql_insert[0] + ", type from back " + \
             "where " + sql_insert[1] + " = ? and not type = 'no' and not type = 'nothing'" + \
-            "order by type asc, title asc limit ?, 50" + \
+            "order by type asc, " + sql_insert[0] + " asc limit ?, 50" + \
         ""), [
             name,
             sql_num

+ 106 - 0
test_tool.py

@@ -0,0 +1,106 @@
+# Load
+import time
+import os
+import platform
+import urllib
+import zipfile
+
+from route.tool.func import *
+
+data_db_set = class_check_json()
+
+db_data_get(data_db_set['type'])
+do_db_set(data_db_set)
+
+load_db = get_db_connect()
+
+conn = load_db.__enter__()
+curs = conn.cursor()
+
+print('----')
+print('1. Add virtual doc')
+
+print('----')
+what_i_do = input('Select : ')
+
+if what_i_do == '1':
+    print('----')
+    doc_count = int(input('Count : '))
+    
+    for for_a in range(doc_count):
+        name = 'test_' + str(for_a)
+        content = '''[include(틀:주요 문서)]
+[include(틀:위키 엔진)]
+
+||||<tablealign=right><tablebordercolor=#008679><#008679> {{{#white {{{+2 오픈나무
+''\'openNAMU\'''}}}}}} ||
+|||| [[파일:오픈나무 로고.png|width=200px]] ||
+||<colbgcolor=#008679><colcolor=white> 현재 상태 || ~~계속~~ 개발 중 ||
+|||| 최신 빌드 ||
+|| stable || v3.4.5 (stable1) (beta3) (dev14) ||
+|| beta || v3.4.6-RC1 (stable1) (beta8-107) ||
+|| dev || v3.4.6-RC1 (stable1) (beta8-107)[* 거의 매일 바뀜] ||
+|||| 역사 ||
+|| nodeJS || 2016-04-23 ||
+|| Python || 2017-01-06 ||
+|| 링크 || [[https://github.com/openNAMU/openNAMU|깃허브]]
+[[https://github.com/openNAMU|스킨, 서브 자료들]] ||
+[목차]
+[clearfix]
+== 개요 ==
+[[나무마크]]를 ~~대충~~ 지원하는 [[파이썬]] 위키 엔진임다.
+
+== 왜 오픈나무임? ==
+[[basix|원래 개발자]]가 [[더 시드]] 같은 엔진을 만들겠다라는 명목하에 open[[나무위키|NAMU]]라고 지었습니다. 
+
+== 왜 만듬? ==
+과거에는 저도 [[대한위키실록|위키]]를 열어봤던 사람으로써 [[도쿠위키]]와 [[모니위키]], [[미디어위키]]를 쓰다 불편한 점을 개선하기 위해서 새로 만들었슴다.
+
+[[미디어위키]]는 정말 좋은 엔진이지만 아무래도 한국적 특성에 뭔가 안 맞는 것 같아서 이걸 만들었슴다.
+
+참고로 쓰다보면 이런 게 왜 있지? 싶은 요소가 있는데[* 예를 들면 틀 링크] 그건 그냥 제가 쓰려고 만들었슴다.
+
+=== 영향을 많이 받은 위키 관련 요소 ===
+[include(틀:오픈나무 개발 이유)]
+
+== 역사 ==
+ * [[/역사]]
+  * [[/v3.4.6]]
+== 개발 이념 ==
+ * [[/개발 이념]]
+== 주의 ==
+ * 프로덕션 용으로는 사용 안하는 걸 권장 드립니다. ~~[[시한폭탄|언제 터질 지 모릅니다]]~~
+== 사용하는 위키 ==
+ * [[/사용 위키]]
+
+== 나머지 개발자의 헛소리 적는 공간 ==
+ * [[/연구]]
+ * [[/차기 계획]]
+ * [[/개발 현황]]
+ * [[/반성]]
+
+[[분류:오픈나무]]'''
+        today = get_time()
+        send = 'test'
+        ip = '127.0.0.1'
+        leng = '0'
+
+        curs.execute(db_change("insert into data (title, data) values (?, ?)"), [name, content])
+        print(for_a)
+
+        test_case = [[
+            for_b,
+            name,
+            content,
+            today,
+            ip,
+            send,
+            leng,
+            ''
+        ] for for_b in range(1, 151)]
+        curs.executemany(db_change(
+            "insert into history (id, title, data, date, ip, send, leng, hide, type) " + \
+            "values (?, ?, ?, ?, ?, ?, ?, '', ?)"
+        ), test_case)
+
+    conn.commit()

+ 2 - 2
version.json

@@ -1,7 +1,7 @@
 {
     "beta" : {
-        "r_ver" : "v3.4.6-RC2-dev124",
-        "c_ver" : "3500355",
+        "r_ver" : "v3.4.6-RC2-dev131",
+        "c_ver" : "3500358",
         "s_ver" : "3500111"
     }
 }

+ 4 - 0
views/tenshi/css/dark.css

@@ -46,4 +46,8 @@ html, #main {
 
 button#opennamu_save_button {
     background: #083808;
+}
+
+#nav_bar {
+    background: #2f0000;
 }

+ 1 - 1
views/tenshi/index.html

@@ -10,7 +10,7 @@
         {{imp[3][3]|safe}}
         <link rel="stylesheet" href="/views/tenshi/css/main.css?ver=20">
         {% if request.cookies.get('main_css_darkmode', '') == '1' %}
-            <link rel="stylesheet" href="/views/tenshi/css/dark.css?ver=8">
+            <link rel="stylesheet" href="/views/tenshi/css/dark.css?ver=9">
         {% endif %}
         <script src="/views/tenshi/js/skin_set.js?ver=9"></script>
         <script src="/views/tenshi/js/main.js?ver=3"></script>

+ 1 - 1
views/tenshi/info.json

@@ -1,5 +1,5 @@
 {
     "name" : "Tenshi",
-    "skin_ver" : "v2.0.2",
+    "skin_ver" : "v2.0.3",
     "require_ver" : "3500110"
 }

+ 2 - 0
views/tenshi/js/skin_set.js

@@ -14,6 +14,8 @@ function get_post() {
 }
 
 function skin_set() {
+    let cookies = document.cookie;
+
     if(window.location.pathname === '/skin_set') {
         var set_language = {
             "en-US" : {