|
|
@@ -7,7 +7,6 @@ def topic_tool_change(topic_num = 1):
|
|
|
if admin_check(conn, None) != 1:
|
|
|
return re_error(conn, '/error/3')
|
|
|
|
|
|
- ip = ip_check()
|
|
|
time = get_time()
|
|
|
topic_num = str(topic_num)
|
|
|
|
|
|
@@ -19,27 +18,13 @@ def topic_tool_change(topic_num = 1):
|
|
|
if flask.request.method == 'POST':
|
|
|
admin_check(conn, None, 'move_topic (code ' + topic_num + ')')
|
|
|
|
|
|
- curs.execute(db_change("select id from topic where code = ? order by id + 0 desc limit 1"), [topic_num])
|
|
|
- topic_check = curs.fetchall()
|
|
|
- if topic_check:
|
|
|
- title_d = flask.request.form.get('title', 'test')
|
|
|
- sub_d = flask.request.form.get('sub', 'test')
|
|
|
-
|
|
|
- curs.execute(db_change("update rd set title = ?, sub = ? where code = ?"), [
|
|
|
- title_d,
|
|
|
- sub_d,
|
|
|
- topic_num
|
|
|
- ])
|
|
|
-
|
|
|
- do_add_thread(conn,
|
|
|
- topic_num,
|
|
|
- get_lang(conn, 'topic_name_change') + ' : ' + sub_d + ' (' + title_d + ')',
|
|
|
- '1'
|
|
|
- )
|
|
|
- do_reload_recent_thread(conn,
|
|
|
- topic_num,
|
|
|
- time
|
|
|
- )
|
|
|
+ title_d = flask.request.form.get('title', 'test')
|
|
|
+ sub_d = flask.request.form.get('sub', 'test')
|
|
|
+
|
|
|
+ curs.execute(db_change("update rd set title = ?, sub = ? where code = ?"), [title_d, sub_d, topic_num])
|
|
|
+
|
|
|
+ do_add_thread(conn, topic_num, get_lang(conn, 'topic_name_change') + ' : ' + rd_d[0][1] + ' (' + rd_d[0][0] + ') → ' + sub_d + ' (' + title_d + ')', '1')
|
|
|
+ do_reload_recent_thread(conn, topic_num, time)
|
|
|
|
|
|
return redirect(conn, '/thread/' + topic_num)
|
|
|
else:
|
|
|
@@ -49,11 +34,11 @@ def topic_tool_change(topic_num = 1):
|
|
|
<form method="post">
|
|
|
''' + get_lang(conn, 'document_name') + '''
|
|
|
<hr class="main_hr">
|
|
|
- <input value="''' + rd_d[0][0] + '''" name="title" type="text">
|
|
|
+ <input value="''' + html.escape(rd_d[0][0]) + '''" name="title" type="text">
|
|
|
<hr class="main_hr">
|
|
|
''' + get_lang(conn, 'discussion_name') + '''
|
|
|
<hr class="main_hr">
|
|
|
- <input value="''' + rd_d[0][1] + '''" name="sub" type="text">
|
|
|
+ <input value="''' + html.escape(rd_d[0][1]) + '''" name="sub" type="text">
|
|
|
<hr class="main_hr">
|
|
|
<button type="submit">''' + get_lang(conn, 'save') + '''</button>
|
|
|
</form>
|