From 6bcdaa8ed6d45d8c852bf2d2e37b07446861c94b Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Mon, 6 Mar 2017 14:00:33 +0100 Subject: Hardcoded PDO class name replaced with $Database class. --- admin/page/insert.php | 2 +- admin/page/update.php | 2 +- admin/post/insert.php | 2 +- admin/post/update.php | 2 +- system/search/main.php | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/page/insert.php b/admin/page/insert.php index 0f421f6..f8a4cbf 100644 --- a/admin/page/insert.php +++ b/admin/page/insert.php @@ -42,7 +42,7 @@ if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'time_insert', 'time_up try { $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE)); - foreach($userIDs->fetchAll(PDO::FETCH_COLUMN) as $userID) { + foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ 'ID' => $User->attr('id'), diff --git a/admin/page/update.php b/admin/page/update.php index 0489406..857631d 100644 --- a/admin/page/update.php +++ b/admin/page/update.php @@ -44,7 +44,7 @@ try { try { $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE)); - foreach($userIDs->fetchAll(PDO::FETCH_COLUMN) as $userID) { + foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ 'ID' => $User->attr('id'), diff --git a/admin/post/insert.php b/admin/post/insert.php index ab6bb87..baeacd3 100644 --- a/admin/post/insert.php +++ b/admin/post/insert.php @@ -42,7 +42,7 @@ if(HTTP::issetPOST('id', 'user', 'slug', 'name', 'body', 'time_insert', 'time_up try { $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE)); - foreach($userIDs->fetchAll(PDO::FETCH_COLUMN) as $userID) { + foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ 'ID' => $User->attr('id'), diff --git a/admin/post/update.php b/admin/post/update.php index 875d947..65b9045 100644 --- a/admin/post/update.php +++ b/admin/post/update.php @@ -44,7 +44,7 @@ try { try { $userIDs = $Database->query(sprintf('SELECT id FROM %s ORDER BY fullname ASC', User\Attribute::TABLE)); - foreach($userIDs->fetchAll(PDO::FETCH_COLUMN) as $userID) { + foreach($userIDs->fetchAll($Database::FETCH_COLUMN) as $userID) { $User = User\Factory::build($userID); $userAttributes[] = [ 'ID' => $User->attr('id'), diff --git a/system/search/main.php b/system/search/main.php index e27cebf..fe18e7e 100644 --- a/system/search/main.php +++ b/system/search/main.php @@ -21,9 +21,9 @@ $form_data = [ 'Y' => HTTP::GET('y'), ], 'OPTIONS' => [ - 'D' => $D_LIST->fetchAll(PDO::FETCH_COLUMN), - 'M' => $M_LIST->fetchAll(PDO::FETCH_COLUMN), - 'Y' => $Y_LIST->fetchAll(PDO::FETCH_COLUMN), + 'D' => $D_LIST->fetchAll($Database::FETCH_COLUMN), + 'M' => $M_LIST->fetchAll($Database::FETCH_COLUMN), + 'Y' => $Y_LIST->fetchAll($Database::FETCH_COLUMN), ] ]; -- cgit v1.2.3