mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 05:43:55 -07:00
Compare commits
16 commits
Author | SHA1 | Date | |
---|---|---|---|
|
986d198aaf |
||
|
12ce6e783e |
||
|
8c161ceae0 |
||
|
896cf6c3d6 | ||
|
dc64426574 |
||
|
b7bc7f9166 |
||
|
403fcf2aca |
||
|
de9f5e2cb1 |
||
|
6a1d682385 |
||
|
faf3d79192 |
||
|
7dc69ba699 |
||
|
2a8b6daecf |
||
|
7d9594eeda |
||
|
15f9948403 |
||
|
ce1f35c2b5 | ||
|
a8e252f64f |
16 changed files with 96 additions and 122 deletions
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
@ -3,7 +3,7 @@ name: Continuous Integration
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- v2.4
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
nightly:
|
nightly:
|
||||||
|
@ -44,37 +44,5 @@ jobs:
|
||||||
- name: Upload Archive 📤
|
- name: Upload Archive 📤
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: TorrentPier-master
|
name: TorrentPier-v2.4
|
||||||
path: ${{ steps.create-zip.outputs.ZIP_NAME }}
|
path: ${{ steps.create-zip.outputs.ZIP_NAME }}
|
||||||
|
|
||||||
deploy:
|
|
||||||
name: 🎉 Deploy
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: 🚚 Get latest code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 🔩 Setup PHP
|
|
||||||
uses: shivammathur/setup-php@v2
|
|
||||||
with:
|
|
||||||
php-version: '8.1'
|
|
||||||
|
|
||||||
- name: Update composer.lock file
|
|
||||||
run: composer update --no-install
|
|
||||||
|
|
||||||
- name: 🖇 Install Composer dependencies
|
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
||||||
|
|
||||||
- name: 📂 Sync files
|
|
||||||
uses: SamKirkland/FTP-Deploy-Action@v4.3.5
|
|
||||||
with:
|
|
||||||
server: ${{ secrets.FTP_SERVER }}
|
|
||||||
username: ${{ secrets.FTP_USERNAME }}
|
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
|
||||||
server-dir: ${{ secrets.FTP_DIR }}
|
|
||||||
protocol: ${{ secrets.FTP_PROTOCOL }}
|
|
||||||
port: ${{ secrets.FTP_PORT }}
|
|
||||||
exclude: |
|
|
||||||
**/.git*
|
|
||||||
**/.git*/**
|
|
||||||
.env
|
|
||||||
|
|
4
.github/workflows/phpmd.yml
vendored
4
.github/workflows/phpmd.yml
vendored
|
@ -17,10 +17,10 @@ name: PHPMD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "v2.4" ]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
# The branches below must be a subset of the branches above
|
||||||
branches: [ "master" ]
|
branches: [ "v2.4" ]
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '40 0 * * 3'
|
- cron: '40 0 * * 3'
|
||||||
|
|
||||||
|
|
8
.github/workflows/schedule.yml
vendored
8
.github/workflows/schedule.yml
vendored
|
@ -14,7 +14,7 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: master
|
ref: v2.4
|
||||||
token: ${{ secrets.REPO_TOKEN }}
|
token: ${{ secrets.REPO_TOKEN }}
|
||||||
|
|
||||||
- name: Generate a changelog
|
- name: Generate a changelog
|
||||||
|
@ -32,10 +32,10 @@ jobs:
|
||||||
|
|
||||||
- name: Commit changelog
|
- name: Commit changelog
|
||||||
run: |
|
run: |
|
||||||
git checkout master
|
git checkout v2.4
|
||||||
git config --local user.name 'belomaxorka'
|
git config --local user.name 'belomaxorka'
|
||||||
git config --local user.email 'roman25052006.kelesh@gmail.com'
|
git config --local user.email 'roman25052006.kelesh@gmail.com'
|
||||||
set +e
|
set +e
|
||||||
git add CHANGELOG.md
|
git add CHANGELOG.md
|
||||||
git commit -m "Update CHANGELOG.md 📖"
|
git commit -m "changelog: Update CHANGELOG.md 📖"
|
||||||
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git master
|
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git v2.4
|
||||||
|
|
30
CHANGELOG.md
30
CHANGELOG.md
|
@ -2,7 +2,28 @@
|
||||||
|
|
||||||
# 📖 Change Log
|
# 📖 Change Log
|
||||||
|
|
||||||
## [nightly](https://nightly.link/torrentpier/torrentpier/workflows/ci/master/TorrentPier-master)
|
## [v2.4.7](https://github.com/torrentpier/torrentpier/compare/v2.4.6..v2.4.7) (2025-06-24)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(filelist)* `Undefined property: FileTree::$length` when v2 torrent only ([#2004](https://github.com/torrentpier/torrentpier/pull/2004)) - ([8c161ce](https://github.com/torrentpier/torrentpier/commit/8c161ceae0f80a3ffe57da06dbadd1f9a53272f3))
|
||||||
|
- *(ip-api)* Add error handling and logging for freeipapi.com requests ([#2006](https://github.com/torrentpier/torrentpier/pull/2006)) - ([12ce6e7](https://github.com/torrentpier/torrentpier/commit/12ce6e783ec97a6c3df0e11273944a3e6cfe466d))
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- Changed nightly.link url in `README.md` ([#1977](https://github.com/torrentpier/torrentpier/pull/1977)) - ([dc64426](https://github.com/torrentpier/torrentpier/commit/dc64426574087e69bc7e056a89ff367438e37344))
|
||||||
|
- Updated `Requirements` sections in README.md ([#1975](https://github.com/torrentpier/torrentpier/pull/1975)) - ([b7bc7f9](https://github.com/torrentpier/torrentpier/commit/b7bc7f91662b050082843d18b03376dc67efa3e0))
|
||||||
|
- Fixed some typos in `README.md` ([#1974](https://github.com/torrentpier/torrentpier/pull/1974)) - ([403fcf2](https://github.com/torrentpier/torrentpier/commit/403fcf2aca4b2d70bfca194107f4b4f5c5ba7f03))
|
||||||
|
|
||||||
|
|
||||||
|
## [v2.4.6](https://github.com/torrentpier/torrentpier/compare/v2.4.6-alpha.4..v2.4.6) (2025-06-19)
|
||||||
|
|
||||||
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
|
- *(installer)* Strip protocol from TP_HOST to keep only hostname ([#1969](https://github.com/torrentpier/torrentpier/pull/1969)) - ([15f9948](https://github.com/torrentpier/torrentpier/commit/15f994840331b135cd64c0cd61de95fecfc29db8))
|
||||||
|
- *(sql)* Resolve `only_full_group_by` compatibility issues in tracker cleanup - ([faf3d79](https://github.com/torrentpier/torrentpier/commit/faf3d7919249d869d8ca8d41617dd4356dc0ac48))
|
||||||
|
- Duplicate column SQL query issues in `viewtopic.php` ([#1973](https://github.com/torrentpier/torrentpier/pull/1973)) - ([6a1d682](https://github.com/torrentpier/torrentpier/commit/6a1d6823856dd7c3cef45bea2681828526d1b9f8))
|
||||||
|
- SQL queries in online_userlist.php to use MAX() for session data and adjusted GROUP BY clause for better accuracy ([#1971](https://github.com/torrentpier/torrentpier/pull/1971)) - ([2a8b6da](https://github.com/torrentpier/torrentpier/commit/2a8b6daecf63752b8a852c950e9a7fd08e17f57c))
|
||||||
|
|
||||||
### 📦 Dependencies
|
### 📦 Dependencies
|
||||||
|
|
||||||
|
@ -11,7 +32,14 @@
|
||||||
### ⚙️ Miscellaneous
|
### ⚙️ Miscellaneous
|
||||||
|
|
||||||
- *(_release.php)* Finally! Removed some useless params ([#1947](https://github.com/torrentpier/torrentpier/pull/1947)) - ([9c7d270](https://github.com/torrentpier/torrentpier/commit/9c7d270598c0153fb82f4b7ad96f5b59399b2159))
|
- *(_release.php)* Finally! Removed some useless params ([#1947](https://github.com/torrentpier/torrentpier/pull/1947)) - ([9c7d270](https://github.com/torrentpier/torrentpier/commit/9c7d270598c0153fb82f4b7ad96f5b59399b2159))
|
||||||
|
- *(cliff)* Add conventional commit prefix to changelog message ([#1970](https://github.com/torrentpier/torrentpier/pull/1970)) - ([7d9594e](https://github.com/torrentpier/torrentpier/commit/7d9594eedab1b2c81d888dfba68ded1b8a142282))
|
||||||
|
- Changed active branch name in `_release.php` ([#1972](https://github.com/torrentpier/torrentpier/pull/1972)) - ([7dc69ba](https://github.com/torrentpier/torrentpier/commit/7dc69ba699c75d87c709a799291c4b544b3e92aa))
|
||||||
|
- Changed branch name from `master` to `v2.4` ([#1968](https://github.com/torrentpier/torrentpier/pull/1968)) - ([a8e252f](https://github.com/torrentpier/torrentpier/commit/a8e252f64f7205b7bb24739ab637144c6fb022d6))
|
||||||
|
|
||||||
|
## New Contributors ❤️
|
||||||
|
|
||||||
|
* @belomaxorka made their first contribution
|
||||||
|
* @dependabot[bot] made their first contribution in [#1948](https://github.com/torrentpier/torrentpier/pull/1948)
|
||||||
|
|
||||||
## [v2.4.6-alpha.4](https://github.com/torrentpier/torrentpier/compare/v2.4.6-alpha.3..v2.4.6-alpha.4) (2025-06-13)
|
## [v2.4.6-alpha.4](https://github.com/torrentpier/torrentpier/compare/v2.4.6-alpha.3..v2.4.6-alpha.4) (2025-06-13)
|
||||||
|
|
||||||
|
|
16
README.md
16
README.md
|
@ -9,12 +9,12 @@
|
||||||
<a href="https://github.com/torrentpier/torrentpier/blob/master/LICENSE"><img src="https://img.shields.io/github/license/torrentpier/torrentpier" alt="License"></a>
|
<a href="https://github.com/torrentpier/torrentpier/blob/master/LICENSE"><img src="https://img.shields.io/github/license/torrentpier/torrentpier" alt="License"></a>
|
||||||
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/stars/torrentpier/torrentpier" alt="Stars Packagist"></a>
|
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/stars/torrentpier/torrentpier" alt="Stars Packagist"></a>
|
||||||
<a href="https://crowdin.com/project/torrentpier"><img src="https://badges.crowdin.net/torrentpier/localized.svg" alt="Crowdin"></a>
|
<a href="https://crowdin.com/project/torrentpier"><img src="https://badges.crowdin.net/torrentpier/localized.svg" alt="Crowdin"></a>
|
||||||
<a href="https://nightly.link/torrentpier/torrentpier/workflows/ci/master/TorrentPier-master"><img src="https://img.shields.io/badge/Nightly%20release-gray?logo=hackthebox&logoColor=fff" alt="TorrentPier nightly"></a>
|
<a href="https://nightly.link/torrentpier/torrentpier/workflows/ci/v2.4/TorrentPier-v2.4"><img src="https://img.shields.io/badge/Nightly%20release-gray?logo=hackthebox&logoColor=fff" alt="TorrentPier nightly"></a>
|
||||||
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/dt/torrentpier/torrentpier" alt="Downloads"></a>
|
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/dt/torrentpier/torrentpier" alt="Downloads"></a>
|
||||||
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/v/torrentpier/torrentpier" alt="Version"></a>
|
<a href="https://packagist.org/packages/torrentpier/torrentpier"><img src="https://img.shields.io/packagist/v/torrentpier/torrentpier" alt="Version"></a>
|
||||||
<a href="https://github.com/torrentpier/torrentpier/releases"><img src="https://img.shields.io/github/release-date/torrentpier/torrentpier" alt="Last release"></a>
|
<a href="https://github.com/torrentpier/torrentpier/releases"><img src="https://img.shields.io/github/release-date/torrentpier/torrentpier" alt="Last release"></a>
|
||||||
<img src="https://img.shields.io/github/repo-size/torrentpier/torrentpier" alt="Size">
|
<img src="https://img.shields.io/github/repo-size/torrentpier/torrentpier" alt="Size">
|
||||||
<a href="https://github.com/SamKirkland/FTP-Deploy-Action"><img src="https://img.shields.io/badge/Deployed to TorrentPier Demo with-FTP DEPLOY ACTION-%3CCOLOR%3E?color=2b9348" alt="Deployed to TorrentPier Demo with FTP Deploy Action"></a>
|
<a href="https://github.com/SamKirkland/FTP-Deploy-Action"><img src="https://img.shields.io/badge/Deployed%20with-FTP%20DEPLOY%20ACTION-2b9348" alt="Deployed with FTP Deploy Action"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
## 🐂 About TorrentPier
|
## 🐂 About TorrentPier
|
||||||
|
@ -26,8 +26,8 @@ architecture. In addition, we have a very helpful
|
||||||
## 🌈 Current status
|
## 🌈 Current status
|
||||||
|
|
||||||
TorrentPier is currently in active development. The goal is to remove all legacy code and rewrite the existing code to
|
TorrentPier is currently in active development. The goal is to remove all legacy code and rewrite the existing code to
|
||||||
modern specifications. If you want delve deep into the code, check our [issues](https://github.com/torrentpier/torrentpier/issues)
|
modern specifications. If you want to delve deep into the code, check our [issues](https://github.com/torrentpier/torrentpier/issues)
|
||||||
and go from there. The documentation will be translated to english in the near future, currently russian is the main language of it.
|
and go from there. The documentation will be translated to English in the near future; currently Russian is the main language.
|
||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
* Rich forum with browsing/moderation tools
|
* Rich forum with browsing/moderation tools
|
||||||
|
@ -40,7 +40,7 @@ and go from there. The documentation will be translated to english in the near f
|
||||||
* Bonus points
|
* Bonus points
|
||||||
* Polling system
|
* Polling system
|
||||||
* PM/DM system
|
* PM/DM system
|
||||||
* Multilingual support (Russian and English is currently fully supported, with others in the future)
|
* Multilingual support (Russian and English are currently fully supported, with others in the future)
|
||||||
* Atom/RSS feeds
|
* Atom/RSS feeds
|
||||||
* ... and so MUCH MORE!
|
* ... and so MUCH MORE!
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ and go from there. The documentation will be translated to english in the near f
|
||||||
## 🔧 Requirements
|
## 🔧 Requirements
|
||||||
|
|
||||||
* Apache / nginx ([example config](install/nginx.conf)) / caddy ([example config](install/Caddyfile))
|
* Apache / nginx ([example config](install/nginx.conf)) / caddy ([example config](install/Caddyfile))
|
||||||
* MySQL 5.5.3 or above / MariaDB 10.0 or above / Percona
|
* MySQL 5.5.3 or above (including MySQL 8.0+) / MariaDB 10.0 or above / Percona
|
||||||
* PHP: 8.1 / 8.2 / 8.3 / 8.4
|
* PHP: 8.1 / 8.2 / 8.3 / 8.4
|
||||||
* PHP Extensions: mbstring, gd, bcmath, intl, tidy (optional), xml, xmlwriter
|
* PHP Extensions: mbstring, gd, bcmath, intl, tidy (optional), xml, xmlwriter
|
||||||
* Crontab (Recommended)
|
* Crontab (Recommended)
|
||||||
|
@ -124,13 +124,13 @@ If you discover a security vulnerability within TorrentPier, please follow our [
|
||||||
|
|
||||||
## 📌 Our recommendations
|
## 📌 Our recommendations
|
||||||
|
|
||||||
* *It's recommended to run `cron.php`.* - For significant tracker speed increase it ay be required to replace the built-in cron.php in operating system daemon.
|
* *It's recommended to run `cron.php`.* - For significant tracker speed increase it may be required to replace the built-in cron.php with an operating system daemon.
|
||||||
* *Local configuration copy.* - You can override the settings using the local configuration file `library/config.local.php`.
|
* *Local configuration copy.* - You can override the settings using the local configuration file `library/config.local.php`.
|
||||||
|
|
||||||
## 💚 Contributing / Contributors
|
## 💚 Contributing / Contributors
|
||||||
|
|
||||||
Please read our [contributing policy](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) for details, and the process for
|
Please read our [contributing policy](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) for details, and the process for
|
||||||
submitting pull requests to us. But we are always ready to renew your pull-request for compliance with
|
submitting pull requests to us. But we are always ready to review your pull-request for compliance with
|
||||||
these requirements. Just send it!
|
these requirements. Just send it!
|
||||||
|
|
||||||
<a href="https://github.com/torrentpier/torrentpier/graphs/contributors">
|
<a href="https://github.com/torrentpier/torrentpier/graphs/contributors">
|
||||||
|
|
|
@ -124,7 +124,8 @@ runProcess("git tag -a \"$version\" -m \"Release $version\"");
|
||||||
runProcess("git tag -v \"$version\"");
|
runProcess("git tag -v \"$version\"");
|
||||||
|
|
||||||
// Git push
|
// Git push
|
||||||
runProcess("git push origin master");
|
runProcess("git checkout v2.4");
|
||||||
|
runProcess("git push origin v2.4");
|
||||||
runProcess("git push origin $version");
|
runProcess("git push origin $version");
|
||||||
|
|
||||||
out("\n- Release $version has been successfully prepared, committed and pushed!", 'success');
|
out("\n- Release $version has been successfully prepared, committed and pushed!", 'success');
|
||||||
|
|
|
@ -23,7 +23,7 @@ body = """
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{%- macro nightly_url() -%}
|
{%- macro nightly_url() -%}
|
||||||
https://nightly.link/{{ remote.github.owner }}/{{ remote.github.repo }}/workflows/ci/master/TorrentPier-master
|
https://nightly.link/{{ remote.github.owner }}/{{ remote.github.repo }}/workflows/ci/v2.4/TorrentPier-v2.4
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{% macro print_commit(commit) -%}
|
{% macro print_commit(commit) -%}
|
||||||
|
@ -105,7 +105,7 @@ commit_parsers = [
|
||||||
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
|
||||||
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
|
||||||
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
|
||||||
{ message = "^ignore|^release", skip = true },
|
{ message = "^ignore|^release|^changelog", skip = true },
|
||||||
{ message = "^chore|^ci|^misc", group = "<!-- 7 -->⚙️ Miscellaneous" },
|
{ message = "^chore|^ci|^misc", group = "<!-- 7 -->⚙️ Miscellaneous" },
|
||||||
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
|
||||||
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
|
||||||
|
|
15
filelist.php
15
filelist.php
|
@ -82,7 +82,7 @@ if (IS_GUEST && $torrent->isPrivate()) {
|
||||||
|
|
||||||
// Get torrent files
|
// Get torrent files
|
||||||
$files = $torrent->$t_version_field()->$t_files_field();
|
$files = $torrent->$t_version_field()->$t_files_field();
|
||||||
if ($meta_v1 && $meta_v2) {
|
if ($meta_v2) {
|
||||||
$files = new \RecursiveIteratorIterator($files); // Flatten the list
|
$files = new \RecursiveIteratorIterator($files); // Flatten the list
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,19 +102,6 @@ foreach ($files as $file) {
|
||||||
$torrent_name = !empty($t_name = $torrent->getName()) ? str_short(htmlCHR($t_name), 200) : $lang['UNKNOWN'];
|
$torrent_name = !empty($t_name = $torrent->getName()) ? str_short(htmlCHR($t_name), 200) : $lang['UNKNOWN'];
|
||||||
$torrent_size = humn_size($row['size'], 2);
|
$torrent_size = humn_size($row['size'], 2);
|
||||||
|
|
||||||
// Get announcers list
|
|
||||||
$announcers_list = $torrent->getAnnounceList()->toArray();
|
|
||||||
$announcers_count = 0;
|
|
||||||
foreach ($announcers_list as $announcer) {
|
|
||||||
$announcers_count++;
|
|
||||||
$row_class = ($announcers_count % 2) ? 'row1' : 'row2';
|
|
||||||
$template->assign_block_vars('announcers', [
|
|
||||||
'ROW_NUMBER' => $announcers_count,
|
|
||||||
'ROW_CLASS' => $row_class,
|
|
||||||
'ANNOUNCER' => $announcer[0]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output page
|
// Output page
|
||||||
$template->assign_vars([
|
$template->assign_vars([
|
||||||
'PAGE_TITLE' => "$torrent_name (" . $torrent_size . ")",
|
'PAGE_TITLE' => "$torrent_name (" . $torrent_size . ")",
|
||||||
|
|
|
@ -206,6 +206,12 @@ if (is_file(BB_ROOT . '.env')) {
|
||||||
$newValue = trim(readline());
|
$newValue = trim(readline());
|
||||||
|
|
||||||
if (!empty($newValue) || $key === 'DB_PASSWORD') {
|
if (!empty($newValue) || $key === 'DB_PASSWORD') {
|
||||||
|
if ($key === 'TP_HOST') {
|
||||||
|
if (!preg_match('/^https?:\/\//', $newValue)) {
|
||||||
|
$newValue = 'https://' . $newValue;
|
||||||
|
}
|
||||||
|
$newValue = parse_url($newValue, PHP_URL_HOST);
|
||||||
|
}
|
||||||
$line = "$key=$newValue";
|
$line = "$key=$newValue";
|
||||||
$$key = $newValue;
|
$$key = $newValue;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -475,6 +475,8 @@ if ($tor_reged && $tor_info) {
|
||||||
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
|
if ($infoByIP = infoByIP((!empty($peer['ipv6']) ? $peer['ipv6'] : $peer['ip']), $peer['port'])) {
|
||||||
if (!empty($infoByIP['countryCode'])) {
|
if (!empty($infoByIP['countryCode'])) {
|
||||||
$peerCountry = render_flag($infoByIP['countryCode'], false);
|
$peerCountry = render_flag($infoByIP['countryCode'], false);
|
||||||
|
} else {
|
||||||
|
$peerCountry = $lang['NOT_AVAILABLE'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,8 @@ $reserved_port = env('TP_PORT', 80);
|
||||||
$bb_cfg = [];
|
$bb_cfg = [];
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
$bb_cfg['tp_version'] = 'v2.4.6-alpha.4';
|
$bb_cfg['tp_version'] = 'v2.4.7';
|
||||||
$bb_cfg['tp_release_date'] = '13-06-2025';
|
$bb_cfg['tp_release_date'] = '24-06-2025';
|
||||||
$bb_cfg['tp_release_codename'] = 'Cattle';
|
$bb_cfg['tp_release_codename'] = 'Cattle';
|
||||||
|
|
||||||
// Increase version number after changing JS or CSS
|
// Increase version number after changing JS or CSS
|
||||||
|
|
|
@ -39,7 +39,7 @@ if ($bb_cfg['tracker']['update_dlstat']) {
|
||||||
INSERT INTO " . NEW_BB_BT_LAST_TORSTAT . "
|
INSERT INTO " . NEW_BB_BT_LAST_TORSTAT . "
|
||||||
(topic_id, user_id, dl_status, up_add, down_add, release_add, speed_up, speed_down)
|
(topic_id, user_id, dl_status, up_add, down_add, release_add, speed_up, speed_down)
|
||||||
SELECT
|
SELECT
|
||||||
topic_id, user_id, IF(releaser, $releaser, seeder), SUM(up_add), SUM(down_add), IF(releaser, SUM(up_add), 0), SUM(speed_up), SUM(speed_down)
|
topic_id, user_id, IF(MAX(releaser), $releaser, MAX(seeder)), SUM(up_add), SUM(down_add), IF(MAX(releaser), SUM(up_add), 0), SUM(speed_up), SUM(speed_down)
|
||||||
FROM " . BB_BT_TRACKER . "
|
FROM " . BB_BT_TRACKER . "
|
||||||
WHERE (up_add != 0 OR down_add != 0)
|
WHERE (up_add != 0 OR down_add != 0)
|
||||||
GROUP BY topic_id, user_id
|
GROUP BY topic_id, user_id
|
||||||
|
@ -61,7 +61,6 @@ DB()->query("
|
||||||
FROM " . BB_BT_TRACKER . "
|
FROM " . BB_BT_TRACKER . "
|
||||||
WHERE seeder = 1
|
WHERE seeder = 1
|
||||||
GROUP BY topic_id, user_id
|
GROUP BY topic_id, user_id
|
||||||
ORDER BY update_time DESC
|
|
||||||
");
|
");
|
||||||
|
|
||||||
// Clean peers table
|
// Clean peers table
|
||||||
|
|
|
@ -2210,6 +2210,8 @@ function infoByIP(string $ipAddress, int $port = 0): array
|
||||||
}
|
}
|
||||||
|
|
||||||
$context = stream_context_create($contextOptions);
|
$context = stream_context_create($contextOptions);
|
||||||
|
|
||||||
|
try {
|
||||||
$response = file_get_contents($bb_cfg['ip2country_settings']['endpoint'] . $ipAddress, context: $context);
|
$response = file_get_contents($bb_cfg['ip2country_settings']['endpoint'] . $ipAddress, context: $context);
|
||||||
|
|
||||||
if ($response !== false) {
|
if ($response !== false) {
|
||||||
|
@ -2223,6 +2225,11 @@ function infoByIP(string $ipAddress, int $port = 0): array
|
||||||
'continentCode' => $json['continentCode']
|
'continentCode' => $json['continentCode']
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
bb_log("[FreeIPAPI] Failed to get IP info for: $ipAddress");
|
||||||
|
}
|
||||||
|
} catch (Exception $e) {
|
||||||
|
bb_log("[FreeIPAPI] " . $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
|
|
@ -36,11 +36,11 @@ $online = $online_short = ['userlist' => ''];
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
u.username, u.user_id, u.user_opt, u.user_rank, u.user_level,
|
u.username, u.user_id, u.user_opt, u.user_rank, u.user_level,
|
||||||
s.session_logged_in, s.session_ip, (s.session_time - s.session_start) AS ses_len, COUNT(s.session_id) AS sessions, COUNT(DISTINCT s.session_ip) AS ips
|
MAX(s.session_logged_in) AS session_logged_in, MAX(s.session_ip) AS session_ip, MAX(s.session_time - s.session_start) AS ses_len, COUNT(s.session_id) AS sessions, COUNT(DISTINCT s.session_ip) AS ips
|
||||||
FROM " . BB_SESSIONS . " s, " . BB_USERS . " u
|
FROM " . BB_SESSIONS . " s, " . BB_USERS . " u
|
||||||
WHERE s.session_time > $time_online
|
WHERE s.session_time > $time_online
|
||||||
AND u.user_id = s.session_user_id
|
AND u.user_id = s.session_user_id
|
||||||
GROUP BY s.session_user_id
|
GROUP BY s.session_user_id, u.username, u.user_id, u.user_opt, u.user_rank, u.user_level
|
||||||
ORDER BY u.username
|
ORDER BY u.username
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
|
@ -6,30 +6,6 @@
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<h1 class="pagetitle">{L_BT_FLIST_ANNOUNCERS_LIST}</h1>
|
|
||||||
<table class="forumline">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>{L_BT_FLIST_ANNOUNCERS}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<!-- BEGIN announcers -->
|
|
||||||
<tbody>
|
|
||||||
<tr class="{announcers.ROW_CLASS} tCenter">
|
|
||||||
<td>{announcers.ROW_NUMBER}</td>
|
|
||||||
<td>{announcers.ANNOUNCER}</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<!-- END announcers -->
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td class="catBottom warnColor1" colspan="2">{L_BT_FLIST_ANNOUNCERS_NOTICE}</td>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<h1 class="pagetitle">{L_BT_FLIST}</h1>
|
<h1 class="pagetitle">{L_BT_FLIST}</h1>
|
||||||
<table class="forumline">
|
<table class="forumline">
|
||||||
<thead>
|
<thead>
|
||||||
|
|
|
@ -85,17 +85,17 @@ if ($topic_id && isset($_GET['view']) && ($_GET['view'] == 'next' || $_GET['view
|
||||||
|
|
||||||
// Get forum/topic data
|
// Get forum/topic data
|
||||||
if ($topic_id) {
|
if ($topic_id) {
|
||||||
$sql = "SELECT t.*, f.*, tw.notify_status
|
$sql = "SELECT t.*, f.cat_id, f.forum_name, f.forum_desc, f.forum_status, f.forum_order, f.forum_posts, f.forum_topics, f.forum_last_post_id, f.forum_tpl_id, f.prune_days, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_vote, f.auth_pollcreate, f.auth_attachments, f.auth_download, f.allow_reg_tracker, f.allow_porno_topic, f.self_moderated, f.forum_parent, f.show_on_index, f.forum_display_sort, f.forum_display_order, tw.notify_status
|
||||||
FROM " . BB_TOPICS . " t
|
FROM " . BB_TOPICS . " t
|
||||||
LEFT JOIN " . BB_FORUMS . " f USING(forum_id)
|
LEFT JOIN " . BB_FORUMS . " f ON t.forum_id = f.forum_id
|
||||||
LEFT JOIN " . BB_TOPICS_WATCH . " tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
LEFT JOIN " . BB_TOPICS_WATCH . " tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
||||||
WHERE t.topic_id = $topic_id
|
WHERE t.topic_id = $topic_id
|
||||||
";
|
";
|
||||||
} elseif ($post_id) {
|
} elseif ($post_id) {
|
||||||
$sql = "SELECT t.*, f.*, p.post_time, tw.notify_status
|
$sql = "SELECT t.*, f.cat_id, f.forum_name, f.forum_desc, f.forum_status, f.forum_order, f.forum_posts, f.forum_topics, f.forum_last_post_id, f.forum_tpl_id, f.prune_days, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_vote, f.auth_pollcreate, f.auth_attachments, f.auth_download, f.allow_reg_tracker, f.allow_porno_topic, f.self_moderated, f.forum_parent, f.show_on_index, f.forum_display_sort, f.forum_display_order, p.post_time, tw.notify_status
|
||||||
FROM " . BB_TOPICS . " t
|
FROM " . BB_TOPICS . " t
|
||||||
LEFT JOIN " . BB_FORUMS . " f USING(forum_id)
|
LEFT JOIN " . BB_FORUMS . " f ON t.forum_id = f.forum_id
|
||||||
LEFT JOIN " . BB_POSTS . " p USING(topic_id)
|
LEFT JOIN " . BB_POSTS . " p ON t.topic_id = p.topic_id
|
||||||
LEFT JOIN " . BB_TOPICS_WATCH . " tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
LEFT JOIN " . BB_TOPICS_WATCH . " tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
|
||||||
WHERE p.post_id = $post_id
|
WHERE p.post_id = $post_id
|
||||||
";
|
";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue