* mail test - fill user email address as default

* digest - fix some warnings
This commit is contained in:
Andrew Dolgov 2024-01-09 11:28:32 +03:00
parent f0f22c23c5
commit ea6cdcccb0
No known key found for this signature in database
GPG Key ID: 1A56B4FA25D4AF2A
2 changed files with 7 additions and 3 deletions

View File

@ -17,7 +17,7 @@ class Digest
$pdo = Db::pdo();
$res = $pdo->query("SELECT id,email FROM ttrss_users
$res = $pdo->query("SELECT id, login, email FROM ttrss_users
WHERE email != '' AND (last_digest_sent IS NULL OR $interval_qpart)");
while ($line = $res->fetch()) {
@ -191,7 +191,7 @@ class Digest
$tpl_t->addBlock('article');
if ($headlines[$i]['feed_title'] != $headlines[$i + 1]['feed_title']) {
if (!isset($headlines[$i + 1]) || $headlines[$i]['feed_title'] != $headlines[$i + 1]['feed_title']) {
$tpl->addBlock('feed');
$tpl_t->addBlock('feed');
}

View File

@ -197,9 +197,13 @@ class Pref_System extends Handler_Administrative {
<?= \Controls\hidden_tag("op", "Pref_System") ?>
<?= \Controls\hidden_tag("method", "sendTestEmail") ?>
<?php
$user = ORM::for_table('ttrss_users')->find_one($_SESSION["uid"]);
?>
<fieldset>
<label><?= __("To:") ?></label>
<?= \Controls\input_tag("mail_address", "", "text", ['required' => 1]) ?>
<?= \Controls\input_tag("mail_address",$user->email, "text", ['required' => 1]) ?>
<?= \Controls\submit_tag(__("Send test email")) ?>
<span style="display: none; margin-left : 10px" class="alert alert-error" id="mail-test-result">...</span>
</fieldset>