Update file journal.php

This commit is contained in:
Jan BELLON 2024-03-07 01:11:59 +00:00
parent b06e5345b3
commit 84532893ba

View File

@ -2,10 +2,10 @@
require "../include/variables.php";
require "../include/functions.php";
if (isset($_GET['article']) == false || filter_var($_GET['article'], FILTER_VALIDATE_INT) == false) {
$article = "0";
} else {
if (filter_var($_GET['article'], FILTER_VALIDATE_INT)) {
$article = $_GET['article'];
} else {
$article = "";
}
?>
<!DOCTYPE html>
@ -45,7 +45,7 @@ if (isset($_GET['article']) == false || filter_var($_GET['article'], FILTER_VALI
<div>
<div>
<?php
if (file_exists('../content/journal/' . $article . '.md')) {
if ($article != "" && file_exists('../content/journal/' . $article . '.md')) {
$markdownContent = file_get_contents('../content/journal/' . $article . '.md');
require_once '../include/parsedown.php';