DatabaseArticleManager: neue Datenbank
This commit is contained in:
@@ -18,7 +18,7 @@ class DatabaseArticleManager implements ArticleManagerDAO {
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
if (!file_exists(__DIR__ . '/../../db/articles.db')) {
|
if (!file_exists(__DIR__ . '/../../db/eduforgeDB.db')) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$db = $this->getConnection();
|
$db = $this->getConnection();
|
||||||
@@ -59,7 +59,7 @@ class DatabaseArticleManager implements ArticleManagerDAO {
|
|||||||
try {
|
try {
|
||||||
$user = 'root';
|
$user = 'root';
|
||||||
$pw = null;
|
$pw = null;
|
||||||
$dsn = 'sqlite:' . __DIR__ . '/../../db/articles.db';
|
$dsn = 'sqlite:' . __DIR__ . '/../../db/eduforgeDB.db';
|
||||||
return new PDO($dsn, $user, $pw);
|
return new PDO($dsn, $user, $pw);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
throw new InternalServerErrorException($e->getMessage());
|
throw new InternalServerErrorException($e->getMessage());
|
||||||
|
|||||||
Reference in New Issue
Block a user