From fe5387e9d696601d180da46fd768b48087a97f2b Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 10 Jul 2018 14:49:01 +0200 Subject: [PATCH] Remove usage of Blacklight\db\DB class where possible --- Blacklight/CollectionsCleaning.php | 10 +--------- Blacklight/NZBContents.php | 1 - Blacklight/NZBGet.php | 2 -- Changelog | 1 + app/Http/Controllers/BasePageController.php | 1 - 5 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Blacklight/CollectionsCleaning.php b/Blacklight/CollectionsCleaning.php index 8bc3ce9db..90b44295d 100755 --- a/Blacklight/CollectionsCleaning.php +++ b/Blacklight/CollectionsCleaning.php @@ -2,8 +2,6 @@ namespace Blacklight; -use Blacklight\db\DB; - /** * Cleans names for collections/imports/namefixer. * @@ -73,11 +71,6 @@ class CollectionsCleaning */ public $subject = ''; - /** - * @var \Blacklight\db\DB - */ - public $pdo; - /** * @var \Blacklight\Regexes */ @@ -99,8 +92,7 @@ class CollectionsCleaning ]; $options += $defaults; - $this->pdo = ($options['Settings'] instanceof DB ? $options['Settings'] : new DB()); - $this->_regexes = new Regexes(['Settings' => $this->pdo, 'Table_Name' => 'collection_regexes']); + $this->_regexes = new Regexes(['Table_Name' => 'collection_regexes']); } /** diff --git a/Blacklight/NZBContents.php b/Blacklight/NZBContents.php index ef54d2c09..4fb970b69 100755 --- a/Blacklight/NZBContents.php +++ b/Blacklight/NZBContents.php @@ -2,7 +2,6 @@ namespace Blacklight; -use Blacklight\db\DB; use App\Models\Release; use App\Models\Settings; use Blacklight\utility\Utility; diff --git a/Blacklight/NZBGet.php b/Blacklight/NZBGet.php index ff306a774..2e3434d1a 100755 --- a/Blacklight/NZBGet.php +++ b/Blacklight/NZBGet.php @@ -2,7 +2,6 @@ namespace Blacklight; -use Blacklight\db\DB; use GuzzleHttp\Client; use App\Models\Release; use GuzzleHttp\Psr7\Request; @@ -93,7 +92,6 @@ class NZBGet $this->fullUrl = $this->verifyURL($this->url); $this->releases = new Releases(); - $this->pdo = new DB(); $this->nzb = new NZB(); $this->client = new Client(); } diff --git a/Changelog b/Changelog index 289bec233..234836350 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-07-10 DariusIII + * Chg: Remove usage of Blacklight\db\DB class where possible * Fix: Fix anime list display * Chg: Update AniDB class and related Controller and view * Fix: Fix couple of errors in NameFixer class diff --git a/app/Http/Controllers/BasePageController.php b/app/Http/Controllers/BasePageController.php index bacb6864e..c6502cecf 100644 --- a/app/Http/Controllers/BasePageController.php +++ b/app/Http/Controllers/BasePageController.php @@ -6,7 +6,6 @@ require_once NN_LIB.'utility/SmartyUtils.php'; use App\Models\Menu; use App\Models\User; -use Blacklight\db\DB; use Blacklight\SABnzbd; use App\Models\Category; use App\Models\Settings;