Another take on internal server error

This commit is contained in:
Darko
2014-05-29 09:47:13 +02:00
parent 89ba9981ea
commit 9c2d21af0f
2 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -104,7 +104,7 @@ if (isset($_GET["id"])) {
readgzfile($nzbpath);
// Set the NZB file name.
header("Content-Disposition: attachment; filename=" . str_replace(array(',', ' '), '_', $reldata["searchname"]) . ".nzb");
header("Content-Disposition: attachment; filename=\"" . str_replace(" ", "_", $reldata["searchname"]) . ".nzb\"");
// Get the size of the NZB file.
header("Content-Length: " . ob_get_length());
header("Content-Type: application/x-nzb");
+2 -4
View File
@@ -52,11 +52,9 @@ switch($action)
$errorStr = 'You must enter a NZBGet password!';
} else if (isset($_POST['nzbgetusername']) && empty($_POST['nzbgetusername'])) {
$errorStr = 'You must enter a NZBGet username!';
}
else if (!$users->isValidEmail($_POST['email']))
} else if (!$users->isValidEmail($_POST['email'])) {
$errorStr = "Your email is not a valid format.";
else
{
} else {
$res = $users->getByEmail($_POST['email']);
if ($res && $res["ID"] != $userid) {
$errorStr = "Sorry, the email is already in use.";