mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 01:38:54 +00:00
Slight changes in behaviour
This commit is contained in:
+1
-1
@@ -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();
|
||||
|
||||
+10
-10
@@ -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 ()
|
||||
|
||||
+2
-4
@@ -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.
|
||||
|
||||
+2
-1
@@ -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++;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user