tag add description

This commit is contained in:
xiaomlove
2023-01-11 05:05:18 +08:00
parent d7d63c8fd2
commit 1ff92df6d2
6 changed files with 41 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.8.0');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-01-10');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2023-01-11');
defined('IN_TRACKER') || define('IN_TRACKER', false);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -6336,8 +6336,11 @@ function build_search_area($searchArea, array $options = [])
return $result;
}
function torrent_name_for_admin(\App\Models\Torrent $torrent, $withTags = false)
function torrent_name_for_admin(\App\Models\Torrent|null $torrent, $withTags = false)
{
if (empty($torrent)) {
return '';
}
$name = sprintf(
'<div class="text-primary-600 transition hover:underline hover:text-primary-500 focus:underline focus:text-primary-500"><a href="/details.php?id=%s" target="_blank" title="%s">%s</a></div>',
$torrent->id, $torrent->name, Str::limit($torrent->name, 40)