From e95455a7fba7316a2a13f06269592bd4d63fa78b Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 1 Sep 2015 22:37:25 +0200 Subject: [PATCH] Rename Info class into Nfo class. --- .../nix_scripts/multiprocessing/.do_not_run/switch.php | 4 ++-- misc/update_scripts/nix_scripts/tmux/bin/fixreleasenames.php | 2 +- misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php | 2 +- newznab/controllers/NZBContents.php | 2 +- newznab/controllers/NameFixer.php | 2 +- newznab/controllers/{Info.php => Nfo.php} | 2 +- newznab/controllers/PostProcess.php | 2 +- newznab/libraries/Forking.php | 2 +- newznab/processing/PProcess.php | 2 +- newznab/processing/post/ProcessAdditional.php | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) rename newznab/controllers/{Info.php => Nfo.php} (99%) diff --git a/misc/update_scripts/nix_scripts/multiprocessing/.do_not_run/switch.php b/misc/update_scripts/nix_scripts/multiprocessing/.do_not_run/switch.php index 30b8b2acc..0883c4639 100644 --- a/misc/update_scripts/nix_scripts/multiprocessing/.do_not_run/switch.php +++ b/misc/update_scripts/nix_scripts/multiprocessing/.do_not_run/switch.php @@ -218,7 +218,7 @@ switch ($options[1]) { // Post process the releases. (new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp, 'Settings' => $pdo]))->start($options[2]); - (new \Info(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, $options[2]); + (new \Nfo(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, $options[2]); } break; @@ -234,7 +234,7 @@ switch ($options[1]) { $nntp = nntp($pdo, true); if ($options[1] === 'pp_nfo') { - (new \Info(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, '', $options[2]); + (new \Nfo(['Echo' => true, 'Settings' => $pdo]))->processNfoFiles($nntp, '', $options[2]); } else { (new ProcessAdditional(['Echo' => true, 'NNTP' => $nntp, 'Settings' => $pdo]))->start('', $options[2]); } diff --git a/misc/update_scripts/nix_scripts/tmux/bin/fixreleasenames.php b/misc/update_scripts/nix_scripts/tmux/bin/fixreleasenames.php index 9f7e5bfbf..176e970c1 100644 --- a/misc/update_scripts/nix_scripts/tmux/bin/fixreleasenames.php +++ b/misc/update_scripts/nix_scripts/tmux/bin/fixreleasenames.php @@ -62,7 +62,7 @@ if (!isset($argv[1])) { $relID = $pieces[1]; $guid = $pieces[2]; $groupID = $pieces[3]; - $nzbcontents = new NZBContents(array('echo' => true, 'nntp' => $nntp, 'nfo' => new Info(), 'db' => $db, 'pp' => new PProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer]))); + $nzbcontents = new NZBContents(array('echo' => true, 'nntp' => $nntp, 'nfo' => new Nfo(), 'db' => $db, 'pp' => new PProcess(['Settings' => $pdo, 'Nfo' => $Nfo, 'NameFixer' => $namefixer]))); $res = $nzbcontents->checkPAR2($guid, $relID, $groupID, 1, 1); if ($res === false) { echo '.'; diff --git a/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php b/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php index 8ef91fa40..c7018f4d1 100644 --- a/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php +++ b/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php @@ -132,7 +132,7 @@ if (!isset($argv[1])) { exit($pdo->log->error("Unable to connect to usenet.")); } - $Nfo = new Info(['Settings' => $pdo, 'Echo' => true]); + $Nfo = new Nfo(['Settings' => $pdo, 'Echo' => true]); $nzbcontents = new NZBContents( array( 'Echo' => true, 'NNTP' => $nntp, 'Nfo' => $Nfo, 'Settings' => $pdo, diff --git a/newznab/controllers/NZBContents.php b/newznab/controllers/NZBContents.php index 1bffba94a..2d48a06da 100644 --- a/newznab/controllers/NZBContents.php +++ b/newznab/controllers/NZBContents.php @@ -89,7 +89,7 @@ Class NZBContents $this->echooutput = ($options['Echo'] && NN_ECHOCLI); $this->pdo = ($options['Settings'] instanceof Settings ? $options['Settings'] : new Settings()); $this->nntp = ($options['NNTP'] instanceof \NNTP ? $options['NNTP'] : new \NNTP(['Echo' => $this->echooutput, 'Settings' => $this->pdo])); - $this->nfo = ($options['Nfo'] instanceof \Info ? $options['Nfo'] : new \Info(['Echo' => $this->echooutput, 'Settings' => $this->pdo])); + $this->nfo = ($options['Nfo'] instanceof \Nfo ? $options['Nfo'] : new \Nfo(['Echo' => $this->echooutput, 'Settings' => $this->pdo])); $this->pp = ( $options['PostProcess'] instanceof PProcess ? $options['PostProcess'] diff --git a/newznab/controllers/NameFixer.php b/newznab/controllers/NameFixer.php index 5df21192c..c1d6e20d1 100644 --- a/newznab/controllers/NameFixer.php +++ b/newznab/controllers/NameFixer.php @@ -342,7 +342,7 @@ class NameFixer $this->_totalReleases = $total; echo $this->pdo->log->primary(number_format($total) . ' releases to process.'); - $Nfo = new Info(['Echo' => $this->echooutput, 'Settings' => $this->pdo]); + $Nfo = new Nfo(['Echo' => $this->echooutput, 'Settings' => $this->pdo]); $nzbContents = new NZBContents( [ 'Echo' => $this->echooutput, diff --git a/newznab/controllers/Info.php b/newznab/controllers/Nfo.php similarity index 99% rename from newznab/controllers/Info.php rename to newznab/controllers/Nfo.php index b0cb0d6ed..c3112b8d9 100644 --- a/newznab/controllers/Info.php +++ b/newznab/controllers/Nfo.php @@ -11,7 +11,7 @@ require_once NN_LIBS . 'rarinfo/sfvinfo.php'; * Class Nfo * Class for handling fetching/storing of NFO files. */ -class Info +class Nfo { /** * Instance of class DB diff --git a/newznab/controllers/PostProcess.php b/newznab/controllers/PostProcess.php index 8b6894410..959814e74 100644 --- a/newznab/controllers/PostProcess.php +++ b/newznab/controllers/PostProcess.php @@ -162,7 +162,7 @@ class PostProcess if ($this->pdo->getSetting('lookupnfo') == 1) { $nfo = new Nfo($this->echooutput); - $nfo->processNfoFiles(500); + $nfo->processNfoFiles(); } } diff --git a/newznab/libraries/Forking.php b/newznab/libraries/Forking.php index 05c19db6f..b5f62bc23 100644 --- a/newznab/libraries/Forking.php +++ b/newznab/libraries/Forking.php @@ -708,7 +708,7 @@ class Forking extends \fork_daemon private function checkProcessNfo() { if ($this->pdo->getSetting('lookupnfo') == 1) { - $this->nfoQueryString = \Info::NfoQueryString($this->pdo); + $this->nfoQueryString = \Nfo::NfoQueryString($this->pdo); return ( $this->pdo->queryOneRow( sprintf( diff --git a/newznab/processing/PProcess.php b/newznab/processing/PProcess.php index 718b35e72..9818d2937 100644 --- a/newznab/processing/PProcess.php +++ b/newznab/processing/PProcess.php @@ -94,7 +94,7 @@ class PProcess $this->_par2Info = new \Par2Info(); $this->debugging = ($options['Logger'] instanceof \Logger ? $options['Logger'] : new \Logger(['ColorCLI' => $this->pdo->log])); $this->nameFixer = (($options['NameFixer'] instanceof \NameFixer) ? $options['NameFixer'] : new \NameFixer(['Echo' => $this->echooutput, 'Settings' => $this->pdo, 'Groups' => $this->groups])); - $this->Nfo = (($options['Nfo'] instanceof \Info ) ? $options['Nfo'] : new \Info(['Echo' => $this->echooutput, 'Settings' => $this->pdo])); + $this->Nfo = (($options['Nfo'] instanceof \Nfo ) ? $options['Nfo'] : new \Nfo(['Echo' => $this->echooutput, 'Settings' => $this->pdo])); $this->releaseFiles = (($options['ReleaseFiles'] instanceof \ReleaseFiles) ? $options['ReleaseFiles'] : new \ReleaseFiles($this->pdo)); //\\ diff --git a/newznab/processing/post/ProcessAdditional.php b/newznab/processing/post/ProcessAdditional.php index a86f442ce..8e44ebbe0 100644 --- a/newznab/processing/post/ProcessAdditional.php +++ b/newznab/processing/post/ProcessAdditional.php @@ -296,7 +296,7 @@ class ProcessAdditional $this->_releaseExtra = ($options['ReleaseExtra'] instanceof \ReleaseExtra ? $options['ReleaseExtra'] : new \ReleaseExtra($this->pdo)); $this->_releaseImage = ($options['ReleaseImage'] instanceof \ReleaseImage ? $options['ReleaseImage'] : new \ReleaseImage($this->pdo)); $this->_par2Info = new \Par2Info(); - $this->_nfo = ($options['Nfo'] instanceof \Info ? $options['Nfo'] : new \Info(['Echo' => $this->_echoCLI, 'Settings' => $this->pdo])); + $this->_nfo = ($options['Nfo'] instanceof \Nfo ? $options['Nfo'] : new \Nfo(['Echo' => $this->_echoCLI, 'Settings' => $this->pdo])); $this->sphinx = ($options['SphinxSearch'] instanceof \SphinxSearch ? $options['SphinxSearch'] : new \SphinxSearch()); $s = new \Sites(); $this->site = $s->get();