diff --git a/Blacklight/Sites.php b/Blacklight/Sites.php deleted file mode 100755 index ac55c1fac..000000000 --- a/Blacklight/Sites.php +++ /dev/null @@ -1,47 +0,0 @@ -{$row['setting']} = $row['value']; - } - - return $obj; - } - - /** - * @param $row - * @return \stdClass - */ - public function row2Object($row) - { - $obj = new \stdClass; - $rowKeys = array_keys($row); - foreach ($rowKeys as $key) { - $obj->{$key} = $row[$key]; - } - - return $obj; - } -} diff --git a/Changelog b/Changelog index 99c90e351..0b17d1deb 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-10-20 DariusIII + * Chg: Use object casting instead of row2Object function, remove now unused Sites class * Chg: Update phpstan/phpstan to version 0.10.4 2018-10-19 DariusIII * Chg: Replace Storage with File facade in ProcessAdditional class diff --git a/app/Http/Controllers/Admin/SiteController.php b/app/Http/Controllers/Admin/SiteController.php index e84d244ea..74c90e0d5 100644 --- a/app/Http/Controllers/Admin/SiteController.php +++ b/app/Http/Controllers/Admin/SiteController.php @@ -3,7 +3,6 @@ namespace App\Http\Controllers\Admin; use App\Models\User; -use Blacklight\Sites; use App\Models\Release; use Blacklight\SABnzbd; use App\Models\Category; @@ -24,8 +23,6 @@ class SiteController extends BasePageController { $this->setAdminPrefs(); - $sites = new Sites(); - // set the current action $action = $request->input('action') ?? 'view'; @@ -63,7 +60,7 @@ class SiteController extends BasePageController } $this->smarty->assign('error', $error); - $site = $sites->row2Object($request->all()); + $site = (object) $request->all(); $this->smarty->assign('site', $site); break;