浏览代码

버그 수정

잉여개발기 (SPDV) 2 年之前
父节点
当前提交
b11d768d69
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 0
      route/main_setting_sitemap.py
  2. 2 4
      route/tool/func.py

+ 2 - 0
route/main_setting_sitemap.py

@@ -91,6 +91,8 @@ def main_setting_sitemap(do_type = 0):
 
             if not do_type == 1:
                 return redirect('/setting/sitemap')
+            else:
+                return ''
         else:
             return easy_minify(flask.render_template(skin_check(),
                 imp = [load_lang('sitemap_manual_create'), wiki_set(), wiki_custom(), wiki_css([0, 0])],

+ 2 - 4
route/tool/func.py

@@ -787,8 +787,6 @@ def load_domain(data_type = 'normal'):
         curs = conn.cursor()
         
         domain = ''
-        sys_host = flask.request.host
-        
         if data_type == 'full':
             curs.execute(db_change("select data from other where name = 'http_select'"))
             db_data = curs.fetchall()
@@ -797,11 +795,11 @@ def load_domain(data_type = 'normal'):
 
             curs.execute(db_change("select data from other where name = 'domain'"))
             db_data = curs.fetchall()
-            domain += db_data[0][0] if db_data and db_data[0][0] != '' else sys_host
+            domain += db_data[0][0] if db_data and db_data[0][0] != '' else flask.request.host
         else:
             curs.execute(db_change("select data from other where name = 'domain'"))
             db_data = curs.fetchall()
-            domain += db_data[0][0] if db_data and db_data[0][0] != '' else sys_host
+            domain += db_data[0][0] if db_data and db_data[0][0] != '' else flask.request.host
 
         return domain