Minor updates to Cache and Captcha.

This commit is contained in:
Darko
2015-06-10 13:32:08 +02:00
parent 58a5d7b570
commit 4a230949fe
5 changed files with 61 additions and 17 deletions
-2
View File
@@ -87,8 +87,6 @@ class Captcha {
$options += $defaults;
$this->pdo = ($options['Settings'] instanceof Settings ? $options['Settings'] : new Settings());
$s = new \Sites();
$this->site = $s->get();
}
/**
+3 -12
View File
@@ -159,13 +159,13 @@ class Cache
public function __construct()
{
if (!defined('NN_CACHE_HOSTS')) {
throw new \CacheException(
throw new CacheException(
'The NN_CACHE_HOSTS is not defined! Define it in settings.php'
);
}
if (!defined('NN_CACHE_TIMEOUT')) {
throw new \CacheException(
throw new CacheException(
'The NN_CACHE_TIMEOUT is not defined! Define it in settings.php, it is the time in seconds to time out from your cache server.'
);
}
@@ -330,13 +330,4 @@ class Cache
}
}
}
/**
* Class CacheException
*
* @package newznab\libraries
*/
class CacheException extends \Exception
{
}
}
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (see LICENSE.txt in the base directory. If
* not, see:
*
* @link <http://www.gnu.org/licenses/>.
* @author niel
* @copyright 2015 nZEDb
*/
namespace newznab\libraries;
/**
* Class CacheException
*
* @package \nzedb\libraries
*/
class CacheException extends \Exception
{
}
+1 -3
View File
@@ -1093,6 +1093,4 @@ class Forking extends \fork_daemon
private $processNFO = false; // Should we process NFOs?
private $processMovies = false; // Should we process Movies?
private $processTV = false; // Should we process TV?
}
class ForkingException extends \Exception {}
}
+26
View File
@@ -0,0 +1,26 @@
<?php
/**
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program (see LICENSE.txt in the base directory. If
* not, see:
*
* @link <http://www.gnu.org/licenses/>.
* @author niel
* @copyright 2015 nZEDb
*/
namespace newznab\libraries;
class ForkingException extends \Exception
{
}