mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
fix torrent edit and send email
This commit is contained in:
@@ -329,7 +329,8 @@ class ToolRepository extends BaseRepository
|
|||||||
}
|
}
|
||||||
// Create the Transport
|
// Create the Transport
|
||||||
$transport = $factory->create(new Dsn(
|
$transport = $factory->create(new Dsn(
|
||||||
$encryption === 'tls' ? (($smtp['smtpport'] == 465) ? 'smtps' : 'smtp') : '',
|
// $encryption === 'tls' ? (($smtp['smtpport'] == 465) ? 'smtps' : 'smtp') : '',
|
||||||
|
$smtp['smtpport'] == 465 && in_array($encryption, ['ssl', 'tls']) ? 'smtps' : 'smtp',
|
||||||
$smtp['smtpaddress'],
|
$smtp['smtpaddress'],
|
||||||
$smtp['accountname'] ?? null,
|
$smtp['accountname'] ?? null,
|
||||||
$smtp['accountpassword'] ?? null,
|
$smtp['accountpassword'] ?? null,
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ $id = intval($_GET['id'] ?? 0);
|
|||||||
if (!$id)
|
if (!$id)
|
||||||
die();
|
die();
|
||||||
|
|
||||||
$res = sql_query("SELECT torrents.*, categories.mode as cat_mode FROM torrents LEFT JOIN categories ON category = categories.id WHERE torrents.id = $id");
|
$res = sql_query("SELECT torrents.*, categories.mode as cat_mode, torrent_extras.media_info as technical_info, torrent_extras.descr FROM torrents LEFT JOIN categories ON category = categories.id left join torrent_extras on torrents.id = torrent_extras.torrent_id WHERE torrents.id = $id");
|
||||||
$row = mysql_fetch_assoc($res);
|
$row = mysql_fetch_assoc($res);
|
||||||
if (!$row) die();
|
if (!$row) die();
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ EOD;
|
|||||||
$toolRep->sendMail($email, $title, $body, true);
|
$toolRep->sendMail($email, $title, $body, true);
|
||||||
stderr($lang_mailtest['std_success'], $lang_mailtest['std_success_note']);
|
stderr($lang_mailtest['std_success'], $lang_mailtest['std_success_note']);
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
do_log($e->getMessage().$e->getTraceAsString(), "error");
|
||||||
stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail'] . sprintf("<br/><br/><code>%s</code>", $e->getMessage()), false);
|
stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail'] . sprintf("<br/><br/><code>%s</code>", $e->getMessage()), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user