From 2d041d07491d8b4a1555cbdc1f9a735615d30e7c Mon Sep 17 00:00:00 2001 From: Darko Date: Mon, 8 Jun 2015 10:04:41 +0200 Subject: [PATCH] Fix SABnzbd to use settings table. --- newznab/controllers/SABnzbd.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/newznab/controllers/SABnzbd.php b/newznab/controllers/SABnzbd.php index 933f1c86e..c81f30997 100644 --- a/newznab/controllers/SABnzbd.php +++ b/newznab/controllers/SABnzbd.php @@ -91,7 +91,7 @@ class SABnzbd $this->serverurl = $page->serverurl; // Set up properties. - switch ($page->site->sabintegrationtype) { + switch ($page->settings->getSetting('sabintegrationtype')) { case self::INTEGRATION_TYPE_USER: if (!empty($_COOKIE['sabnzbd_' . $this->uid . '__apikey']) && !empty($_COOKIE['sabnzbd_' . $this->uid . '__host'])) { $this->url = $_COOKIE['sabnzbd_' . $this->uid . '__host']; @@ -117,11 +117,11 @@ class SABnzbd break; case self::INTEGRATION_TYPE_SITEWIDE: - if (!empty($page->site->sabapikey) && !empty($page->site->saburl)) { - $this->url = $page->site->saburl; - $this->apikey = $page->site->sabapikey; - $this->priority = $page->site->sabpriority; - $this->apikeytype = $page->site->sabapikeytype; + if (($page->settings->getSetting('sabapikey') != '') && ($page->settings->getSetting('saburl') != '')) { + $this->url = $page->settings->getSetting('saburl'); + $this->apikey = $page->settings->getSetting('sabapikey'); + $this->priority = $page->settings->getSetting('sabpriority'); + $this->apikeytype = $page->settings->getSetting('sabapikeytype'); } $this->integrated = self::INTEGRATION_TYPE_SITEWIDE; $this->integratedBool = true;