Commit Graph

1730 Commits

Author SHA1 Message Date
Qi HU
d9f1612e8e fix: Fix duplicate includes in app.php
When we use `php artisan optimize` command, it will cause duplicate includes:
```
PHP Fatal error:  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3) in include/globalfunctions.php on line 3

   Symfony\Component\ErrorHandler\Error\FatalError

  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3)

  at include/globalfunctions.php:3
      1▕ <?php
      2▕
  ➜   3▕ function get_global_sp_state()
      4▕ {
      5▕        static $global_promotion_state;
      6▕        $cacheKey = \App\Models\Setting::TORRENT_GLOBAL_STATE_CACHE_KEY;
      7▕        if (is_null($global_promotion_state)) {
      8▕         $row = \Nexus\Database\NexusDB::remember($cacheKey, 600, function () use ($cacheKey) {
      9▕             return \Nexus\Database\NexusDB::getOne('torrents_state', 1);

   Whoops\Exception\ErrorException

  Cannot redeclare function get_global_sp_state() (previously declared in include/globalfunctions.php:3)

  at include/globalfunctions.php:3
      1▕ <?php
      2▕
  ➜   3▕ function get_global_sp_state()
      4▕ {
      5▕        static $global_promotion_state;
      6▕        $cacheKey = \App\Models\Setting::TORRENT_GLOBAL_STATE_CACHE_KEY;
      7▕        if (is_null($global_promotion_state)) {
      8▕         $row = \Nexus\Database\NexusDB::remember($cacheKey, 600, function () use ($cacheKey) {
      9▕             return \Nexus\Database\NexusDB::getOne('torrents_state', 1);

      +1 vendor frames

  2   [internal]:0
      Whoops\Run::handleShutdown()
```

So we should use `require_once` instead of `require` to avoid this issue.

Signed-off-by: Qi HU <github@spcsky.com>
2025-10-02 21:46:24 +08:00
SPC
0f089d39ab fix: style for staff.php and lang_functions.php
Signed-off-by: SPC <github@spcsky.com>
2025-10-02 21:43:45 +08:00
xiaomlove
4f597e93dd update filament to v4.1 2025-10-02 14:58:30 +07:00
xiaomlove
0d96380d60 Merge pull request #377 from ex-hentai/filament-v4
update filament to v4
2025-10-01 20:53:33 +07:00
xiaomlove
612e83744f warning fix 2025-10-01 12:01:53 +07:00
xiaomlove
e085d52679 mybonus.php add min size description 2025-10-01 03:14:42 +07:00
xiaomlove
86f57ed313 announce add warning message: please select tracker url at user control panel 2025-10-01 02:50:22 +07:00
xiaomlove
717f7c5a30 fix magic.php + improve TrackerUrl::getById() 2025-10-01 02:41:45 +07:00
xiaomlove
598457db48 api return queries when debug 2025-09-29 00:55:07 +07:00
NekoCH
532f3bdb3f migration script
# Conflicts:
#	app/Filament/Resources/Torrent/AnnounceLogResource.php
2025-09-27 12:29:50 +08:00
NekoCH
f0b50e4826 update filament to v4
fix torrent name
2025-09-27 12:29:50 +08:00
xiaomlove
3f04ae4163 API add more log 2025-09-27 03:28:27 +07:00
xiaomlove
ee46b762eb reAnnounce log use info hash hex 2025-09-26 13:47:38 +07:00
xiaomlove
c6c74354c6 fix users seeding_torrent_count 2025-09-24 14:46:14 +07:00
xiaomlove
8b3cc2fe3f shoutbox cancel writeLog 2025-09-23 19:25:29 +07:00
xiaomlove
30e5e305bb misc fix 2025-09-23 17:12:20 +07:00
xiaomlove
c1845f276b update translations 2025-09-23 11:53:30 +07:00
xiaomlove
38688178b6 last_query() default return json string 2025-09-23 11:27:30 +07:00
xiaomlove
ba1cc0f2bd update .env when run nexus:update 2025-09-22 20:58:08 +07:00
xiaomlove
5cec527a12 torrents.php pageSize max 100 2025-09-22 20:26:08 +07:00
xiaomlove
3b45ce7c15 Merge pull request #378 from JustLookAtNow/JustLookAtNow-patch-pageSize
种子列表页支持传参动态设置每页条数
2025-09-22 20:16:57 +07:00
xiaomlove
f30112264a announce log menu only show when enabled 2025-09-22 20:13:56 +07:00
今夕是何年
03002e52f1 Update torrents.php
Supports dynamic pagination parameters.
2025-09-22 21:09:06 +08:00
xiaomlove
d906f73b03 fetch imdb del cover cache 2025-09-21 19:42:38 +07:00
xiaomlove
6b242dea36 make print_attachment() available on laravel mode 2025-09-21 19:26:24 +07:00
xiaomlove
1b2ba8dc48 improve sql debug 2025-09-21 17:00:32 +07:00
xiaomlove
3dca0e5774 Merge remote-tracking branch 'origin/php8' into php8 2025-09-21 14:43:16 +07:00
xiaomlove
c74c36d434 complains.php + confirm_resend.php add lock 2025-09-21 14:43:00 +07:00
xiaomlove
7ced229fca Merge pull request #376 from koalang/php8
优化BDInfo提取逻辑
2025-09-21 14:27:24 +07:00
tonghoil
dfcd2d9391 修复种子页面评论引用用户不存在时报错问题 2025-09-21 15:14:17 +08:00
tonghoil
5e2a341a79 improve BDInfo Extraction
1. 优化BDInfo中HDR和DIY字幕/音轨备注的提取
2. 修正Extras的翻译
2025-09-21 15:14:17 +08:00
xiaomlove
d16a864841 torrentrss add cache by sql 2025-09-21 00:34:41 +07:00
xiaomlove
409b734d3a torrents.php list sql debug 2025-09-20 19:41:29 +07:00
xiaomlove
f675d4e2d4 improve torrents + torrentrss 2025-09-20 17:22:53 +07:00
xiaomlove
ee4739fd8b fix cover issue on page torrents.php 2025-09-20 00:45:53 +07:00
xiaomlove
41ad91b183 create clickhouse table bonus_log 2025-09-19 21:08:21 +07:00
xiaomlove
8bdcacf8e7 seeding bonus log save to click house 2025-09-19 21:02:34 +07:00
xiaomlove
90c973f608 fix quote post + improve color bbcode 2025-09-17 21:22:42 +07:00
xiaomlove
4dd09b662a Merge remote-tracking branch 'origin/php8' into php8 2025-09-17 17:11:29 +07:00
xiaomlove
bb25eb03c7 improve userdetails page hide_text 2025-09-17 17:11:17 +07:00
xiaomlove
51792dd657 Merge pull request #375 from koalang/php8
Update BdInfoExtra.php
2025-09-17 17:09:34 +07:00
xiaomlove
29a9fd48a4 Merge pull request #374 from ex-hentai/spoiler
use details summary for spoiler
2025-09-17 17:08:40 +07:00
Koala Ng
3363d1585e Update BdInfoExtra.php
1. 兼容BDInfo 0.8.0.1 Beta
2. 删除冗余代码
2025-09-17 18:05:33 +08:00
NekoCH
bc96f53060 use details summary for spoiler 2025-09-17 17:42:17 +08:00
xiaomlove
aad29df97b Merge pull request #373 from ex-hentai/bbcode
support more bbcode tags
2025-09-17 13:55:29 +07:00
NekoCH
7376bbba8c hide passkey and ip addresses 2025-09-17 11:12:19 +08:00
NekoCH
08f879a5b9 support more bbcode tags
audio/video/hide/hr/strikethrough
2025-09-17 11:10:46 +08:00
xiaomlove
2447469ea0 fix shoutbox not login warning 2025-09-17 04:41:48 +07:00
xiaomlove
01c612530c fix shoutbox refresh interval 2025-09-17 04:37:47 +07:00
xiaomlove
5a43da0ae0 remove invite.php duplicate seeding_points_per_hour 2025-09-17 04:07:07 +07:00