From 00a34a7982fbfbfb11c5bc709b99f8fbd2f6aac1 Mon Sep 17 00:00:00 2001 From: Darko Date: Mon, 15 Dec 2014 15:56:17 +0100 Subject: [PATCH] Fixed another snedEmail error, fixed group selection (error 412) and some adjustment in thetvdb. --- lib/copy_this/www/lib/TmuxOutput.php | 2 +- lib/copy_this/www/lib/binaries.php | 4 ++-- lib/copy_this/www/lib/thetvdb.php | 4 +++- lib/copy_this/www/lib/users.php | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/copy_this/www/lib/TmuxOutput.php b/lib/copy_this/www/lib/TmuxOutput.php index 0f7483ae0..b05121b39 100644 --- a/lib/copy_this/www/lib/TmuxOutput.php +++ b/lib/copy_this/www/lib/TmuxOutput.php @@ -117,7 +117,7 @@ class TmuxOutput extends Tmux $buffer = ''; $state = ($this->runVar['settings']['is_running'] == 1) ? 'Running' : 'Disabled'; //$version = $this->_tvers . 'r' . $this->_vers; - $tversion = '0.5r0081'; + $tversion = '0.5r0082'; $buffer .= sprintf($this->tmpMasks[2], "Monitor $state v$tversion @ $this->_tvers [" . $this->_vers ."]: ", diff --git a/lib/copy_this/www/lib/binaries.php b/lib/copy_this/www/lib/binaries.php index 22eb2296e..a1fae6559 100644 --- a/lib/copy_this/www/lib/binaries.php +++ b/lib/copy_this/www/lib/binaries.php @@ -422,14 +422,14 @@ class Binaries } // Re-select group, download headers again without compression and re-enable compression. - $this->_nntp->selectGroup($groupArr['Name']); + $this->_nntp->selectGroup($groupArr['name']); $msgs = $this->_nntp->getXOVER($first . '-' . $last); $this->_nntp->enableCompression(); // Check if the non-compression headers have an error. if ($this->_nntp->isError($msgs)) { $this->log( - "Code {$msgs->code}: {$msgs->message}\nSkipping group: ${$groupArr['Name']}", + "Code {$msgs->code}: {$msgs->message}\nSkipping group: ${$groupArr['name']}", 'scan', \Logger::LOG_WARNING, 'error' diff --git a/lib/copy_this/www/lib/thetvdb.php b/lib/copy_this/www/lib/thetvdb.php index 430defca3..cbfe5ed77 100644 --- a/lib/copy_this/www/lib/thetvdb.php +++ b/lib/copy_this/www/lib/thetvdb.php @@ -156,6 +156,7 @@ class TheTVDB { $apiresponse = Utility::getUrl(['url' => $this->MIRROR.'/api/GetSeries.php?seriesname='.preg_replace('/\s+/', '+', $seriesname).'&language=all']); + var_dump($apiresponse); if(!$apiresponse) return false; @@ -224,7 +225,8 @@ class TheTVDB $seriesid = $this->lookupSeriesID($seriesName); if($seriesid > 0) { - if($TheTVDBAPIArray = $this->TheTVDBAPI($seriesid, $seriesName)) + $TheTVDBAPIArray = $this->TheTVDBAPI($seriesid, $seriesName); + if($TheTVDBAPIArray) { $this->addSeries($TheTVDBAPIArray); $this->addEpisodes($TheTVDBAPIArray); diff --git a/lib/copy_this/www/lib/users.php b/lib/copy_this/www/lib/users.php index 6edae7714..9a114f746 100644 --- a/lib/copy_this/www/lib/users.php +++ b/lib/copy_this/www/lib/users.php @@ -307,7 +307,7 @@ class Users $data = $db->query(sprintf("select ID,email from users WHERE role = %d and rolechangedate < now()", $uprole)); foreach ($data as $u) { - sendEmail($u["email"], $msgsubject, $msgbody, $s->email); + Utility::sendEmail($u["email"], $msgsubject, $msgbody, $s->email); $db->exec(sprintf("update users SET role = %d, rolechangedate=null WHERE ID = %d", $downrole, $u["ID"])); } @@ -739,7 +739,7 @@ class Users $url = $serverurl . "register?invitecode=" . $token; $contents = $sender["username"] . " has sent an invite to join " . $sitetitle . " to this email address. To accept the invitation click the following link.\n\n " . $url; - sendEmail($emailto, $subject, $contents, $siteemail); + Utility::sendEmail($emailto, $subject, $contents, $siteemail); $this->addInvite($uid, $token); return $url;