From 0f1a7d2f0947d0a4c14106044b268ace4b86b146 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Fri, 17 May 2019 12:28:19 -0600 Subject: [PATCH] Force local project database user/password setup --- .gitignore | 4 +++- src/php/api/Db.php | 4 +++- src/php/api/config.php.changeme | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/php/api/config.php.changeme diff --git a/.gitignore b/.gitignore index 5958d07..4f33c66 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ node_modules/ .cache/ dist/ -vendor/ \ No newline at end of file +vendor/ + +src/php/api/config.php \ No newline at end of file diff --git a/src/php/api/Db.php b/src/php/api/Db.php index 901a55f..f29dd9d 100644 --- a/src/php/api/Db.php +++ b/src/php/api/Db.php @@ -1,9 +1,11 @@ dbh = new PDO('mysql:host=localhost;dbname=lexiconga;charset=utf8', 'root', ''); + $this->dbh = new PDO('mysql:host=localhost;dbname=lexiconga;charset=utf8', DB_USER, DB_PASSWORD); $this->dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC); $this->last_error_info = null; } diff --git a/src/php/api/config.php.changeme b/src/php/api/config.php.changeme new file mode 100644 index 0000000..b2aa988 --- /dev/null +++ b/src/php/api/config.php.changeme @@ -0,0 +1,4 @@ +