diff --git a/bin/monitor.php b/bin/monitor.php index a67f3e560..aa559992d 100644 --- a/bin/monitor.php +++ b/bin/monitor.php @@ -4,7 +4,7 @@ require(dirname(__FILE__)."/config.php"); require(WWW_DIR.'/lib/postprocess.php'); require_once (WWW_DIR.'/lib/site.php'); -$version="0.3r058"; +$version="0.3r063"; $db = new DB(); $s = new Sites(); diff --git a/test/ColorCLI.php b/test/ColorCLI.php index e9d21b442..840df2871 100644 --- a/test/ColorCLI.php +++ b/test/ColorCLI.php @@ -216,32 +216,32 @@ class ColorCLI { public static function primary ($str) { - $primarystring = "\033[38;5;".self::$colors256['Green']."m$str\033[0m\n"; - return $primarystring; + $str = "\033[38;5;".self::$colors256['Green']."m$str\033[0m\n"; + return $str; } public static function header ($str) { - $headerstring = "\033[38;5;".self::$colors256['Yellow']."m$str\033[0m\n"; - return $headerstring; + $str = "\033[38;5;".self::$colors256['Yellow']."m$str\033[0m\n"; + return $str; } public static function primaryOver ($str) { - $primarystring = "\033[38;5;".self::$colors256['Green']."m$str\033[0m"; - return $primarystring; + $str = "\033[38;5;".self::$colors256['Green']."m$str\033[0m"; + return $str; } public static function headerOver ($str) { - $headerstring = "\033[38;5;".self::$colors256['Yellow']."m$str\033[0m"; - return $headerstring; + $str = "\033[38;5;".self::$colors256['Yellow']."m$str\033[0m"; + return $str; } public static function warningOver ($str) { - $headerstring = "\033[38;5;".self::$colors256['Red']."m"; - return $headerstring; + $str = "\033[38;5;".self::$colors256['Red']."m"; + return $str; } public static function rsetColor () diff --git a/test/functions.php b/test/functions.php index cb5e5bb39..0524ce787 100755 --- a/test/functions.php +++ b/test/functions.php @@ -169,12 +169,12 @@ class Functions $groups = new Groups(); $functions = new Functions(); $par2 = $nntp->getMessage($functions->getByNameByID($groupID), $messageID); - if ($par2 === false || PEAR::isError($par2)) + if (PEAR::isError($par2)) { $nntp->doQuit(); $nntp->doConnect(); $par2 = $nntp->getMessage($functions->getByNameByID($groupID), $messageID); - if ($par2 === false || PEAR::isError($par2)) + if (PEAR::isError($par2)) { $nntp->doQuit(); return false; @@ -226,8 +226,6 @@ class Functions else return false; } - else - return false; } // Check if the NZB is there, returns path, else false. diff --git a/test/namefixer.php b/test/namefixer.php index e6e376062..61534c716 100644 --- a/test/namefixer.php +++ b/test/namefixer.php @@ -184,7 +184,8 @@ class Namefixer foreach ($relres as $relrow) { - if (($nzbcontents->checkPAR2($relrow['guid'], $relrow['releaseID'], $relrow['groupID'], $db, $pp, $nntp)) !== false); + $this->done = $this->matched = false; + if (($nzbcontents->checkPAR2($relrow['guid'], $relrow['releaseID'], $relrow['groupID'], $db, $pp, $nntp)) === true); { echo "."; $this->fixed++; diff --git a/test/nzbcontents.php b/test/nzbcontents.php index 940bb3f8f..528414c4a 100644 --- a/test/nzbcontents.php +++ b/test/nzbcontents.php @@ -63,7 +63,7 @@ Class NZBcontents { $c = new ColorCLI; if (!isset($nntp)) - exit($c->error("Not connected to usenet(nzbcontents->nzbcontents->checkPAR2.\n")); + exit($c->error("Not connected to usenet(nzbcontents->checkPAR2.\n")); $nzbfile = $this->LoadNZB($guid); if ($nzbfile !== false) @@ -73,7 +73,7 @@ Class NZBcontents if (preg_match('/\.(par[2" ]|\d{2,3}").+\(1\/1\)$/i', $nzbcontents->attributes()->subject)) { $pp = new Functions(); - if ($pp->parsePAR2($nzbcontents->segments->segment, $relID, $groupID, $nntp) !== false) + if ($pp->parsePAR2($nzbcontents->segments->segment, $relID, $groupID, $nntp) === true) { $db->query(sprintf('UPDATE releases SET relnamestatus = 22 WHERE (relnamestatus != 7 AND relnamestatus != 22) AND ID = %d', $relID)); return true;