Fix debug flag in _blog_index function

Changed the debug flag in the _blog_index function from true to false to disable debugging for the function. Also, modified the file write operation to directly write the blog_index_content to /blog/index.html instead of using a temporary file
This commit is contained in:
Stig-Ørjan Smelror 2024-02-12 22:47:27 +01:00
parent 80e1874926
commit 8a9f4eed88

8
qsgen2
View File

@ -895,7 +895,7 @@ function _blog_index() {
local debug=true local debug=true
else else
# If you want to debug this function only, set this to true # If you want to debug this function only, set this to true
local debug=true local debug=false
fi fi
# This function generates the www_root/blog/index.html file that gets its data from _blog_list_for_index() # This function generates the www_root/blog/index.html file that gets its data from _blog_list_for_index()
@ -923,10 +923,8 @@ function _blog_index() {
#_msg debug "_blog_index: Content of blog_index_content" #_msg debug "_blog_index: Content of blog_index_content"
#_msg sub "${blog_index_content}" #_msg sub "${blog_index_content}"
fi fi
echo "$blog_index_content" > /tmp/blog_index_temp.html echo "$blog_index_content" > ${www_root}/blog/index.html
_f_last_updated /tmp/blog_index_temp.html _f_last_updated ${www_root}/blog/index.html
# _f_last_updated ${www_root}/blog/index.html
cp -f /tmp/blog_index_temp.html ${www_root}/blog/index.html
fi fi