Beiträge_loeschen #29
@@ -21,7 +21,7 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*try {
|
||||
try {
|
||||
|
||||
$articleManager = ArticleManager::getInstance();
|
||||
$articleManager->deleteArticle($id, $user);
|
||||
@@ -30,8 +30,8 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||
$_SESSION["message"] = $e->getMessage();
|
||||
header("location: ../../index.php?pfad=profile");
|
||||
exit();
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
$_SESSION["message"] = "article_deleted";
|
||||
header("location: ../../index.php?pfad=profile");
|
||||
exit();
|
||||
|
||||
@@ -147,7 +147,7 @@ class DatabaseArticleManager implements ArticleManagerDAO {
|
||||
|
||||
public function deleteArticle($id, $author)
|
||||
{
|
||||
$article = getArticle($id);
|
||||
$article = $this->getArticle($id);
|
||||
if (empty($article)) {
|
||||
throw new NotFoundException("not_found_article");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user