merge 1.9

This commit is contained in:
xiaomlove
2025-12-29 00:02:46 +07:00
11 changed files with 123 additions and 32 deletions

View File

@@ -341,7 +341,7 @@ function docleanup($forceAll = 0, $printProgress = false) {
//rest seed_points_per_hour
$seedPointsUpdatedAtMin = $carbonNow->subSeconds(2*intval($autoclean_interval_one))->toDateTimeString();
sql_query("update users set seed_points_per_hour = 0 where seed_points_updated_at < " . sqlesc($seedPointsUpdatedAtMin));
sql_query("update users set seed_points_per_hour = 0, seed_bonus_per_hour = 0, seeding_torrent_count = 0, seeding_torrent_size = 0 where seed_points_updated_at < " . sqlesc($seedPointsUpdatedAtMin));
\App\Repositories\CleanupRepository::runBatchJobCalculateUserSeedBonus($requestId);

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.9.11');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2025-11-02');
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.9.13');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2025-12-28');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -3906,10 +3906,12 @@ foreach ($rows as $row)
if (user_can('torrentmanage'))
{
$actions = [];
if (user_can('torrent-delete')) {
print("<td class=\"rowfollow\"><a href=\"".htmlspecialchars("fastdelete.php?id=".$row['id'])."\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"".$lang_functions['text_delete']."\" /></a>");
$actions[] = "<a href=\"".htmlspecialchars("fastdelete.php?id=".$row['id'])."\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"".$lang_functions['text_delete']."\" /></a>";
}
print("<br /><a href=\"edit.php?returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><img class=\"staff_edit\" src=\"pic/trans.gif\" alt=\"E\" title=\"".$lang_functions['text_edit']."\" /></a></td>\n");
$actions[] = "<a href=\"edit.php?returnto=" . rawurlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><img class=\"staff_edit\" src=\"pic/trans.gif\" alt=\"E\" title=\"".$lang_functions['text_edit']."\" /></a>";
echo sprintf("<td class=\"rowfollow\">%s</td>", implode("<br />", $actions));
}
print("</tr>\n");
$counter++;

View File

@@ -1668,6 +1668,14 @@ JS;
\Nexus\Nexus::js($js, 'footer', false);
}
function nexus_escape($data): array|string
{
if (is_array($data)) {
return array_map('nexus_escape', $data);
}
return htmlspecialchars($data, ENT_QUOTES, 'UTF-8');
}
function is_fpm_mode(): bool
{
return php_sapi_name() === 'fpm-fcgi';