refactoring
This commit is contained in:
@@ -7,7 +7,8 @@ require_once 'ArticleManagerDAO.php';
|
||||
* @author Niklas Ortmann
|
||||
*/
|
||||
class ArticleManager implements ArticleManagerDAO {
|
||||
/*
|
||||
|
||||
/**
|
||||
* Gibt die Datenbank-Instanz zurück.
|
||||
*/
|
||||
public static function getInstance()
|
||||
@@ -29,13 +30,13 @@ class ArticleManager implements ArticleManagerDAO {
|
||||
|
||||
}
|
||||
|
||||
public function newArticle($title, $content, $author, $category) {
|
||||
public function newArticle($article) {
|
||||
$newData = array(
|
||||
"title" => $title,
|
||||
"content" => $content,
|
||||
"author" => $author,
|
||||
"category" => $category,
|
||||
//"tags" => isset($_POST["tags"]) ? $_POST["tags"] : '', TODO: Später hinzufügen
|
||||
"title" => $article->getTitle(),
|
||||
"content" => $article->getContent(),
|
||||
"author" => $article->getAuthor(),
|
||||
"category" => $article->getCategory(),
|
||||
//"tags" => $article->getTags(), TODO: Später hinzufügen
|
||||
"date" => date("d.m.Y, H:i")
|
||||
);
|
||||
$newData = base64_encode(serialize($newData));
|
||||
|
||||
Reference in New Issue
Block a user