Adjust Categorize class settings values

This commit is contained in:
DariusIII
2017-07-17 00:09:20 +02:00
parent 6dc54ff6aa
commit f0ca4c3193
3 changed files with 14 additions and 6 deletions
+2
View File
@@ -1,3 +1,5 @@
2017-07-17 DariusIII
* Chg: Adjust Categorize class settings values
2017-17-16 DariusIII
* Chg: Replace app with App in classes used
* Chg: Update composer.lock
+4 -2
View File
@@ -53,12 +53,14 @@ class Categorize extends Category
* Construct.
*
* @param array $options Class instances.
*
* @throws \Exception
*/
public function __construct(array $options = [])
{
parent::__construct($options);
$this->categorizeForeign = Settings::value('indexer.categorise.categorizeforeign');
$this->catWebDL = Settings::value('indexer.categorise.catwebdl');
$this->categorizeForeign = (int)Settings::value('indexer.categorise.categorizeforeign');
$this->catWebDL = (int)Settings::value('indexer.categorise.catwebdl');
$this->regexes = new Regexes(['Settings' => $this->pdo, 'Table_Name' => 'category_regexes']);
}
+8 -4
View File
@@ -24,7 +24,7 @@ class AniDB
public $imgSavePath;
/**
* @var Settings
* @var DB
*/
public $pdo;
@@ -60,6 +60,8 @@ class AniDB
/**
* @param array $options Class instances / Echo to cli.
*
* @throws \Exception
*/
public function __construct(array $options = [])
{
@@ -86,8 +88,10 @@ class AniDB
/**
* Main switch that initiates AniDB table population
*
* @param string $type
* @param int|string $anidbId
* @param string $type
* @param int|string $anidbId
*
* @throws \Exception
*/
public function populateTable($type = '', $anidbId = ''): void
{
@@ -508,7 +512,7 @@ class AniDB
*/
private function setLastUpdated(): void
{
Settings::update(
(new Settings)->update(
['value' => time()],
['section' => 'APIs', 'subsection' => 'AniDB', 'name' => 'last_full_update']
);