minor bug fix.

This commit is contained in:
2025-03-29 23:17:42 -06:00
parent ff7e799b7f
commit 86823cbd3e
+3 -3
View File
@@ -50,7 +50,7 @@ function article_page_from_markdown($article_id)
$query = 'SELECT user_id, username, profile_picture FROM user WHERE user_id = ' . $article['author_id'] . ';'; $query = 'SELECT user_id, username, profile_picture FROM user WHERE user_id = ' . $article['author_id'] . ';';
$author = query_one_result($query); $author = query_one_result($query);
$markdown = read_file_one_string($_ENV['ARTICLES_PATH'] . $article_id . '/article.md'); $markdown = read_file_one_string($_ENV['ARTICLES_FQ_PATH'] . $article_id . '/article.md');
$parsedown = new Parsedown(); $parsedown = new Parsedown();
@@ -63,7 +63,7 @@ function article_page_from_markdown($article_id)
<p>Published on ' . $article['published_at'] . '</p> <p>Published on ' . $article['published_at'] . '</p>
</div> </div>
<div class="card_pic_box"> <div class="card_pic_box">
<img src="/profile_pictures/' . $author['profile_picture'] . '" class="card_profile_picture" /> <img src="' . $_ENV['PROFILE_IMAGES_PQ_PATH'] . '"' . $author['profile_picture'] . '" class="card_profile_picture" />
</div> </div>
</div> </div>
<div class="line" style="margin-bottom: 15px;"></div> <div class="line" style="margin-bottom: 15px;"></div>
@@ -129,7 +129,7 @@ function create_article($author_id, $title, $excerpt, $tags, $markdown_file_cont
$stmt = 'INSERT INTO article (author_id, title, excerpt, published_at) VALUES (' . $author_id . ', "' . $title . '", "' . $excerpt . '", CURRENT_TIMESTAMP);'; $stmt = 'INSERT INTO article (author_id, title, excerpt, published_at) VALUES (' . $author_id . ', "' . $title . '", "' . $excerpt . '", CURRENT_TIMESTAMP);';
$id = exec_statement($stmt, 0); $id = exec_statement($stmt, 0);
$path = $_ENV['ARTICLES_PATH'] . $id . '/'; $path = $_ENV['ARTICLES_PQ_PATH'] . $id . '/';
mkdir($path); mkdir($path);
$fs = fopen($path . 'article.md', 'a'); $fs = fopen($path . 'article.md', 'a');
fwrite($fs, $markdown_file_contents); fwrite($fs, $markdown_file_contents);