잉여개발기 (SPDV) před 2 roky
rodič
revize
b11d768d69
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  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