Update showArticle-controller.php
This commit is contained in:
@@ -5,9 +5,9 @@ require_once 'php/model/ArticleManager.php';
|
|||||||
|
|
||||||
if (isset($_GET["id"])){
|
if (isset($_GET["id"])){
|
||||||
try {
|
try {
|
||||||
$id = (int)$_GET["id"];
|
$id = $_GET["id"];
|
||||||
$articleManager = ArticleManager::getInstance();
|
$articleManager = ArticleManager::getInstance();
|
||||||
$article = $articleManager->getArticle($_GET["id"]);
|
$article = $articleManager->getArticle($id);
|
||||||
if($article != null){
|
if($article != null){
|
||||||
$title = $article->getTitle();
|
$title = $article->getTitle();
|
||||||
$content = $article->getContent();
|
$content = $article->getContent();
|
||||||
|
|||||||
Reference in New Issue
Block a user