Skip to content

Commit 6d43632

Browse files
committed
Minor changes
1 parent 5f9c4a3 commit 6d43632

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

v1/.htaccess

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ RewriteRule ^sessions/([0-9]+)$ controller/sessions.php?sessionid=$1 [L]
5050

5151
# Images:
5252

53-
# Get or Update a certain image Attributes (GET or PATCH)
53+
# Retrieve or Update a certain image Attributes (GET or PATCH)
5454
RewriteRule ^tasks/([0-9]+)/images/([0-9]+)/attributes$ controller/images.php?taskid=$1&imageid=$2&attributes=true [L]
5555

5656
# Handle Download a certain actual physical image of a certain (id) task (GET) Or Delete a certain physical image of a certain task (DELETE)

v1/controller/db.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static function connectWriteDB() {
1313
// database connection muse be a singleton object (there must be a one connection only across your whole project/application, and you just reuse it whenever you need it)
1414

1515
if (self::$writeDBConnection === null) { // to start initiation of the connection
16-
self::$writeDBConnection = new PDO('mysql:host=localhost;dbname=tasksdb;charset=utf8', 'root', '0000'); // Create the database connection
16+
self::$writeDBConnection = new PDO('mysql:host=localhost;dbname=tasksdb;charset=utf8', 'root', ''); // Create the database connection
1717

1818
// Setting some attributes on the connection:
1919
self::$writeDBConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // the error mode is Exception. They are good because you can catch them, deal with them, and they are a good way to error handling in PHP
@@ -28,7 +28,7 @@ public static function connectWriteDB() {
2828
public static function connectReadDB() {
2929
// Database connection must be a singleton object (there must be a one connection only across/throughout your whole project/application, and you just reuse it whenever you need it)
3030
if (self::$readDBConnection === null) { // to start initiation of the connection
31-
self::$readDBConnection = new PDO('mysql:host=localhost;dbname=tasksdb;charset=utf8', 'root', '0000'); // Create the database connection
31+
self::$readDBConnection = new PDO('mysql:host=localhost;dbname=tasksdb;charset=utf8', 'root', ''); // Create the database connection
3232

3333
// Setting some attributes on the connection:
3434
self::$readDBConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // the error mode is Exception. They are good because you can catch them, deal with them, and they are a good way to error handling in PHP

0 commit comments

Comments
 (0)