mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
commit
566b99fbcd
248 changed files with 6388 additions and 8303 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,9 +1,7 @@
|
||||||
### TorrentPier ###
|
### TorrentPier ###
|
||||||
.idea
|
.idea
|
||||||
.php_cs.cache
|
.php_cs.cache
|
||||||
bower_components
|
|
||||||
composer.phar
|
composer.phar
|
||||||
composer.lock
|
|
||||||
configs/local.php
|
configs/local.php
|
||||||
data/avatars
|
data/avatars
|
||||||
data/torrent_files
|
data/torrent_files
|
||||||
|
@ -14,13 +12,10 @@ internal_data/log
|
||||||
internal_data/sitemap
|
internal_data/sitemap
|
||||||
internal_data/triggers
|
internal_data/triggers
|
||||||
library/config.local.php
|
library/config.local.php
|
||||||
node_modules
|
|
||||||
vendor
|
vendor
|
||||||
yarn.lock
|
|
||||||
|
|
||||||
### Archives ###
|
### Archives ###
|
||||||
*.log
|
*.log
|
||||||
*.zip
|
|
||||||
*.rar
|
*.rar
|
||||||
*.tar
|
*.tar
|
||||||
*.gz
|
*.gz
|
||||||
|
|
240
CHANGELOG.md
240
CHANGELOG.md
|
@ -1,49 +1,71 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
## [v2.3.0](https://github.com/torrentpier/torrentpier/tree/v2.3.0) (2018-06-26)
|
||||||
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.3...v2.3.0)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- Release preparation. Crowdin language pack update [\#468](https://github.com/torrentpier/torrentpier/pull/468) ([Exileum](https://github.com/Exileum))
|
||||||
|
- PHP 7+ deprecations of old cache systems [\#467](https://github.com/torrentpier/torrentpier/pull/467) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix global atom feed name [\#466](https://github.com/torrentpier/torrentpier/pull/466) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Configurable download torrent url [\#465](https://github.com/torrentpier/torrentpier/pull/465) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix some bugs with MySQL strict mode [\#464](https://github.com/torrentpier/torrentpier/pull/464) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix release template editor [\#463](https://github.com/torrentpier/torrentpier/pull/463) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix multiple variable cleanup in private messaging [\#462](https://github.com/torrentpier/torrentpier/pull/462) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix magnet link passkey creation for new users [\#461](https://github.com/torrentpier/torrentpier/pull/461) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Update required PHP version to 7.1.3 [\#460](https://github.com/torrentpier/torrentpier/pull/460) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Split functions to the composer autoloading [\#459](https://github.com/torrentpier/torrentpier/pull/459) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Update copyright to the short syntax [\#458](https://github.com/torrentpier/torrentpier/pull/458) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Fix \#451. Undefined index: L\_CRON\_EDIT\_HEAD [\#457](https://github.com/torrentpier/torrentpier/pull/457) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Merge head branches [\#456](https://github.com/torrentpier/torrentpier/pull/456) ([Exileum](https://github.com/Exileum))
|
||||||
|
- Default value for user\_birthday causes exception on user password change [\#449](https://github.com/torrentpier/torrentpier/pull/449) ([yukoff](https://github.com/yukoff))
|
||||||
|
- Add back roave/security-advisories [\#446](https://github.com/torrentpier/torrentpier/pull/446) ([yukoff](https://github.com/yukoff))
|
||||||
|
|
||||||
## [v2.2.3](https://github.com/torrentpier/torrentpier/tree/v2.2.3) (2017-08-07)
|
## [v2.2.3](https://github.com/torrentpier/torrentpier/tree/v2.2.3) (2017-08-07)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.2...v2.2.3)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.2...v2.2.3)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release preparation. Crowdin language pack update [\#442](https://github.com/torrentpier/torrentpier/pull/442) ([Exile37](https://github.com/Exile37))
|
- Release 2.2.3 🔥 [\#443](https://github.com/torrentpier/torrentpier/pull/443) ([Exileum](https://github.com/Exileum))
|
||||||
- Unique topic page title, undefined language variables fix [\#441](https://github.com/torrentpier/torrentpier/pull/441) ([Exile37](https://github.com/Exile37))
|
- Release preparation. Crowdin language pack update [\#442](https://github.com/torrentpier/torrentpier/pull/442) ([Exileum](https://github.com/Exileum))
|
||||||
- Remove matching users with default IP from profile list [\#440](https://github.com/torrentpier/torrentpier/pull/440) ([Exile37](https://github.com/Exile37))
|
- Unique topic page title, undefined language variables fix [\#441](https://github.com/torrentpier/torrentpier/pull/441) ([Exileum](https://github.com/Exileum))
|
||||||
- Broken announcer fix, announcer debug removed [\#439](https://github.com/torrentpier/torrentpier/pull/439) ([Exile37](https://github.com/Exile37))
|
- Remove matching users with default IP from profile list [\#440](https://github.com/torrentpier/torrentpier/pull/440) ([Exileum](https://github.com/Exileum))
|
||||||
- Fix broken ajax [\#436](https://github.com/torrentpier/torrentpier/pull/436) ([Exile37](https://github.com/Exile37))
|
- Broken announcer fix, announcer debug removed [\#439](https://github.com/torrentpier/torrentpier/pull/439) ([Exileum](https://github.com/Exileum))
|
||||||
- Some deprecations, normalize.css, torrent file content sort fix [\#434](https://github.com/torrentpier/torrentpier/pull/434) ([Exile37](https://github.com/Exile37))
|
- Fix broken ajax [\#436](https://github.com/torrentpier/torrentpier/pull/436) ([Exileum](https://github.com/Exileum))
|
||||||
- Incorrect log file rotation regex [\#432](https://github.com/torrentpier/torrentpier/pull/432) ([Exile37](https://github.com/Exile37))
|
- Some deprecations, normalize.css, torrent file content sort fix [\#434](https://github.com/torrentpier/torrentpier/pull/434) ([Exileum](https://github.com/Exileum))
|
||||||
- Various bug fixes described on the forum [\#431](https://github.com/torrentpier/torrentpier/pull/431) ([Exile37](https://github.com/Exile37))
|
- Incorrect log file rotation regex [\#432](https://github.com/torrentpier/torrentpier/pull/432) ([Exileum](https://github.com/Exileum))
|
||||||
- Fixes \#412 - bug with dynamic language variables [\#430](https://github.com/torrentpier/torrentpier/pull/430) ([Exile37](https://github.com/Exile37))
|
- Various bug fixes described on the forum [\#431](https://github.com/torrentpier/torrentpier/pull/431) ([Exileum](https://github.com/Exileum))
|
||||||
- Update .htaccess for new Apache 2.4 syntax [\#429](https://github.com/torrentpier/torrentpier/pull/429) ([Exile37](https://github.com/Exile37))
|
- Fixes \#412 - bug with dynamic language variables [\#430](https://github.com/torrentpier/torrentpier/pull/430) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin language pack update for new project domain name [\#415](https://github.com/torrentpier/torrentpier/pull/415) ([Exile37](https://github.com/Exile37))
|
- Update .htaccess for new Apache 2.4 syntax [\#429](https://github.com/torrentpier/torrentpier/pull/429) ([Exileum](https://github.com/Exileum))
|
||||||
- Composer support section error [\#414](https://github.com/torrentpier/torrentpier/pull/414) ([Exile37](https://github.com/Exile37))
|
- Crowdin language pack update for new project domain name [\#415](https://github.com/torrentpier/torrentpier/pull/415) ([Exileum](https://github.com/Exileum))
|
||||||
- New project domain name [\#413](https://github.com/torrentpier/torrentpier/pull/413) ([Exile37](https://github.com/Exile37))
|
- Composer support section error [\#414](https://github.com/torrentpier/torrentpier/pull/414) ([Exileum](https://github.com/Exileum))
|
||||||
|
- New project domain name [\#413](https://github.com/torrentpier/torrentpier/pull/413) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.2.2](https://github.com/torrentpier/torrentpier/tree/v2.2.2) (2017-06-22)
|
## [v2.2.2](https://github.com/torrentpier/torrentpier/tree/v2.2.2) (2017-06-22)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.1...v2.2.2)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.1...v2.2.2)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release 2.2.2 🌞 [\#410](https://github.com/torrentpier/torrentpier/pull/410) ([Exile37](https://github.com/Exile37))
|
- Release 2.2.2 🌞 [\#410](https://github.com/torrentpier/torrentpier/pull/410) ([Exileum](https://github.com/Exileum))
|
||||||
- Release preparation Crowdin language pack update [\#409](https://github.com/torrentpier/torrentpier/pull/409) ([Exile37](https://github.com/Exile37))
|
- Release preparation Crowdin language pack update [\#409](https://github.com/torrentpier/torrentpier/pull/409) ([Exileum](https://github.com/Exileum))
|
||||||
- Display source language if no user language variable [\#408](https://github.com/torrentpier/torrentpier/pull/408) ([Exile37](https://github.com/Exile37))
|
- Display source language if no user language variable [\#408](https://github.com/torrentpier/torrentpier/pull/408) ([Exileum](https://github.com/Exileum))
|
||||||
- Disable Bugsnag by default [\#407](https://github.com/torrentpier/torrentpier/pull/407) ([Exile37](https://github.com/Exile37))
|
- Disable Bugsnag by default [\#407](https://github.com/torrentpier/torrentpier/pull/407) ([Exileum](https://github.com/Exileum))
|
||||||
- Fix empty birthday list [\#406](https://github.com/torrentpier/torrentpier/pull/406) ([Exile37](https://github.com/Exile37))
|
- Fix empty birthday list [\#406](https://github.com/torrentpier/torrentpier/pull/406) ([Exileum](https://github.com/Exileum))
|
||||||
- Remove unused ranks functionality [\#405](https://github.com/torrentpier/torrentpier/pull/405) ([Exile37](https://github.com/Exile37))
|
- Remove unused ranks functionality [\#405](https://github.com/torrentpier/torrentpier/pull/405) ([Exileum](https://github.com/Exileum))
|
||||||
- Complete renewal of the Ukrainian language from our toloka.to friends [\#404](https://github.com/torrentpier/torrentpier/pull/404) ([Exile37](https://github.com/Exile37))
|
- Complete renewal of the Ukrainian language from our toloka.to friends [\#404](https://github.com/torrentpier/torrentpier/pull/404) ([Exileum](https://github.com/Exileum))
|
||||||
- Some fixes, auto language removal \(so buggy\) and replenishable status [\#403](https://github.com/torrentpier/torrentpier/pull/403) ([Exile37](https://github.com/Exile37))
|
- Some fixes, auto language removal \(so buggy\) and replenishable status [\#403](https://github.com/torrentpier/torrentpier/pull/403) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.2.1](https://github.com/torrentpier/torrentpier/tree/v2.2.1) (2017-06-16)
|
## [v2.2.1](https://github.com/torrentpier/torrentpier/tree/v2.2.1) (2017-06-16)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.0...v2.2.1)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.0...v2.2.1)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release 2.2.1 🐛 [\#392](https://github.com/torrentpier/torrentpier/pull/392) ([Exile37](https://github.com/Exile37))
|
- Release 2.2.1 🐛 [\#392](https://github.com/torrentpier/torrentpier/pull/392) ([Exileum](https://github.com/Exileum))
|
||||||
- Partial renewal of the Ukrainian language from our toloka.to friends [\#391](https://github.com/torrentpier/torrentpier/pull/391) ([Exile37](https://github.com/Exile37))
|
- Partial renewal of the Ukrainian language from our toloka.to friends [\#391](https://github.com/torrentpier/torrentpier/pull/391) ([Exileum](https://github.com/Exileum))
|
||||||
- Create CODE\_OF\_CONDUCT.md [\#390](https://github.com/torrentpier/torrentpier/pull/390) ([Exile37](https://github.com/Exile37))
|
- Create CODE\_OF\_CONDUCT.md [\#390](https://github.com/torrentpier/torrentpier/pull/390) ([Exileum](https://github.com/Exileum))
|
||||||
- Fix default users language in dump [\#389](https://github.com/torrentpier/torrentpier/pull/389) ([Exile37](https://github.com/Exile37))
|
- Fix default users language in dump [\#389](https://github.com/torrentpier/torrentpier/pull/389) ([Exileum](https://github.com/Exileum))
|
||||||
- Tracker search forum list simplification [\#388](https://github.com/torrentpier/torrentpier/pull/388) ([Exile37](https://github.com/Exile37))
|
- Tracker search forum list simplification [\#388](https://github.com/torrentpier/torrentpier/pull/388) ([Exileum](https://github.com/Exileum))
|
||||||
- Fix some notices in admin panel reported by BugSnag [\#387](https://github.com/torrentpier/torrentpier/pull/387) ([Exile37](https://github.com/Exile37))
|
- Fix some notices in admin panel reported by BugSnag [\#387](https://github.com/torrentpier/torrentpier/pull/387) ([Exileum](https://github.com/Exileum))
|
||||||
- Fixed SQL. Remove limit from update [\#368](https://github.com/torrentpier/torrentpier/pull/368) ([VasyOk](https://github.com/VasyOk))
|
- Fixed SQL. Remove limit from update [\#368](https://github.com/torrentpier/torrentpier/pull/368) ([VasyOk](https://github.com/VasyOk))
|
||||||
|
|
||||||
## [v2.2.0](https://github.com/torrentpier/torrentpier/tree/v2.2.0) (2017-06-12)
|
## [v2.2.0](https://github.com/torrentpier/torrentpier/tree/v2.2.0) (2017-06-12)
|
||||||
|
@ -51,107 +73,107 @@
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release 2.2.0 ☘️ [\#328](https://github.com/torrentpier/torrentpier/pull/328) ([Exile37](https://github.com/Exile37))
|
- Release 2.2.0 ☘️ [\#328](https://github.com/torrentpier/torrentpier/pull/328) ([Exileum](https://github.com/Exileum))
|
||||||
- Release preparation. Crowdin language pack update [\#322](https://github.com/torrentpier/torrentpier/pull/322) ([Exile37](https://github.com/Exile37))
|
- Release preparation. Crowdin language pack update [\#322](https://github.com/torrentpier/torrentpier/pull/322) ([Exileum](https://github.com/Exileum))
|
||||||
- TorrentPier Aurochs release preparation [\#321](https://github.com/torrentpier/torrentpier/pull/321) ([Exile37](https://github.com/Exile37))
|
- TorrentPier Aurochs release preparation [\#321](https://github.com/torrentpier/torrentpier/pull/321) ([Exileum](https://github.com/Exileum))
|
||||||
- Release preparation. Small bugfixes and readme translation [\#318](https://github.com/torrentpier/torrentpier/pull/318) ([Exile37](https://github.com/Exile37))
|
- Release preparation. Small bugfixes and readme translation [\#318](https://github.com/torrentpier/torrentpier/pull/318) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin language pack update [\#314](https://github.com/torrentpier/torrentpier/pull/314) ([Exile37](https://github.com/Exile37))
|
- Crowdin language pack update [\#314](https://github.com/torrentpier/torrentpier/pull/314) ([Exileum](https://github.com/Exileum))
|
||||||
- IP storage and attachment system bugfix. PHP 5.6+ [\#313](https://github.com/torrentpier/torrentpier/pull/313) ([Exile37](https://github.com/Exile37))
|
- IP storage and attachment system bugfix. PHP 5.6+ [\#313](https://github.com/torrentpier/torrentpier/pull/313) ([Exileum](https://github.com/Exileum))
|
||||||
- Bootstrap update & beginning of the develop branch partial merge [\#303](https://github.com/torrentpier/torrentpier/pull/303) ([Exile37](https://github.com/Exile37))
|
- Bootstrap update & beginning of the develop branch partial merge [\#303](https://github.com/torrentpier/torrentpier/pull/303) ([Exileum](https://github.com/Exileum))
|
||||||
- Fix avatars display bug [\#302](https://github.com/torrentpier/torrentpier/pull/302) ([Exile37](https://github.com/Exile37))
|
- Fix avatars display bug [\#302](https://github.com/torrentpier/torrentpier/pull/302) ([Exileum](https://github.com/Exileum))
|
||||||
- Cron subsystem rework. Environments [\#301](https://github.com/torrentpier/torrentpier/pull/301) ([Exile37](https://github.com/Exile37))
|
- Cron subsystem rework. Environments [\#301](https://github.com/torrentpier/torrentpier/pull/301) ([Exileum](https://github.com/Exileum))
|
||||||
- New logotype, favicon and css split & reformat [\#293](https://github.com/torrentpier/torrentpier/pull/293) ([Exile37](https://github.com/Exile37))
|
- New logotype, favicon and css split & reformat [\#293](https://github.com/torrentpier/torrentpier/pull/293) ([Exileum](https://github.com/Exileum))
|
||||||
- Whoops error handler for debug users [\#291](https://github.com/torrentpier/torrentpier/pull/291) ([Exile37](https://github.com/Exile37))
|
- Whoops error handler for debug users [\#291](https://github.com/torrentpier/torrentpier/pull/291) ([Exileum](https://github.com/Exileum))
|
||||||
- Replace sitemap to the new external component [\#252](https://github.com/torrentpier/torrentpier/pull/252) ([Exile37](https://github.com/Exile37))
|
- Replace sitemap to the new external component [\#252](https://github.com/torrentpier/torrentpier/pull/252) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin language pack update. Removed some languages [\#250](https://github.com/torrentpier/torrentpier/pull/250) ([Exile37](https://github.com/Exile37))
|
- Crowdin language pack update. Removed some languages [\#250](https://github.com/torrentpier/torrentpier/pull/250) ([Exileum](https://github.com/Exileum))
|
||||||
- IP detect subsystem replace. Trash cleanup. Defines [\#249](https://github.com/torrentpier/torrentpier/pull/249) ([Exile37](https://github.com/Exile37))
|
- IP detect subsystem replace. Trash cleanup. Defines [\#249](https://github.com/torrentpier/torrentpier/pull/249) ([Exileum](https://github.com/Exileum))
|
||||||
- Old ads module removal [\#244](https://github.com/torrentpier/torrentpier/pull/244) ([Exile37](https://github.com/Exile37))
|
- Old ads module removal [\#244](https://github.com/torrentpier/torrentpier/pull/244) ([Exileum](https://github.com/Exileum))
|
||||||
- External bencode library and some other changes [\#243](https://github.com/torrentpier/torrentpier/pull/243) ([Exile37](https://github.com/Exile37))
|
- External bencode library and some other changes [\#243](https://github.com/torrentpier/torrentpier/pull/243) ([Exileum](https://github.com/Exileum))
|
||||||
- Added new logo to readme [\#242](https://github.com/torrentpier/torrentpier/pull/242) ([VasyOk](https://github.com/VasyOk))
|
- Added new logo to readme [\#242](https://github.com/torrentpier/torrentpier/pull/242) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Bugsnag integration and some bugfixes in for cycles [\#239](https://github.com/torrentpier/torrentpier/pull/239) ([Exile37](https://github.com/Exile37))
|
- Bugsnag integration and some bugfixes in for cycles [\#239](https://github.com/torrentpier/torrentpier/pull/239) ([Exileum](https://github.com/Exileum))
|
||||||
- Bug with variables replacement and Crowdin localization fix [\#238](https://github.com/torrentpier/torrentpier/pull/238) ([Exile37](https://github.com/Exile37))
|
- Bug with variables replacement and Crowdin localization fix [\#238](https://github.com/torrentpier/torrentpier/pull/238) ([Exileum](https://github.com/Exileum))
|
||||||
- PSR-4 compatible legacy code autoloading [\#237](https://github.com/torrentpier/torrentpier/pull/237) ([Exile37](https://github.com/Exile37))
|
- PSR-4 compatible legacy code autoloading [\#237](https://github.com/torrentpier/torrentpier/pull/237) ([Exileum](https://github.com/Exileum))
|
||||||
- UFT-8 autocorrection removal from standart package [\#236](https://github.com/torrentpier/torrentpier/pull/236) ([Exile37](https://github.com/Exile37))
|
- UFT-8 autocorrection removal from standart package [\#236](https://github.com/torrentpier/torrentpier/pull/236) ([Exileum](https://github.com/Exileum))
|
||||||
- New localization strings and full Crowdin language pack update [\#235](https://github.com/torrentpier/torrentpier/pull/235) ([Exile37](https://github.com/Exile37))
|
- New localization strings and full Crowdin language pack update [\#235](https://github.com/torrentpier/torrentpier/pull/235) ([Exileum](https://github.com/Exileum))
|
||||||
- Replace own emailer to SwiftMailer [\#234](https://github.com/torrentpier/torrentpier/pull/234) ([Exile37](https://github.com/Exile37))
|
- Replace own emailer to SwiftMailer [\#234](https://github.com/torrentpier/torrentpier/pull/234) ([Exileum](https://github.com/Exileum))
|
||||||
- Force email charset and Crowdin language pack update [\#232](https://github.com/torrentpier/torrentpier/pull/232) ([Exile37](https://github.com/Exile37))
|
- Force email charset and Crowdin language pack update [\#232](https://github.com/torrentpier/torrentpier/pull/232) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin language pack update [\#231](https://github.com/torrentpier/torrentpier/pull/231) ([Exile37](https://github.com/Exile37))
|
- Crowdin language pack update [\#231](https://github.com/torrentpier/torrentpier/pull/231) ([Exileum](https://github.com/Exileum))
|
||||||
- Static code analyzer inspection, part 2 [\#230](https://github.com/torrentpier/torrentpier/pull/230) ([Exile37](https://github.com/Exile37))
|
- Static code analyzer inspection, part 2 [\#230](https://github.com/torrentpier/torrentpier/pull/230) ([Exileum](https://github.com/Exileum))
|
||||||
- Static code analyzer cherry picked from \#228 [\#229](https://github.com/torrentpier/torrentpier/pull/229) ([VasyOk](https://github.com/VasyOk))
|
- Static code analyzer cherry picked from \#228 [\#229](https://github.com/torrentpier/torrentpier/pull/229) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fix compare php version. [\#226](https://github.com/torrentpier/torrentpier/pull/226) ([VasyOk](https://github.com/VasyOk))
|
- Fix compare php version. [\#226](https://github.com/torrentpier/torrentpier/pull/226) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fixed compare version PHP [\#225](https://github.com/torrentpier/torrentpier/pull/225) ([VasyOk](https://github.com/VasyOk))
|
- Fixed compare version PHP [\#225](https://github.com/torrentpier/torrentpier/pull/225) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Deprecated each\(\) function in php 7.2 [\#211](https://github.com/torrentpier/torrentpier/pull/211) ([Exile37](https://github.com/Exile37))
|
- Deprecated each\(\) function in php 7.2 [\#211](https://github.com/torrentpier/torrentpier/pull/211) ([Exileum](https://github.com/Exileum))
|
||||||
- Performance refactoring. Remove test code. Fix path in config [\#208](https://github.com/torrentpier/torrentpier/pull/208) ([VasyOk](https://github.com/VasyOk))
|
- Performance refactoring. Remove test code. Fix path in config [\#208](https://github.com/torrentpier/torrentpier/pull/208) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fix many notices in admin\_attach\_cp.php [\#183](https://github.com/torrentpier/torrentpier/pull/183) ([Exile37](https://github.com/Exile37))
|
- Fix many notices in admin\_attach\_cp.php [\#183](https://github.com/torrentpier/torrentpier/pull/183) ([Exileum](https://github.com/Exileum))
|
||||||
- Add check lang [\#178](https://github.com/torrentpier/torrentpier/pull/178) ([VasyOk](https://github.com/VasyOk))
|
- Add check lang [\#178](https://github.com/torrentpier/torrentpier/pull/178) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Remove order from sql [\#177](https://github.com/torrentpier/torrentpier/pull/177) ([VasyOk](https://github.com/VasyOk))
|
- Remove order from sql [\#177](https://github.com/torrentpier/torrentpier/pull/177) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fix path to viewtorrent.php [\#176](https://github.com/torrentpier/torrentpier/pull/176) ([VasyOk](https://github.com/VasyOk))
|
- Fix path to viewtorrent.php [\#176](https://github.com/torrentpier/torrentpier/pull/176) ([VasyOk](https://github.com/VasyOk))
|
||||||
- New Crowdin translations [\#168](https://github.com/torrentpier/torrentpier/pull/168) ([Exile37](https://github.com/Exile37))
|
- New Crowdin translations [\#168](https://github.com/torrentpier/torrentpier/pull/168) ([Exileum](https://github.com/Exileum))
|
||||||
- Localization trash cleanup [\#167](https://github.com/torrentpier/torrentpier/pull/167) ([Exile37](https://github.com/Exile37))
|
- Localization trash cleanup [\#167](https://github.com/torrentpier/torrentpier/pull/167) ([Exileum](https://github.com/Exileum))
|
||||||
- New Crowdin translations \(develop\) [\#165](https://github.com/torrentpier/torrentpier/pull/165) ([Exile37](https://github.com/Exile37))
|
- New Crowdin translations \(develop\) [\#165](https://github.com/torrentpier/torrentpier/pull/165) ([Exileum](https://github.com/Exileum))
|
||||||
- New Crowdin translations \(master\) [\#164](https://github.com/torrentpier/torrentpier/pull/164) ([Exile37](https://github.com/Exile37))
|
- New Crowdin translations \(master\) [\#164](https://github.com/torrentpier/torrentpier/pull/164) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin localization integration prepare and stopwords removal [\#163](https://github.com/torrentpier/torrentpier/pull/163) ([Exile37](https://github.com/Exile37))
|
- Crowdin localization integration prepare and stopwords removal [\#163](https://github.com/torrentpier/torrentpier/pull/163) ([Exileum](https://github.com/Exileum))
|
||||||
- Crowdin localization integration [\#162](https://github.com/torrentpier/torrentpier/pull/162) ([Exile37](https://github.com/Exile37))
|
- Crowdin localization integration [\#162](https://github.com/torrentpier/torrentpier/pull/162) ([Exileum](https://github.com/Exileum))
|
||||||
- New Crowdin translations \(develop\) [\#161](https://github.com/torrentpier/torrentpier/pull/161) ([Exile37](https://github.com/Exile37))
|
- New Crowdin translations \(develop\) [\#161](https://github.com/torrentpier/torrentpier/pull/161) ([Exileum](https://github.com/Exileum))
|
||||||
- \#157. Fix Error in GET /bt/announce.php [\#159](https://github.com/torrentpier/torrentpier/pull/159) ([VasyOk](https://github.com/VasyOk))
|
- \#157. Fix Error in GET /bt/announce.php [\#159](https://github.com/torrentpier/torrentpier/pull/159) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Added check composer install [\#148](https://github.com/torrentpier/torrentpier/pull/148) ([VasyOk](https://github.com/VasyOk))
|
- Added check composer install [\#148](https://github.com/torrentpier/torrentpier/pull/148) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fix operators [\#147](https://github.com/torrentpier/torrentpier/pull/147) ([VasyOk](https://github.com/VasyOk))
|
- Fix operators [\#147](https://github.com/torrentpier/torrentpier/pull/147) ([VasyOk](https://github.com/VasyOk))
|
||||||
- \#144 Files should not be executable [\#145](https://github.com/torrentpier/torrentpier/pull/145) ([VasyOk](https://github.com/VasyOk))
|
- \#144 Files should not be executable [\#145](https://github.com/torrentpier/torrentpier/pull/145) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Change paths to absolute pathname [\#143](https://github.com/torrentpier/torrentpier/pull/143) ([VasyOk](https://github.com/VasyOk))
|
- Change paths to absolute pathname [\#143](https://github.com/torrentpier/torrentpier/pull/143) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Redundant pagination, mysql 5.7+ issue, release template option [\#141](https://github.com/torrentpier/torrentpier/pull/141) ([Exile37](https://github.com/Exile37))
|
- Redundant pagination, mysql 5.7+ issue, release template option [\#141](https://github.com/torrentpier/torrentpier/pull/141) ([Exileum](https://github.com/Exileum))
|
||||||
- Transfer announce to the php7-optimized database layer [\#140](https://github.com/torrentpier/torrentpier/pull/140) ([Exile37](https://github.com/Exile37))
|
- Transfer announce to the php7-optimized database layer [\#140](https://github.com/torrentpier/torrentpier/pull/140) ([Exileum](https://github.com/Exileum))
|
||||||
- Cleanup repository from old deprecated scripts and server configs [\#139](https://github.com/torrentpier/torrentpier/pull/139) ([Exile37](https://github.com/Exile37))
|
- Cleanup repository from old deprecated scripts and server configs [\#139](https://github.com/torrentpier/torrentpier/pull/139) ([Exileum](https://github.com/Exileum))
|
||||||
- Torrent ajax file list fixes and small reformat [\#138](https://github.com/torrentpier/torrentpier/pull/138) ([Exile37](https://github.com/Exile37))
|
- Torrent ajax file list fixes and small reformat [\#138](https://github.com/torrentpier/torrentpier/pull/138) ([Exileum](https://github.com/Exileum))
|
||||||
- Codacy / Scrutinizer / Code Climate / Coveralls integration, Slack hook to Travis CI [\#137](https://github.com/torrentpier/torrentpier/pull/137) ([Exile37](https://github.com/Exile37))
|
- Codacy / Scrutinizer / Code Climate / Coveralls integration, Slack hook to Travis CI [\#137](https://github.com/torrentpier/torrentpier/pull/137) ([Exileum](https://github.com/Exileum))
|
||||||
- Add a Codacy badge to README.md [\#136](https://github.com/torrentpier/torrentpier/pull/136) ([codacy-badger](https://github.com/codacy-badger))
|
- Add a Codacy badge to README.md [\#136](https://github.com/torrentpier/torrentpier/pull/136) ([codacy-badger](https://github.com/codacy-badger))
|
||||||
- Replace Sphinx API to the composer version [\#135](https://github.com/torrentpier/torrentpier/pull/135) ([Exile37](https://github.com/Exile37))
|
- Replace Sphinx API to the composer version [\#135](https://github.com/torrentpier/torrentpier/pull/135) ([Exileum](https://github.com/Exileum))
|
||||||
- Incorrect case close operators \(develop\) [\#134](https://github.com/torrentpier/torrentpier/pull/134) ([Exile37](https://github.com/Exile37))
|
- Incorrect case close operators \(develop\) [\#134](https://github.com/torrentpier/torrentpier/pull/134) ([Exileum](https://github.com/Exileum))
|
||||||
- Incorrect case close operators \(master\) [\#133](https://github.com/torrentpier/torrentpier/pull/133) ([Exile37](https://github.com/Exile37))
|
- Incorrect case close operators \(master\) [\#133](https://github.com/torrentpier/torrentpier/pull/133) ([Exileum](https://github.com/Exileum))
|
||||||
- Composer init, editor config, some cleanup and much more [\#132](https://github.com/torrentpier/torrentpier/pull/132) ([Exile37](https://github.com/Exile37))
|
- Composer init, editor config, some cleanup and much more [\#132](https://github.com/torrentpier/torrentpier/pull/132) ([Exileum](https://github.com/Exileum))
|
||||||
- Remove eval from admin\_attachments and emailer [\#129](https://github.com/torrentpier/torrentpier/pull/129) ([VasyOk](https://github.com/VasyOk))
|
- Remove eval from admin\_attachments and emailer [\#129](https://github.com/torrentpier/torrentpier/pull/129) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Fix sql group [\#128](https://github.com/torrentpier/torrentpier/pull/128) ([VasyOk](https://github.com/VasyOk))
|
- Fix sql group [\#128](https://github.com/torrentpier/torrentpier/pull/128) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Remove Zend [\#127](https://github.com/torrentpier/torrentpier/pull/127) ([VasyOk](https://github.com/VasyOk))
|
- Remove Zend [\#127](https://github.com/torrentpier/torrentpier/pull/127) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Small fix to the upgrade schema [\#126](https://github.com/torrentpier/torrentpier/pull/126) ([Exile37](https://github.com/Exile37))
|
- Small fix to the upgrade schema [\#126](https://github.com/torrentpier/torrentpier/pull/126) ([Exileum](https://github.com/Exileum))
|
||||||
- Fixed id sqllog table and name select db [\#125](https://github.com/torrentpier/torrentpier/pull/125) ([VasyOk](https://github.com/VasyOk))
|
- Fixed id sqllog table and name select db [\#125](https://github.com/torrentpier/torrentpier/pull/125) ([VasyOk](https://github.com/VasyOk))
|
||||||
- New external service for look up IP address [\#122](https://github.com/torrentpier/torrentpier/pull/122) ([Exile37](https://github.com/Exile37))
|
- New external service for look up IP address [\#122](https://github.com/torrentpier/torrentpier/pull/122) ([Exileum](https://github.com/Exileum))
|
||||||
- New branding and copyright [\#121](https://github.com/torrentpier/torrentpier/pull/121) ([Exile37](https://github.com/Exile37))
|
- New branding and copyright [\#121](https://github.com/torrentpier/torrentpier/pull/121) ([Exileum](https://github.com/Exileum))
|
||||||
- Poster birthday with no birthday date fix [\#120](https://github.com/torrentpier/torrentpier/pull/120) ([Exile37](https://github.com/Exile37))
|
- Poster birthday with no birthday date fix [\#120](https://github.com/torrentpier/torrentpier/pull/120) ([Exileum](https://github.com/Exileum))
|
||||||
- Tidy deprecated option merge-spans remove [\#119](https://github.com/torrentpier/torrentpier/pull/119) ([Exile37](https://github.com/Exile37))
|
- Tidy deprecated option merge-spans remove [\#119](https://github.com/torrentpier/torrentpier/pull/119) ([Exileum](https://github.com/Exileum))
|
||||||
- Db logging [\#118](https://github.com/torrentpier/torrentpier/pull/118) ([leroy0](https://github.com/leroy0))
|
- Db logging [\#118](https://github.com/torrentpier/torrentpier/pull/118) ([leroy0](https://github.com/leroy0))
|
||||||
- CircleCi, CodeCoverage and composer dependencies [\#117](https://github.com/torrentpier/torrentpier/pull/117) ([Exile37](https://github.com/Exile37))
|
- CircleCi, CodeCoverage and composer dependencies [\#117](https://github.com/torrentpier/torrentpier/pull/117) ([Exileum](https://github.com/Exileum))
|
||||||
- Db exceptions, query with binding [\#116](https://github.com/torrentpier/torrentpier/pull/116) ([leroy0](https://github.com/leroy0))
|
- Db exceptions, query with binding [\#116](https://github.com/torrentpier/torrentpier/pull/116) ([leroy0](https://github.com/leroy0))
|
||||||
- PHP 7+ requirements, Travis and other small fixes [\#115](https://github.com/torrentpier/torrentpier/pull/115) ([Exile37](https://github.com/Exile37))
|
- PHP 7+ requirements, Travis and other small fixes [\#115](https://github.com/torrentpier/torrentpier/pull/115) ([Exileum](https://github.com/Exileum))
|
||||||
- New compatible with php7 classes: Db, Config [\#114](https://github.com/torrentpier/torrentpier/pull/114) ([Exile37](https://github.com/Exile37))
|
- New compatible with php7 classes: Db, Config [\#114](https://github.com/torrentpier/torrentpier/pull/114) ([Exileum](https://github.com/Exileum))
|
||||||
- Refactoring posting\_attachments [\#112](https://github.com/torrentpier/torrentpier/pull/112) ([VasyOk](https://github.com/VasyOk))
|
- Refactoring posting\_attachments [\#112](https://github.com/torrentpier/torrentpier/pull/112) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Update the current year in the license text [\#110](https://github.com/torrentpier/torrentpier/pull/110) ([Exile37](https://github.com/Exile37))
|
- Update the current year in the license text [\#110](https://github.com/torrentpier/torrentpier/pull/110) ([Exileum](https://github.com/Exileum))
|
||||||
- Reformat master branch to PSR-2 and MIT license [\#109](https://github.com/torrentpier/torrentpier/pull/109) ([Exile37](https://github.com/Exile37))
|
- Reformat master branch to PSR-2 and MIT license [\#109](https://github.com/torrentpier/torrentpier/pull/109) ([Exileum](https://github.com/Exileum))
|
||||||
- Master branch up to php 7 compatibility [\#107](https://github.com/torrentpier/torrentpier/pull/107) ([VasyOk](https://github.com/VasyOk))
|
- Master branch up to php 7 compatibility [\#107](https://github.com/torrentpier/torrentpier/pull/107) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Removal of unused scripts and server configs [\#105](https://github.com/torrentpier/torrentpier/pull/105) ([Exile37](https://github.com/Exile37))
|
- Removal of unused scripts and server configs [\#105](https://github.com/torrentpier/torrentpier/pull/105) ([Exileum](https://github.com/Exileum))
|
||||||
- New license - MIT [\#104](https://github.com/torrentpier/torrentpier/pull/104) ([Exile37](https://github.com/Exile37))
|
- New license - MIT [\#104](https://github.com/torrentpier/torrentpier/pull/104) ([Exileum](https://github.com/Exileum))
|
||||||
- New coding standart: PSR-2 [\#103](https://github.com/torrentpier/torrentpier/pull/103) ([Exile37](https://github.com/Exile37))
|
- New coding standart: PSR-2 [\#103](https://github.com/torrentpier/torrentpier/pull/103) ([Exileum](https://github.com/Exileum))
|
||||||
- Improvements in code and work cache [\#101](https://github.com/torrentpier/torrentpier/pull/101) ([VasyOk](https://github.com/VasyOk))
|
- Improvements in code and work cache [\#101](https://github.com/torrentpier/torrentpier/pull/101) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Migration to the new config subsystem [\#100](https://github.com/torrentpier/torrentpier/pull/100) ([Exile37](https://github.com/Exile37))
|
- Migration to the new config subsystem [\#100](https://github.com/torrentpier/torrentpier/pull/100) ([Exileum](https://github.com/Exileum))
|
||||||
- php-lang-correct removed [\#99](https://github.com/torrentpier/torrentpier/pull/99) ([Exile37](https://github.com/Exile37))
|
- php-lang-correct removed [\#99](https://github.com/torrentpier/torrentpier/pull/99) ([Exileum](https://github.com/Exileum))
|
||||||
- Logical operators should be avoided [\#98](https://github.com/torrentpier/torrentpier/pull/98) ([Exile37](https://github.com/Exile37))
|
- Logical operators should be avoided [\#98](https://github.com/torrentpier/torrentpier/pull/98) ([Exileum](https://github.com/Exileum))
|
||||||
- Migration to the new cache subsystem [\#97](https://github.com/torrentpier/torrentpier/pull/97) ([Exile37](https://github.com/Exile37))
|
- Migration to the new cache subsystem [\#97](https://github.com/torrentpier/torrentpier/pull/97) ([Exileum](https://github.com/Exileum))
|
||||||
- Rework of feed.php and some other files [\#94](https://github.com/torrentpier/torrentpier/pull/94) ([Exile37](https://github.com/Exile37))
|
- Rework of feed.php and some other files [\#94](https://github.com/torrentpier/torrentpier/pull/94) ([Exileum](https://github.com/Exileum))
|
||||||
- Refactoring Cache [\#92](https://github.com/torrentpier/torrentpier/pull/92) ([VasyOk](https://github.com/VasyOk))
|
- Refactoring Cache [\#92](https://github.com/torrentpier/torrentpier/pull/92) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Add new tests and refactoring [\#89](https://github.com/torrentpier/torrentpier/pull/89) ([VasyOk](https://github.com/VasyOk))
|
- Add new tests and refactoring [\#89](https://github.com/torrentpier/torrentpier/pull/89) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Add tests [\#88](https://github.com/torrentpier/torrentpier/pull/88) ([VasyOk](https://github.com/VasyOk))
|
- Add tests [\#88](https://github.com/torrentpier/torrentpier/pull/88) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Some fix after removed @ [\#87](https://github.com/torrentpier/torrentpier/pull/87) ([VasyOk](https://github.com/VasyOk))
|
- Some fix after removed @ [\#87](https://github.com/torrentpier/torrentpier/pull/87) ([VasyOk](https://github.com/VasyOk))
|
||||||
- \#77 Add monolog [\#86](https://github.com/torrentpier/torrentpier/pull/86) ([VasyOk](https://github.com/VasyOk))
|
- \#77 Add monolog [\#86](https://github.com/torrentpier/torrentpier/pull/86) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Remove at [\#85](https://github.com/torrentpier/torrentpier/pull/85) ([VasyOk](https://github.com/VasyOk))
|
- Remove at [\#85](https://github.com/torrentpier/torrentpier/pull/85) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Переделка файла dl.php на работу с новой базой [\#83](https://github.com/torrentpier/torrentpier/pull/83) ([Exile37](https://github.com/Exile37))
|
- Переделка файла dl.php на работу с новой базой [\#83](https://github.com/torrentpier/torrentpier/pull/83) ([Exileum](https://github.com/Exileum))
|
||||||
- Added use profiler and in\(de\)crement methods. [\#82](https://github.com/torrentpier/torrentpier/pull/82) ([VasyOk](https://github.com/VasyOk))
|
- Added use profiler and in\(de\)crement methods. [\#82](https://github.com/torrentpier/torrentpier/pull/82) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Remove response service provider [\#80](https://github.com/torrentpier/torrentpier/pull/80) ([VasyOk](https://github.com/VasyOk))
|
- Remove response service provider [\#80](https://github.com/torrentpier/torrentpier/pull/80) ([VasyOk](https://github.com/VasyOk))
|
||||||
- DI usage example [\#79](https://github.com/torrentpier/torrentpier/pull/79) ([Exile37](https://github.com/Exile37))
|
- DI usage example [\#79](https://github.com/torrentpier/torrentpier/pull/79) ([Exileum](https://github.com/Exileum))
|
||||||
- Added methods to simplify the work with the database [\#75](https://github.com/torrentpier/torrentpier/pull/75) ([VasyOk](https://github.com/VasyOk))
|
- Added methods to simplify the work with the database [\#75](https://github.com/torrentpier/torrentpier/pull/75) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Captcha service provider [\#72](https://github.com/torrentpier/torrentpier/pull/72) ([Exile37](https://github.com/Exile37))
|
- Captcha service provider [\#72](https://github.com/torrentpier/torrentpier/pull/72) ([Exileum](https://github.com/Exileum))
|
||||||
- Fixed a getting value from config through method toArray [\#71](https://github.com/torrentpier/torrentpier/pull/71) ([VasyOk](https://github.com/VasyOk))
|
- Fixed a getting value from config through method toArray [\#71](https://github.com/torrentpier/torrentpier/pull/71) ([VasyOk](https://github.com/VasyOk))
|
||||||
- \#69 Fixed crypt notice [\#70](https://github.com/torrentpier/torrentpier/pull/70) ([VasyOk](https://github.com/VasyOk))
|
- \#69 Fixed crypt notice [\#70](https://github.com/torrentpier/torrentpier/pull/70) ([VasyOk](https://github.com/VasyOk))
|
||||||
- \#58 Expansion Zend Config [\#68](https://github.com/torrentpier/torrentpier/pull/68) ([VasyOk](https://github.com/VasyOk))
|
- \#58 Expansion Zend Config [\#68](https://github.com/torrentpier/torrentpier/pull/68) ([VasyOk](https://github.com/VasyOk))
|
||||||
- change preset to prs2 [\#61](https://github.com/torrentpier/torrentpier/pull/61) ([VasyOk](https://github.com/VasyOk))
|
- change preset to prs2 [\#61](https://github.com/torrentpier/torrentpier/pull/61) ([VasyOk](https://github.com/VasyOk))
|
||||||
- Applied fixes from StyleCI [\#60](https://github.com/torrentpier/torrentpier/pull/60) ([Exile37](https://github.com/Exile37))
|
- Applied fixes from StyleCI [\#60](https://github.com/torrentpier/torrentpier/pull/60) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.5](https://github.com/torrentpier/torrentpier/tree/v2.1.5) (2015-05-23)
|
## [v2.1.5](https://github.com/torrentpier/torrentpier/tree/v2.1.5) (2015-05-23)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.4...v2.1.5)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.4...v2.1.5)
|
||||||
|
@ -161,100 +183,100 @@
|
||||||
- Add a Gitter chat badge to README.md [\#47](https://github.com/torrentpier/torrentpier/pull/47) ([gitter-badger](https://github.com/gitter-badger))
|
- Add a Gitter chat badge to README.md [\#47](https://github.com/torrentpier/torrentpier/pull/47) ([gitter-badger](https://github.com/gitter-badger))
|
||||||
- Фикс подтверждения пароля [\#43](https://github.com/torrentpier/torrentpier/pull/43) ([dreddred](https://github.com/dreddred))
|
- Фикс подтверждения пароля [\#43](https://github.com/torrentpier/torrentpier/pull/43) ([dreddred](https://github.com/dreddred))
|
||||||
- Fix port Ocelot [\#42](https://github.com/torrentpier/torrentpier/pull/42) ([Altairko](https://github.com/Altairko))
|
- Fix port Ocelot [\#42](https://github.com/torrentpier/torrentpier/pull/42) ([Altairko](https://github.com/Altairko))
|
||||||
- Develop [\#40](https://github.com/torrentpier/torrentpier/pull/40) ([Exile37](https://github.com/Exile37))
|
- Develop [\#40](https://github.com/torrentpier/torrentpier/pull/40) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.4](https://github.com/torrentpier/torrentpier/tree/v2.1.4) (2014-11-26)
|
## [v2.1.4](https://github.com/torrentpier/torrentpier/tree/v2.1.4) (2014-11-26)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.3...v2.1.4)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.3...v2.1.4)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#39](https://github.com/torrentpier/torrentpier/pull/39) ([Exile37](https://github.com/Exile37))
|
- Develop [\#39](https://github.com/torrentpier/torrentpier/pull/39) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.3](https://github.com/torrentpier/torrentpier/tree/v2.1.3) (2014-10-24)
|
## [v2.1.3](https://github.com/torrentpier/torrentpier/tree/v2.1.3) (2014-10-24)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.2...v2.1.3)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.2...v2.1.3)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Версия 2.1.3 ALPHA-3 [\#38](https://github.com/torrentpier/torrentpier/pull/38) ([Exile37](https://github.com/Exile37))
|
- Версия 2.1.3 ALPHA-3 [\#38](https://github.com/torrentpier/torrentpier/pull/38) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.2](https://github.com/torrentpier/torrentpier/tree/v2.1.2) (2014-10-20)
|
## [v2.1.2](https://github.com/torrentpier/torrentpier/tree/v2.1.2) (2014-10-20)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.1...v2.1.2)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.1...v2.1.2)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Версия 2.1.2 ALPHA-2 [\#37](https://github.com/torrentpier/torrentpier/pull/37) ([Exile37](https://github.com/Exile37))
|
- Версия 2.1.2 ALPHA-2 [\#37](https://github.com/torrentpier/torrentpier/pull/37) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.1](https://github.com/torrentpier/torrentpier/tree/v2.1.1) (2014-09-11)
|
## [v2.1.1](https://github.com/torrentpier/torrentpier/tree/v2.1.1) (2014-09-11)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.0...v2.1.1)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.0...v2.1.1)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Версия 2.1.1 ALPHA-1 [\#34](https://github.com/torrentpier/torrentpier/pull/34) ([Exile37](https://github.com/Exile37))
|
- Версия 2.1.1 ALPHA-1 [\#34](https://github.com/torrentpier/torrentpier/pull/34) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.1.0](https://github.com/torrentpier/torrentpier/tree/v2.1.0) (2014-09-07)
|
## [v2.1.0](https://github.com/torrentpier/torrentpier/tree/v2.1.0) (2014-09-07)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599b...v2.1.0)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599b...v2.1.0)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Версия 2.1 \(R600\) [\#32](https://github.com/torrentpier/torrentpier/pull/32) ([Exile37](https://github.com/Exile37))
|
- Версия 2.1 \(R600\) [\#32](https://github.com/torrentpier/torrentpier/pull/32) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.599b](https://github.com/torrentpier/torrentpier/tree/v2.0.599b) (2014-08-30)
|
## [v2.0.599b](https://github.com/torrentpier/torrentpier/tree/v2.0.599b) (2014-08-30)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599...v2.0.599b)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599...v2.0.599b)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#31](https://github.com/torrentpier/torrentpier/pull/31) ([Exile37](https://github.com/Exile37))
|
- Develop [\#31](https://github.com/torrentpier/torrentpier/pull/31) ([Exileum](https://github.com/Exileum))
|
||||||
- Feature/terms [\#30](https://github.com/torrentpier/torrentpier/pull/30) ([Exile37](https://github.com/Exile37))
|
- Feature/terms [\#30](https://github.com/torrentpier/torrentpier/pull/30) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.599](https://github.com/torrentpier/torrentpier/tree/v2.0.599) (2014-08-29)
|
## [v2.0.599](https://github.com/torrentpier/torrentpier/tree/v2.0.599) (2014-08-29)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.598...v2.0.599)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.598...v2.0.599)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- R599 [\#29](https://github.com/torrentpier/torrentpier/pull/29) ([Exile37](https://github.com/Exile37))
|
- R599 [\#29](https://github.com/torrentpier/torrentpier/pull/29) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.598](https://github.com/torrentpier/torrentpier/tree/v2.0.598) (2014-08-27)
|
## [v2.0.598](https://github.com/torrentpier/torrentpier/tree/v2.0.598) (2014-08-27)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.597...v2.0.598)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.597...v2.0.598)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- R598 [\#28](https://github.com/torrentpier/torrentpier/pull/28) ([Exile37](https://github.com/Exile37))
|
- R598 [\#28](https://github.com/torrentpier/torrentpier/pull/28) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.597](https://github.com/torrentpier/torrentpier/tree/v2.0.597) (2014-08-24)
|
## [v2.0.597](https://github.com/torrentpier/torrentpier/tree/v2.0.597) (2014-08-24)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.596...v2.0.597)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.596...v2.0.597)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- R597 [\#27](https://github.com/torrentpier/torrentpier/pull/27) ([Exile37](https://github.com/Exile37))
|
- R597 [\#27](https://github.com/torrentpier/torrentpier/pull/27) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.596](https://github.com/torrentpier/torrentpier/tree/v2.0.596) (2014-08-20)
|
## [v2.0.596](https://github.com/torrentpier/torrentpier/tree/v2.0.596) (2014-08-20)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.595...v2.0.596)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.595...v2.0.596)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#26](https://github.com/torrentpier/torrentpier/pull/26) ([Exile37](https://github.com/Exile37))
|
- Develop [\#26](https://github.com/torrentpier/torrentpier/pull/26) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.595](https://github.com/torrentpier/torrentpier/tree/v2.0.595) (2014-08-14)
|
## [v2.0.595](https://github.com/torrentpier/torrentpier/tree/v2.0.595) (2014-08-14)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594b...v2.0.595)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594b...v2.0.595)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#22](https://github.com/torrentpier/torrentpier/pull/22) ([Exile37](https://github.com/Exile37))
|
- Develop [\#22](https://github.com/torrentpier/torrentpier/pull/22) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.594b](https://github.com/torrentpier/torrentpier/tree/v2.0.594b) (2014-08-07)
|
## [v2.0.594b](https://github.com/torrentpier/torrentpier/tree/v2.0.594b) (2014-08-07)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594...v2.0.594b)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594...v2.0.594b)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#17](https://github.com/torrentpier/torrentpier/pull/17) ([Exile37](https://github.com/Exile37))
|
- Develop [\#17](https://github.com/torrentpier/torrentpier/pull/17) ([Exileum](https://github.com/Exileum))
|
||||||
- Hotfix/bbcode [\#16](https://github.com/torrentpier/torrentpier/pull/16) ([Exile37](https://github.com/Exile37))
|
- Hotfix/bbcode [\#16](https://github.com/torrentpier/torrentpier/pull/16) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.594](https://github.com/torrentpier/torrentpier/tree/v2.0.594) (2014-08-07)
|
## [v2.0.594](https://github.com/torrentpier/torrentpier/tree/v2.0.594) (2014-08-07)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593b...v2.0.594)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593b...v2.0.594)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#15](https://github.com/torrentpier/torrentpier/pull/15) ([Exile37](https://github.com/Exile37))
|
- Develop [\#15](https://github.com/torrentpier/torrentpier/pull/15) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.593b](https://github.com/torrentpier/torrentpier/tree/v2.0.593b) (2014-08-05)
|
## [v2.0.593b](https://github.com/torrentpier/torrentpier/tree/v2.0.593b) (2014-08-05)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593...v2.0.593b)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593...v2.0.593b)
|
||||||
|
@ -264,7 +286,7 @@
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Develop [\#13](https://github.com/torrentpier/torrentpier/pull/13) ([Exile37](https://github.com/Exile37))
|
- Develop [\#13](https://github.com/torrentpier/torrentpier/pull/13) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.0.592](https://github.com/torrentpier/torrentpier/tree/v2.0.592) (2014-08-01)
|
## [v2.0.592](https://github.com/torrentpier/torrentpier/tree/v2.0.592) (2014-08-01)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.591...v2.0.592)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.591...v2.0.592)
|
||||||
|
|
1
CNAME
1
CNAME
|
@ -1 +0,0 @@
|
||||||
torrentpier.com
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2005-2017 TorrentPier
|
Copyright (c) 2005-2018 TorrentPier
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -28,8 +28,8 @@ and go from there. The documentation will be translated into english in the near
|
||||||
|
|
||||||
* Apache / nginx
|
* Apache / nginx
|
||||||
* MySQL / MariaDB / Percona
|
* MySQL / MariaDB / Percona
|
||||||
* PHP: 5.6 / 7.0 / 7.1
|
* PHP: 7.1 / 7.2 / 7.3
|
||||||
* PHP Extensions: bcmath, intl, tidy (optional), xml
|
* PHP Extensions: bcmath, intl, tidy (optional), xml, xmlwriter
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
theme: jekyll-theme-leap-day
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -174,8 +158,8 @@ if ($confirm && count($delete_id_list) > 0) {
|
||||||
$hidden_fields .= '<input type="hidden" name="u_id" value="' . $uid . '" />';
|
$hidden_fields .= '<input type="hidden" name="u_id" value="' . $uid . '" />';
|
||||||
$hidden_fields .= '<input type="hidden" name="start" value="' . $start . '" />';
|
$hidden_fields .= '<input type="hidden" name="start" value="' . $start . '" />';
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($delete_id_list); $i < $iMax; $i++) {
|
foreach ($delete_id_list as $iValue) {
|
||||||
$hidden_fields .= '<input type="hidden" name="delete_id_list[]" value="' . $delete_id_list[$i] . '" />';
|
$hidden_fields .= '<input type="hidden" name="delete_id_list[]" value="' . $iValue . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
print_confirmation(array(
|
print_confirmation(array(
|
||||||
|
@ -398,8 +382,8 @@ if ($view === 'attachments') {
|
||||||
for ($i = 0, $iMax = count($attachments); $i < $iMax; $i++) {
|
for ($i = 0, $iMax = count($attachments); $i < $iMax; $i++) {
|
||||||
$delete_box = '<input type="checkbox" name="delete_id_list[]" value="' . (int)$attachments[$i]['attach_id'] . '" />';
|
$delete_box = '<input type="checkbox" name="delete_id_list[]" value="' . (int)$attachments[$i]['attach_id'] . '" />';
|
||||||
|
|
||||||
for ($j = 0, $jMax = count($delete_id_list); $j < $jMax; $j++) {
|
foreach ($delete_id_list as $jValue) {
|
||||||
if ($delete_id_list[$j] == $attachments[$i]['attach_id']) {
|
if ($jValue == $attachments[$i]['attach_id']) {
|
||||||
$delete_box = '<input type="checkbox" name="delete_id_list[]" value="' . (int)$attachments[$i]['attach_id'] . '" checked="checked" />';
|
$delete_box = '<input type="checkbox" name="delete_id_list[]" value="' . (int)$attachments[$i]['attach_id'] . '" checked="checked" />';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -468,7 +452,7 @@ if ($view === 'attachments') {
|
||||||
|
|
||||||
'S_DELETE_BOX' => $delete_box,
|
'S_DELETE_BOX' => $delete_box,
|
||||||
'S_HIDDEN' => $hidden_field,
|
'S_HIDDEN' => $hidden_field,
|
||||||
'U_VIEW_ATTACHMENT' => BB_ROOT . DOWNLOAD_URL . $attachments[$i]['attach_id'],
|
'U_VIEW_ATTACHMENT' => BB_ROOT . DL_URL . $attachments[$i]['attach_id'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -149,23 +133,25 @@ $select_pm_size_mode = size_select('pm_size', $pm_size);
|
||||||
if ($search_imagick) {
|
if ($search_imagick) {
|
||||||
$imagick = '';
|
$imagick = '';
|
||||||
|
|
||||||
if (preg_match('/convert/i', $imagick)) {
|
if (false !== stripos($imagick, "convert")) {
|
||||||
return true;
|
return true;
|
||||||
} elseif ($imagick != 'none') {
|
}
|
||||||
if (!preg_match('/WIN/i', PHP_OS)) {
|
|
||||||
|
if ($imagick != 'none') {
|
||||||
|
if (!false !== stripos(PHP_OS, "WIN")) {
|
||||||
$retval = @exec('whereis convert');
|
$retval = @exec('whereis convert');
|
||||||
$paths = explode(' ', $retval);
|
$paths = explode(' ', $retval);
|
||||||
|
|
||||||
if (is_array($paths)) {
|
if (is_array($paths)) {
|
||||||
for ($i = 0, $iMax = count($paths); $i < $iMax; $i++) {
|
foreach ($paths as $i => $iValue) {
|
||||||
$path = basename($paths[$i]);
|
$path = basename($paths[$i]);
|
||||||
|
|
||||||
if ($path == 'convert') {
|
if ($path == 'convert') {
|
||||||
$imagick = $paths[$i];
|
$imagick = $iValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elseif (preg_match('/WIN/i', PHP_OS)) {
|
} elseif (false !== stripos(PHP_OS, "WIN")) {
|
||||||
$path = 'c:/imagemagick/convert.exe';
|
$path = 'c:/imagemagick/convert.exe';
|
||||||
|
|
||||||
if (!@file_exists(amod_realpath($path))) {
|
if (!@file_exists(amod_realpath($path))) {
|
||||||
|
@ -360,7 +346,9 @@ if ($check_image_cat) {
|
||||||
|
|
||||||
// Does the target directory exist, is it a directory and writeable
|
// Does the target directory exist, is it a directory and writeable
|
||||||
if (!@file_exists(amod_realpath($upload_dir))) {
|
if (!@file_exists(amod_realpath($upload_dir))) {
|
||||||
mkdir($upload_dir, 0755);
|
if (!mkdir($upload_dir, 0755) && !is_dir($upload_dir)) {
|
||||||
|
throw new \RuntimeException(sprintf('Directory "%s" was not created', $upload_dir));
|
||||||
|
}
|
||||||
@chmod($upload_dir, 0777);
|
@chmod($upload_dir, 0777);
|
||||||
|
|
||||||
if (!@file_exists(amod_realpath($upload_dir))) {
|
if (!@file_exists(amod_realpath($upload_dir))) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -29,9 +13,8 @@ if (!empty($setmodules)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
require INC_DIR . '/functions_selects.php';
|
|
||||||
|
|
||||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
$mode = $_GET['mode'] ?? '';
|
||||||
|
|
||||||
$return_links = array(
|
$return_links = array(
|
||||||
'index' => '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'),
|
'index' => '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'),
|
||||||
|
@ -51,7 +34,7 @@ if (!$result = DB()->sql_query($sql)) {
|
||||||
$config_value = $row['config_value'];
|
$config_value = $row['config_value'];
|
||||||
$default_config[$config_name] = $config_value;
|
$default_config[$config_name] = $config_value;
|
||||||
|
|
||||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
$new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
|
||||||
|
|
||||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
||||||
if ($config_name == 'seed_bonus_points' ||
|
if ($config_name == 'seed_bonus_points' ||
|
||||||
|
@ -150,8 +133,8 @@ switch ($mode) {
|
||||||
'POSTS_PER_PAGE' => $new['posts_per_page'],
|
'POSTS_PER_PAGE' => $new['posts_per_page'],
|
||||||
'HOT_TOPIC' => $new['hot_threshold'],
|
'HOT_TOPIC' => $new['hot_threshold'],
|
||||||
'DEFAULT_DATEFORMAT' => $new['default_dateformat'],
|
'DEFAULT_DATEFORMAT' => $new['default_dateformat'],
|
||||||
'LANG_SELECT' => language_select($new['default_lang'], 'default_lang'),
|
'LANG_SELECT' => \TorrentPier\Legacy\Select::language($new['default_lang'], 'default_lang'),
|
||||||
'TIMEZONE_SELECT' => tz_select($new['board_timezone'], 'board_timezone'),
|
'TIMEZONE_SELECT' => \TorrentPier\Legacy\Select::timezone($new['board_timezone'], 'board_timezone'),
|
||||||
'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'],
|
'MAX_LOGIN_ATTEMPTS' => $new['max_login_attempts'],
|
||||||
'LOGIN_RESET_TIME' => $new['login_reset_time'],
|
'LOGIN_RESET_TIME' => $new['login_reset_time'],
|
||||||
'PRUNE_ENABLE' => $new['prune_enable'] ? true : false,
|
'PRUNE_ENABLE' => $new['prune_enable'] ? true : false,
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -32,8 +16,6 @@ require __DIR__ . '/pagestart.php';
|
||||||
$max_forum_name_len = 30;
|
$max_forum_name_len = 30;
|
||||||
$max_forum_rows = 25;
|
$max_forum_rows = 25;
|
||||||
|
|
||||||
require INC_DIR . '/functions_admin_torrent.php';
|
|
||||||
|
|
||||||
$submit = isset($_POST['submit']);
|
$submit = isset($_POST['submit']);
|
||||||
$confirm = isset($_POST['confirm']);
|
$confirm = isset($_POST['confirm']);
|
||||||
|
|
||||||
|
@ -94,12 +76,12 @@ $cfg = bb_get_config(BB_CONFIG, true, false);
|
||||||
*/
|
*/
|
||||||
if ($submit && $confirm) {
|
if ($submit && $confirm) {
|
||||||
foreach ($db_fields_bool as $field_name => $field_def_val) {
|
foreach ($db_fields_bool as $field_name => $field_def_val) {
|
||||||
update_table_bool(BB_FORUMS, 'forum_id', $field_name, $field_def_val);
|
\TorrentPier\Legacy\Admin\Torrent::update_table_bool(BB_FORUMS, 'forum_id', $field_name, $field_def_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
update_config_table(BB_CONFIG, $default_cfg_str, $cfg, 'str');
|
\TorrentPier\Legacy\Admin\Torrent::update_config_table(BB_CONFIG, $default_cfg_str, $cfg, 'str');
|
||||||
update_config_table(BB_CONFIG, $default_cfg_bool, $cfg, 'bool');
|
\TorrentPier\Legacy\Admin\Torrent::update_config_table(BB_CONFIG, $default_cfg_bool, $cfg, 'bool');
|
||||||
update_config_table(BB_CONFIG, $default_cfg_num, $cfg, 'num');
|
\TorrentPier\Legacy\Admin\Torrent::update_config_table(BB_CONFIG, $default_cfg_num, $cfg, 'num');
|
||||||
|
|
||||||
$datastore->update('cat_forums');
|
$datastore->update('cat_forums');
|
||||||
|
|
||||||
|
@ -107,16 +89,16 @@ if ($submit && $confirm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set template vars
|
// Set template vars
|
||||||
set_tpl_vars($default_cfg_str, $cfg);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars($default_cfg_str, $cfg);
|
||||||
set_tpl_vars_lang($default_cfg_str);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars_lang($default_cfg_str);
|
||||||
|
|
||||||
set_tpl_vars_bool($default_cfg_bool, $cfg);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars_bool($default_cfg_bool, $cfg);
|
||||||
set_tpl_vars_lang($default_cfg_bool);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars_lang($default_cfg_bool);
|
||||||
|
|
||||||
set_tpl_vars($default_cfg_num, $cfg);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars($default_cfg_num, $cfg);
|
||||||
set_tpl_vars_lang($default_cfg_num);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars_lang($default_cfg_num);
|
||||||
|
|
||||||
set_tpl_vars_lang($db_fields_bool);
|
\TorrentPier\Legacy\Admin\Torrent::set_tpl_vars_lang($db_fields_bool);
|
||||||
|
|
||||||
// Get Forums list
|
// Get Forums list
|
||||||
$sql = 'SELECT f.*
|
$sql = 'SELECT f.*
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -30,11 +14,11 @@ if (!empty($setmodules)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : '';
|
$mode = $_GET['mode'] ?? '';
|
||||||
$job_id = isset($_GET['id']) ? (int)$_GET['id'] : '';
|
$job_id = isset($_GET['id']) ? (int)$_GET['id'] : '';
|
||||||
$submit = isset($_POST['submit']);
|
$submit = isset($_POST['submit']);
|
||||||
$jobs = isset($_POST['select']) ? implode(',', $_POST['select']) : '';
|
$jobs = isset($_POST['select']) ? implode(',', $_POST['select']) : '';
|
||||||
$cron_action = isset($_POST['cron_action']) ? $_POST['cron_action'] : '';
|
$cron_action = $_POST['cron_action'] ?? '';
|
||||||
|
|
||||||
if ($mode == 'run' && !$job_id) {
|
if ($mode == 'run' && !$job_id) {
|
||||||
define('BB_ROOT', './../');
|
define('BB_ROOT', './../');
|
||||||
|
@ -49,9 +33,6 @@ if (!IS_SUPER_ADMIN) {
|
||||||
bb_die($lang['NOT_ADMIN']);
|
bb_die($lang['NOT_ADMIN']);
|
||||||
}
|
}
|
||||||
|
|
||||||
require INC_DIR . '/functions_admin_torrent.php';
|
|
||||||
require INC_DIR . '/functions_admin_cron.php';
|
|
||||||
|
|
||||||
$sql = DB()->fetch_rowset('SELECT * FROM ' . BB_CONFIG . " WHERE config_name = 'cron_enabled' OR config_name = 'cron_check_interval'");
|
$sql = DB()->fetch_rowset('SELECT * FROM ' . BB_CONFIG . " WHERE config_name = 'cron_enabled' OR config_name = 'cron_check_interval'");
|
||||||
|
|
||||||
foreach ($sql as $row) {
|
foreach ($sql as $row) {
|
||||||
|
@ -59,7 +40,7 @@ foreach ($sql as $row) {
|
||||||
$config_value = $row['config_value'];
|
$config_value = $row['config_value'];
|
||||||
$default_config[$config_name] = $config_value;
|
$default_config[$config_name] = $config_value;
|
||||||
|
|
||||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
$new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
|
||||||
|
|
||||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
||||||
bb_update_config(array($config_name => $new[$config_name]));
|
bb_update_config(array($config_name => $new[$config_name]));
|
||||||
|
@ -113,7 +94,7 @@ switch ($mode) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'run':
|
case 'run':
|
||||||
run_jobs($job_id);
|
\TorrentPier\Legacy\Admin\Cron::run_jobs($job_id);
|
||||||
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -184,8 +165,8 @@ switch ($mode) {
|
||||||
'CRON_SCRIPT' => '',
|
'CRON_SCRIPT' => '',
|
||||||
'RUN_TIME' => '',
|
'RUN_TIME' => '',
|
||||||
'RUN_ORDER' => 255,
|
'RUN_ORDER' => 255,
|
||||||
'LAST_RUN' => '0000-00-00 00:00:00',
|
'LAST_RUN' => '1900-01-01 00:00:00',
|
||||||
'NEXT_RUN' => '0000-00-00 00:00:00',
|
'NEXT_RUN' => '1900-01-01 00:00:00',
|
||||||
'RUN_INTERVAL' => '',
|
'RUN_INTERVAL' => '',
|
||||||
'LOG_ENABLED' => 0,
|
'LOG_ENABLED' => 0,
|
||||||
'LOG_FILE' => '',
|
'LOG_FILE' => '',
|
||||||
|
@ -196,7 +177,7 @@ switch ($mode) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'delete':
|
case 'delete':
|
||||||
delete_jobs($job_id);
|
\TorrentPier\Legacy\Admin\Cron::delete_jobs($job_id);
|
||||||
bb_die($lang['JOB_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_JOBS'], '<a href="admin_cron.php?mode=list">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
bb_die($lang['JOB_REMOVED'] . '<br /><br />' . sprintf($lang['CLICK_RETURN_JOBS'], '<a href="admin_cron.php?mode=list">', '</a>') . '<br /><br />' . sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '<a href="index.php?pane=right">', '</a>'));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -204,25 +185,25 @@ switch ($mode) {
|
||||||
if ($submit) {
|
if ($submit) {
|
||||||
if ($_POST['mode'] == 'list') {
|
if ($_POST['mode'] == 'list') {
|
||||||
if ($cron_action == 'run' && $jobs) {
|
if ($cron_action == 'run' && $jobs) {
|
||||||
run_jobs($jobs);
|
\TorrentPier\Legacy\Admin\Cron::run_jobs($jobs);
|
||||||
} elseif ($cron_action == 'delete' && $jobs) {
|
} elseif ($cron_action == 'delete' && $jobs) {
|
||||||
delete_jobs($jobs);
|
\TorrentPier\Legacy\Admin\Cron::delete_jobs($jobs);
|
||||||
} elseif (($cron_action == 'disable' || $cron_action == 'enable') && $jobs) {
|
} elseif (($cron_action == 'disable' || $cron_action == 'enable') && $jobs) {
|
||||||
toggle_active($jobs, $cron_action);
|
\TorrentPier\Legacy\Admin\Cron::toggle_active($jobs, $cron_action);
|
||||||
}
|
}
|
||||||
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
||||||
} elseif (validate_cron_post($_POST) == 1) {
|
} elseif (\TorrentPier\Legacy\Admin\Cron::validate_cron_post($_POST) == 1) {
|
||||||
if ($_POST['mode'] == 'edit') {
|
if ($_POST['mode'] == 'edit') {
|
||||||
update_cron_job($_POST);
|
\TorrentPier\Legacy\Admin\Cron::update_cron_job($_POST);
|
||||||
} elseif ($_POST['mode'] == 'add') {
|
} elseif ($_POST['mode'] == 'add') {
|
||||||
insert_cron_job($_POST);
|
\TorrentPier\Legacy\Admin\Cron::insert_cron_job($_POST);
|
||||||
} else {
|
} else {
|
||||||
bb_die('Mode error');
|
bb_die('Mode error');
|
||||||
}
|
}
|
||||||
|
|
||||||
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
redirect('admin/' . basename(__FILE__) . '?mode=list');
|
||||||
} else {
|
} else {
|
||||||
bb_die(validate_cron_post($_POST));
|
bb_die(\TorrentPier\Legacy\Admin\Cron::validate_cron_post($_POST));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -32,14 +16,12 @@ require __DIR__ . '/pagestart.php';
|
||||||
$message = '';
|
$message = '';
|
||||||
|
|
||||||
if (isset($_POST['add_name'])) {
|
if (isset($_POST['add_name'])) {
|
||||||
include INC_DIR . '/functions_validate.php';
|
|
||||||
|
|
||||||
$disallowed_user = isset($_POST['disallowed_user']) ? trim($_POST['disallowed_user']) : trim($_GET['disallowed_user']);
|
$disallowed_user = isset($_POST['disallowed_user']) ? trim($_POST['disallowed_user']) : trim($_GET['disallowed_user']);
|
||||||
|
|
||||||
if ($disallowed_user == '') {
|
if ($disallowed_user == '') {
|
||||||
bb_die($lang['FIELDS_EMPTY']);
|
bb_die($lang['FIELDS_EMPTY']);
|
||||||
}
|
}
|
||||||
if (validate_username($disallowed_user)) {
|
if (\TorrentPier\Legacy\Validate::username($disallowed_user)) {
|
||||||
$message = $lang['DISALLOWED_ALREADY'];
|
$message = $lang['DISALLOWED_ALREADY'];
|
||||||
} else {
|
} else {
|
||||||
$sql = 'INSERT INTO ' . BB_DISALLOW . " (disallow_username) VALUES('" . DB()->escape($disallowed_user) . "')";
|
$sql = 'INSERT INTO ' . BB_DISALLOW . " (disallow_username) VALUES('" . DB()->escape($disallowed_user) . "')";
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -254,9 +238,9 @@ if ($submit && $mode == 'groups') {
|
||||||
|
|
||||||
$allowed_list = array();
|
$allowed_list = array();
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($group_allowed_list); $i < $iMax; $i++) {
|
foreach ($group_allowed_list as $iValue) {
|
||||||
for ($j = 0, $jMax = count($group_change_list); $j < $jMax; $j++) {
|
for ($j = 0, $jMax = count($group_change_list); $j < $jMax; $j++) {
|
||||||
if ($group_allowed_list[$i] == $group_change_list[$j]) {
|
if ($iValue == $group_change_list[$j]) {
|
||||||
$allowed_list[$j] = 1;
|
$allowed_list[$j] = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -387,7 +371,7 @@ if ($mode == 'groups') {
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'TPL_ATTACH_EXTENSION_GROUPS' => true,
|
'TPL_ATTACH_EXTENSION_GROUPS' => true,
|
||||||
'ADD_GROUP_NAME' => isset($extension_group) ? $extension_group : '',
|
'ADD_GROUP_NAME' => $extension_group ?? '',
|
||||||
'MAX_FILESIZE' => $max_add_filesize,
|
'MAX_FILESIZE' => $max_add_filesize,
|
||||||
'S_FILESIZE' => size_select('add_size_select', $size),
|
'S_FILESIZE' => size_select('add_size_select', $size),
|
||||||
'S_ADD_DOWNLOAD_MODE' => download_select('add_download_mode'),
|
'S_ADD_DOWNLOAD_MODE' => download_select('add_download_mode'),
|
||||||
|
@ -472,8 +456,8 @@ if ($add_forum && $e_mode == 'perm' && $group) {
|
||||||
$add_forums_list = get_var('entries', array(0));
|
$add_forums_list = get_var('entries', array(0));
|
||||||
$add_all_forums = false;
|
$add_all_forums = false;
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($add_forums_list); $i < $iMax; $i++) {
|
foreach ($add_forums_list as $iValue) {
|
||||||
if ($add_forums_list[$i] == 0) {
|
if ($iValue == 0) {
|
||||||
$add_all_forums = true;
|
$add_all_forums = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -507,9 +491,9 @@ if ($add_forum && $e_mode == 'perm' && $group) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate array for Auth_Pack, do not add doubled forums
|
// Generate array for Auth_Pack, do not add doubled forums
|
||||||
for ($i = 0, $iMax = count($add_forums_list); $i < $iMax; $i++) {
|
foreach ($add_forums_list as $i => $iValue) {
|
||||||
if (!in_array($add_forums_list[$i], $auth_p)) {
|
if (!in_array($add_forums_list[$i], $auth_p)) {
|
||||||
$auth_p[] = $add_forums_list[$i];
|
$auth_p[] = $iValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,9 +528,9 @@ if ($delete_forum && $e_mode == 'perm' && $group) {
|
||||||
$auth_p = array();
|
$auth_p = array();
|
||||||
|
|
||||||
// Generate array for Auth_Pack, delete the chosen ones
|
// Generate array for Auth_Pack, delete the chosen ones
|
||||||
for ($i = 0, $iMax = count($auth_p2); $i < $iMax; $i++) {
|
foreach ($auth_p2 as $i => $iValue) {
|
||||||
if (!in_array($auth_p2[$i], $delete_forums_list)) {
|
if (!in_array($auth_p2[$i], $delete_forums_list)) {
|
||||||
$auth_p[] = $auth_p2[$i];
|
$auth_p[] = $iValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -50,7 +34,7 @@ if (isset($_REQUEST['submit'])) {
|
||||||
$sql = 'SELECT forum_id, forum_name FROM ' . BB_FORUMS . " $where_sql";
|
$sql = 'SELECT forum_id, forum_name FROM ' . BB_FORUMS . " $where_sql";
|
||||||
|
|
||||||
foreach (DB()->fetch_rowset($sql) as $i => $row) {
|
foreach (DB()->fetch_rowset($sql) as $i => $row) {
|
||||||
$pruned_topics = topic_delete('prune', $row['forum_id'], $prunetime, !empty($_POST['prune_all_topic_types']));
|
$pruned_topics = \TorrentPier\Legacy\Admin\Common::topic_delete('prune', $row['forum_id'], $prunetime, !empty($_POST['prune_all_topic_types']));
|
||||||
$pruned_total += $pruned_topics;
|
$pruned_total += $pruned_topics;
|
||||||
$prune_performed = true;
|
$prune_performed = true;
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -28,7 +12,6 @@ if (!empty($setmodules)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
|
|
||||||
array_deep($_POST, 'trim');
|
array_deep($_POST, 'trim');
|
||||||
|
|
||||||
|
@ -62,7 +45,7 @@ $forumname = '';
|
||||||
if (isset($_REQUEST['addforum']) || isset($_REQUEST['addcategory'])) {
|
if (isset($_REQUEST['addforum']) || isset($_REQUEST['addcategory'])) {
|
||||||
$mode = isset($_REQUEST['addforum']) ? 'addforum' : 'addcat';
|
$mode = isset($_REQUEST['addforum']) ? 'addforum' : 'addcat';
|
||||||
|
|
||||||
if ($mode == 'addforum' && isset($_POST['addforum']) && isset($_POST['forumname']) && is_array($_POST['addforum'])) {
|
if (isset($_POST['addforum'], $_POST['forumname']) && $mode == 'addforum' && is_array($_POST['addforum'])) {
|
||||||
$req_cat_id = array_keys($_POST['addforum']);
|
$req_cat_id = array_keys($_POST['addforum']);
|
||||||
$cat_id = reset($req_cat_id);
|
$cat_id = reset($req_cat_id);
|
||||||
$forumname = stripslashes($_POST['forumname'][$cat_id]);
|
$forumname = stripslashes($_POST['forumname'][$cat_id]);
|
||||||
|
@ -448,7 +431,7 @@ if ($mode) {
|
||||||
|
|
||||||
if ($to_id == -1) {
|
if ($to_id == -1) {
|
||||||
// Delete everything from forum
|
// Delete everything from forum
|
||||||
topic_delete('prune', $from_id, 0, true);
|
\TorrentPier\Legacy\Admin\Common::topic_delete('prune', $from_id, 0, true);
|
||||||
} else {
|
} else {
|
||||||
// Move all posts
|
// Move all posts
|
||||||
$sql = 'SELECT * FROM ' . BB_FORUMS . " WHERE forum_id IN($from_id, $to_id)";
|
$sql = 'SELECT * FROM ' . BB_FORUMS . " WHERE forum_id IN($from_id, $to_id)";
|
||||||
|
@ -477,7 +460,7 @@ if ($mode) {
|
||||||
$start_id += $per_cycle;
|
$start_id += $per_cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
sync('forum', $to_id);
|
\TorrentPier\Legacy\Admin\Common::sync('forum', $to_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
DB()->query('DELETE FROM ' . BB_FORUMS . " WHERE forum_id = $from_id");
|
DB()->query('DELETE FROM ' . BB_FORUMS . " WHERE forum_id = $from_id");
|
||||||
|
@ -486,7 +469,7 @@ if ($mode) {
|
||||||
|
|
||||||
$cat_forums = get_cat_forums();
|
$cat_forums = get_cat_forums();
|
||||||
fix_orphan_sf();
|
fix_orphan_sf();
|
||||||
update_user_level('all');
|
\TorrentPier\Legacy\Group::update_user_level('all');
|
||||||
$datastore->update('cat_forums');
|
$datastore->update('cat_forums');
|
||||||
CACHE('bb_cache')->rm();
|
CACHE('bb_cache')->rm();
|
||||||
|
|
||||||
|
@ -576,15 +559,17 @@ if ($mode) {
|
||||||
$move_down_forum_id = false;
|
$move_down_forum_id = false;
|
||||||
$forums = $cat_forums[$cat_id]['f_ord'];
|
$forums = $cat_forums[$cat_id]['f_ord'];
|
||||||
$forum_order = $forum_info['forum_order'];
|
$forum_order = $forum_info['forum_order'];
|
||||||
$prev_forum = isset($forums[$forum_order - 10]) ? $forums[$forum_order - 10] : false;
|
$prev_forum = $forums[$forum_order - 10] ?? false;
|
||||||
$next_forum = isset($forums[$forum_order + 10]) ? $forums[$forum_order + 10] : false;
|
$next_forum = $forums[$forum_order + 10] ?? false;
|
||||||
|
|
||||||
// move selected forum ($forum_id) UP
|
// move selected forum ($forum_id) UP
|
||||||
if ($move < 0 && $prev_forum) {
|
if ($move < 0 && $prev_forum) {
|
||||||
if ($forum_info['forum_parent'] && $prev_forum['forum_parent'] != $forum_info['forum_parent']) {
|
if ($forum_info['forum_parent'] && $prev_forum['forum_parent'] != $forum_info['forum_parent']) {
|
||||||
$show_main_page = true;
|
$show_main_page = true;
|
||||||
break;
|
break;
|
||||||
} elseif ($move_down_forum_id = get_prev_root_forum_id($forums, $forum_order)) {
|
}
|
||||||
|
|
||||||
|
if ($move_down_forum_id = get_prev_root_forum_id($forums, $forum_order)) {
|
||||||
$move_up_forum_id = $forum_id;
|
$move_up_forum_id = $forum_id;
|
||||||
$move_down_ord_val = (get_sf_count($forum_id) + 1) * 10;
|
$move_down_ord_val = (get_sf_count($forum_id) + 1) * 10;
|
||||||
$move_up_ord_val = ((get_sf_count($move_down_forum_id) + 1) * 10) + $move_down_ord_val;
|
$move_up_ord_val = ((get_sf_count($move_down_forum_id) + 1) * 10) + $move_down_ord_val;
|
||||||
|
@ -595,7 +580,9 @@ if ($mode) {
|
||||||
if ($forum_info['forum_parent'] && $next_forum['forum_parent'] != $forum_info['forum_parent']) {
|
if ($forum_info['forum_parent'] && $next_forum['forum_parent'] != $forum_info['forum_parent']) {
|
||||||
$show_main_page = true;
|
$show_main_page = true;
|
||||||
break;
|
break;
|
||||||
} elseif ($move_up_forum_id = get_next_root_forum_id($forums, $forum_order)) {
|
}
|
||||||
|
|
||||||
|
if ($move_up_forum_id = get_next_root_forum_id($forums, $forum_order)) {
|
||||||
$move_down_forum_id = $forum_id;
|
$move_down_forum_id = $forum_id;
|
||||||
$move_down_forum_order = $forum_order;
|
$move_down_forum_order = $forum_order;
|
||||||
$move_down_ord_val = (get_sf_count($move_up_forum_id) + 1) * 10;
|
$move_down_ord_val = (get_sf_count($move_up_forum_id) + 1) * 10;
|
||||||
|
@ -652,7 +639,7 @@ if ($mode) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'forum_sync':
|
case 'forum_sync':
|
||||||
sync('forum', (int)$_GET['f']);
|
\TorrentPier\Legacy\Admin\Common::sync('forum', (int)$_GET['f']);
|
||||||
$datastore->update('cat_forums');
|
$datastore->update('cat_forums');
|
||||||
CACHE('bb_cache')->rm();
|
CACHE('bb_cache')->rm();
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -28,7 +12,6 @@ if (!empty($setmodules)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
|
|
||||||
$group_id = isset($_REQUEST[POST_GROUPS_URL]) ? (int)$_REQUEST[POST_GROUPS_URL] : 0;
|
$group_id = isset($_REQUEST[POST_GROUPS_URL]) ? (int)$_REQUEST[POST_GROUPS_URL] : 0;
|
||||||
$mode = isset($_REQUEST['mode']) ? (string)$_REQUEST['mode'] : '';
|
$mode = isset($_REQUEST['mode']) ? (string)$_REQUEST['mode'] : '';
|
||||||
|
@ -37,7 +20,7 @@ attachment_quota_settings('group', isset($_POST['group_update']), $mode);
|
||||||
|
|
||||||
if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||||
if (!empty($_POST['edit'])) {
|
if (!empty($_POST['edit'])) {
|
||||||
if (!$row = get_group_data($group_id)) {
|
if (!$row = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
$group_info = array(
|
$group_info = array(
|
||||||
|
@ -88,11 +71,11 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||||
));
|
));
|
||||||
} elseif (!empty($_POST['group_update'])) {
|
} elseif (!empty($_POST['group_update'])) {
|
||||||
if (!empty($_POST['group_delete'])) {
|
if (!empty($_POST['group_delete'])) {
|
||||||
if (!$group_info = get_group_data($group_id)) {
|
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
// Delete Group
|
// Delete Group
|
||||||
delete_group($group_id);
|
\TorrentPier\Legacy\Group::delete_group($group_id);
|
||||||
|
|
||||||
$message = $lang['DELETED_GROUP'] . '<br /><br />';
|
$message = $lang['DELETED_GROUP'] . '<br /><br />';
|
||||||
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
||||||
|
@ -104,7 +87,7 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||||
$release_group = isset($_POST['release_group']) ? (int)$_POST['release_group'] : 0;
|
$release_group = isset($_POST['release_group']) ? (int)$_POST['release_group'] : 0;
|
||||||
$group_name = isset($_POST['group_name']) ? trim($_POST['group_name']) : '';
|
$group_name = isset($_POST['group_name']) ? trim($_POST['group_name']) : '';
|
||||||
$group_desc = isset($_POST['group_description']) ? trim($_POST['group_description']) : '';
|
$group_desc = isset($_POST['group_description']) ? trim($_POST['group_description']) : '';
|
||||||
$group_moderator = isset($_POST['username']) ? $_POST['username'] : '';
|
$group_moderator = $_POST['username'] ?? '';
|
||||||
|
|
||||||
if ($group_name === '') {
|
if ($group_name === '') {
|
||||||
bb_die($lang['NO_GROUP_NAME']);
|
bb_die($lang['NO_GROUP_NAME']);
|
||||||
|
@ -127,18 +110,18 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($mode == 'editgroup') {
|
if ($mode == 'editgroup') {
|
||||||
if (!$group_info = get_group_data($group_id)) {
|
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($group_info['group_moderator'] != $group_moderator) {
|
if ($group_info['group_moderator'] != $group_moderator) {
|
||||||
// Create user_group for new group's moderator
|
// Create user_group for new group's moderator
|
||||||
add_user_into_group($group_id, $group_moderator);
|
\TorrentPier\Legacy\Group::add_user_into_group($group_id, $group_moderator);
|
||||||
$sql_ary['mod_time'] = TIMENOW;
|
$sql_ary['mod_time'] = TIMENOW;
|
||||||
|
|
||||||
// Delete old moderator's user_group
|
// Delete old moderator's user_group
|
||||||
if (isset($_POST['delete_old_moderator'])) {
|
if (isset($_POST['delete_old_moderator'])) {
|
||||||
delete_user_group($group_id, $group_info['group_moderator']);
|
\TorrentPier\Legacy\Group::delete_user_group($group_id, $group_info['group_moderator']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +144,7 @@ if (!empty($_POST['edit']) || !empty($_POST['new'])) {
|
||||||
$new_group_id = DB()->sql_nextid();
|
$new_group_id = DB()->sql_nextid();
|
||||||
|
|
||||||
// Create user_group for group's moderator
|
// Create user_group for group's moderator
|
||||||
add_user_into_group($new_group_id, $group_moderator);
|
\TorrentPier\Legacy\Group::add_user_into_group($new_group_id, $group_moderator);
|
||||||
|
|
||||||
$message = $lang['ADDED_NEW_GROUP'] . '<br /><br />';
|
$message = $lang['ADDED_NEW_GROUP'] . '<br /><br />';
|
||||||
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
$message .= sprintf($lang['CLICK_RETURN_GROUPSADMIN'], '<a href="admin_groups.php">', '</a>') . '<br /><br />';
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -30,4 +14,5 @@ if (!empty($setmodules)) {
|
||||||
|
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
|
/** @noinspection ForgottenDebugOutputInspection */
|
||||||
phpinfo();
|
phpinfo();
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -31,7 +15,7 @@ if (!empty($setmodules)) {
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
if (isset($_GET['mode']) || isset($_POST['mode'])) {
|
if (isset($_GET['mode']) || isset($_POST['mode'])) {
|
||||||
$mode = isset($_GET['mode']) ? $_GET['mode'] : $_POST['mode'];
|
$mode = $_GET['mode'] ?? $_POST['mode'];
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// These could be entered via a form button
|
// These could be entered via a form button
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -150,7 +134,7 @@ if ($mode == 'submit' || $mode == 'refresh') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the db sizes
|
// get the db sizes
|
||||||
list($search_data_size, $search_index_size, $search_tables_size) = get_db_sizes();
|
[$search_data_size, $search_index_size, $search_tables_size] = get_db_sizes();
|
||||||
|
|
||||||
// get the post subject/text of each post
|
// get the post subject/text of each post
|
||||||
$result = DB()->query("
|
$result = DB()->query("
|
||||||
|
@ -306,7 +290,7 @@ if ($mode == 'submit' || $mode == 'refresh') {
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the db sizes
|
// get the db sizes
|
||||||
list($search_data_size, $search_index_size, $search_tables_size) = get_db_sizes();
|
[$search_data_size, $search_index_size, $search_tables_size] = get_db_sizes();
|
||||||
|
|
||||||
// calculate the final (estimated) values
|
// calculate the final (estimated) values
|
||||||
$final_search_tables_size = '';
|
$final_search_tables_size = '';
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -28,7 +12,6 @@ if (!empty($setmodules)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
require INC_DIR . '/functions_selects.php';
|
|
||||||
|
|
||||||
$sql = 'SELECT * FROM ' . BB_CONFIG;
|
$sql = 'SELECT * FROM ' . BB_CONFIG;
|
||||||
|
|
||||||
|
@ -41,7 +24,7 @@ if (!$result = DB()->sql_query($sql)) {
|
||||||
$config_name = $row['config_name'];
|
$config_name = $row['config_name'];
|
||||||
$config_value = $row['config_value'];
|
$config_value = $row['config_value'];
|
||||||
$default_config[$config_name] = $config_value;
|
$default_config[$config_name] = $config_value;
|
||||||
$new[$config_name] = isset($_POST[$config_name]) ? $_POST[$config_name] : $default_config[$config_name];
|
$new[$config_name] = $_POST[$config_name] ?? $default_config[$config_name];
|
||||||
|
|
||||||
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
if (isset($_POST['submit']) && $row['config_value'] != $new[$config_name]) {
|
||||||
$new_params[$config_name] = $new[$config_name];
|
$new_params[$config_name] = $new[$config_name];
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -32,7 +16,7 @@ require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
// Check to see what mode we should operate in
|
// Check to see what mode we should operate in
|
||||||
if (isset($_POST['mode']) || isset($_GET['mode'])) {
|
if (isset($_POST['mode']) || isset($_GET['mode'])) {
|
||||||
$mode = isset($_POST['mode']) ? $_POST['mode'] : $_GET['mode'];
|
$mode = $_POST['mode'] ?? $_GET['mode'];
|
||||||
$mode = htmlspecialchars($mode);
|
$mode = htmlspecialchars($mode);
|
||||||
} else {
|
} else {
|
||||||
$mode = '';
|
$mode = '';
|
||||||
|
@ -93,7 +77,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
|
||||||
bb_die('Could not read smiley pak file');
|
bb_die('Could not read smiley pak file');
|
||||||
}
|
}
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($fcontents); $i < $iMax; $i++) {
|
foreach ($fcontents as $i => $iValue) {
|
||||||
$smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
|
$smile_data = explode($delimeter, trim(addslashes($fcontents[$i])));
|
||||||
|
|
||||||
for ($j = 2, $jMax = count($smile_data); $j < $jMax; $j++) {
|
for ($j = 2, $jMax = count($smile_data); $j < $jMax; $j++) {
|
||||||
|
@ -255,8 +239,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert < and > to proper htmlentities for parsing
|
// Convert < and > to proper htmlentities for parsing
|
||||||
$smile_code = str_replace('<', '<', $smile_code);
|
$smile_code = str_replace(['<', '>'], ['<', '>'], $smile_code);
|
||||||
$smile_code = str_replace('>', '>', $smile_code);
|
|
||||||
|
|
||||||
// Proceed with updating the smiley table
|
// Proceed with updating the smiley table
|
||||||
$sql = 'UPDATE ' . BB_SMILIES . "
|
$sql = 'UPDATE ' . BB_SMILIES . "
|
||||||
|
@ -271,10 +254,10 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'savenew':
|
case 'savenew':
|
||||||
$smile_code = isset($_POST['smile_code']) ? $_POST['smile_code'] : $_GET['smile_code'];
|
$smile_code = $_POST['smile_code'] ?? $_GET['smile_code'];
|
||||||
$smile_url = isset($_POST['smile_url']) ? $_POST['smile_url'] : $_GET['smile_url'];
|
$smile_url = $_POST['smile_url'] ?? $_GET['smile_url'];
|
||||||
$smile_url = bb_ltrim(basename($smile_url), "'");
|
$smile_url = bb_ltrim(basename($smile_url), "'");
|
||||||
$smile_emotion = isset($_POST['smile_emotion']) ? $_POST['smile_emotion'] : $_GET['smile_emotion'];
|
$smile_emotion = $_POST['smile_emotion'] ?? $_GET['smile_emotion'];
|
||||||
$smile_code = trim($smile_code);
|
$smile_code = trim($smile_code);
|
||||||
$smile_url = trim($smile_url);
|
$smile_url = trim($smile_url);
|
||||||
$smile_emotion = trim($smile_emotion);
|
$smile_emotion = trim($smile_emotion);
|
||||||
|
@ -285,8 +268,7 @@ if (isset($_GET['import_pack']) || isset($_POST['import_pack'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert < and > to proper htmlentities for parsing
|
// Convert < and > to proper htmlentities for parsing
|
||||||
$smile_code = str_replace('<', '<', $smile_code);
|
$smile_code = str_replace(['<', '>'], ['<', '>'], $smile_code);
|
||||||
$smile_code = str_replace('>', '>', $smile_code);
|
|
||||||
|
|
||||||
// Save the data to the smiley table
|
// Save the data to the smiley table
|
||||||
$sql = 'INSERT INTO ' . BB_SMILIES . " (code, smile_url, emoticon)
|
$sql = 'INSERT INTO ' . BB_SMILIES . " (code, smile_url, emoticon)
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -32,8 +16,6 @@ require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
$max_forum_name_length = 50;
|
$max_forum_name_length = 50;
|
||||||
|
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
|
|
||||||
$yes_sign = '√';
|
$yes_sign = '√';
|
||||||
$no_sign = 'x';
|
$no_sign = 'x';
|
||||||
|
|
||||||
|
@ -79,7 +61,7 @@ if ($submit && $mode == 'user') {
|
||||||
if ($row = DB()->fetch_row($sql)) {
|
if ($row = DB()->fetch_row($sql)) {
|
||||||
$group_id = $row['group_id'];
|
$group_id = $row['group_id'];
|
||||||
} else {
|
} else {
|
||||||
$group_id = create_user_group($user_id);
|
$group_id = \TorrentPier\Legacy\Group::create_user_group($user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$group_id || !$user_id || null === $this_user_level) {
|
if (!$group_id || !$user_id || null === $this_user_level) {
|
||||||
|
@ -96,7 +78,7 @@ if ($submit && $mode == 'user') {
|
||||||
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . ADMIN . " WHERE user_id = $user_id");
|
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . ADMIN . " WHERE user_id = $user_id");
|
||||||
|
|
||||||
// Delete any entries in auth_access, they are not required if user is becoming an admin
|
// Delete any entries in auth_access, they are not required if user is becoming an admin
|
||||||
delete_permissions($group_id, $user_id);
|
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
|
||||||
|
|
||||||
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
||||||
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />';
|
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />';
|
||||||
|
@ -112,7 +94,7 @@ if ($submit && $mode == 'user') {
|
||||||
// Update users level, reset to USER
|
// Update users level, reset to USER
|
||||||
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . USER . " WHERE user_id = $user_id");
|
DB()->query('UPDATE ' . BB_USERS . ' SET user_level = ' . USER . " WHERE user_id = $user_id");
|
||||||
|
|
||||||
delete_permissions($group_id, $user_id);
|
\TorrentPier\Legacy\Group::delete_permissions($group_id, $user_id);
|
||||||
|
|
||||||
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
||||||
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />';
|
$message .= sprintf($lang['CLICK_RETURN_USERAUTH'], '<a href="admin_ug_auth.php?mode=' . $mode . '">', '</a>') . '<br /><br />';
|
||||||
|
@ -137,10 +119,9 @@ if ($submit && $mode == 'user') {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_permissions($group_id, null, $cat_id);
|
\TorrentPier\Legacy\Group::delete_permissions($group_id, null, $cat_id);
|
||||||
store_permissions($group_id, $auth);
|
\TorrentPier\Legacy\Group::store_permissions($group_id, $auth);
|
||||||
|
\TorrentPier\Legacy\Group::update_user_level($user_id);
|
||||||
update_user_level($user_id);
|
|
||||||
|
|
||||||
$l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH'];
|
$l_auth_return = ($mode == 'user') ? $lang['CLICK_RETURN_USERAUTH'] : $lang['CLICK_RETURN_GROUPAUTH'];
|
||||||
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
||||||
|
@ -153,7 +134,7 @@ if ($submit && $mode == 'user') {
|
||||||
// Submit new GROUP permissions
|
// Submit new GROUP permissions
|
||||||
//
|
//
|
||||||
elseif ($submit && $mode == 'group' && is_array($_POST['auth'])) {
|
elseif ($submit && $mode == 'group' && is_array($_POST['auth'])) {
|
||||||
if (!$group_data = get_group_data($group_id)) {
|
if (!$group_data = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,10 +147,9 @@ elseif ($submit && $mode == 'group' && is_array($_POST['auth'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_permissions($group_id, null, $cat_id);
|
\TorrentPier\Legacy\Group::delete_permissions($group_id, null, $cat_id);
|
||||||
store_permissions($group_id, $auth);
|
\TorrentPier\Legacy\Group::store_permissions($group_id, $auth);
|
||||||
|
\TorrentPier\Legacy\Group::update_user_level('all');
|
||||||
update_user_level('all');
|
|
||||||
|
|
||||||
$l_auth_return = $lang['CLICK_RETURN_GROUPAUTH'];
|
$l_auth_return = $lang['CLICK_RETURN_GROUPAUTH'];
|
||||||
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
$message = $lang['AUTH_UPDATED'] . '<br /><br />';
|
||||||
|
@ -310,7 +290,7 @@ if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) {
|
||||||
} elseif ($mode == 'group' && $group_id) {
|
} elseif ($mode == 'group' && $group_id) {
|
||||||
$page_cfg['quirks_mode'] = true;
|
$page_cfg['quirks_mode'] = true;
|
||||||
|
|
||||||
if (!$group_data = get_group_data($group_id)) {
|
if (!$group_data = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -60,7 +44,7 @@ if (isset($_POST['submit'])) {
|
||||||
if (isset($_POST['ban_email'])) {
|
if (isset($_POST['ban_email'])) {
|
||||||
$email_list_temp = explode(',', $_POST['ban_email']);
|
$email_list_temp = explode(',', $_POST['ban_email']);
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($email_list_temp); $i < $iMax; $i++) {
|
foreach ($email_list_temp as $i => $iValue) {
|
||||||
if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i]))) {
|
if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i]))) {
|
||||||
$email_list[] = trim($email_list_temp[$i]);
|
$email_list[] = trim($email_list_temp[$i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
@ -31,8 +15,6 @@ require __DIR__ . '/pagestart.php';
|
||||||
|
|
||||||
array_deep($_POST, 'trim');
|
array_deep($_POST, 'trim');
|
||||||
|
|
||||||
require INC_DIR . '/functions_selects.php';
|
|
||||||
|
|
||||||
$total_sql = '';
|
$total_sql = '';
|
||||||
|
|
||||||
if (!isset($_REQUEST['dosearch'])) {
|
if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
@ -69,8 +51,8 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$language_list = language_select('', 'language_type');
|
$language_list = \TorrentPier\Legacy\Select::language('', 'language_type');
|
||||||
$timezone_list = tz_select('', 'timezone_type');
|
$timezone_list = \TorrentPier\Legacy\Select::timezone('', 'timezone_type');
|
||||||
|
|
||||||
$sql = 'SELECT f.forum_id, f.forum_name, f.forum_parent, c.cat_id, c.cat_title
|
$sql = 'SELECT f.forum_id, f.forum_name, f.forum_parent, c.cat_id, c.cat_title
|
||||||
FROM ( ' . BB_FORUMS . ' AS f INNER JOIN ' . BB_CATEGORIES . ' AS c ON c.cat_id = f.cat_id )
|
FROM ( ' . BB_FORUMS . ' AS f INNER JOIN ' . BB_CATEGORIES . ' AS c ON c.cat_id = f.cat_id )
|
||||||
|
@ -269,7 +251,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username))));
|
$text = sprintf($lang['SEARCH_FOR_USERNAME'], strip_tags(htmlspecialchars(stripslashes($username))));
|
||||||
|
|
||||||
$username = preg_replace('/\*/', '%', trim(strip_tags(strtolower($username))));
|
$username = str_replace("\*", '%', trim(strip_tags(strtolower($username))));
|
||||||
|
|
||||||
if (false !== strpos($username, '%')) {
|
if (false !== strpos($username, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
|
@ -290,7 +272,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email))));
|
$text = sprintf($lang['SEARCH_FOR_EMAIL'], strip_tags(htmlspecialchars(stripslashes($email))));
|
||||||
|
|
||||||
$email = preg_replace('/\*/', '%', trim(strip_tags(strtolower($email))));
|
$email = str_replace("\*", '%', trim(strip_tags(strtolower($email))));
|
||||||
|
|
||||||
if (false !== strpos($email, '%')) {
|
if (false !== strpos($email, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
|
@ -331,7 +313,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$where_sql = '';
|
$where_sql = '';
|
||||||
$where_sql .= ($ip_in_sql != '') ? "poster_ip IN ($ip_in_sql)" : '';
|
$where_sql .= ($ip_in_sql != '') ? "poster_ip IN ($ip_in_sql)" : '';
|
||||||
$where_sql .= ($ip_like_sql != '') ? ($where_sql != '') ? " OR $ip_like_sql" : "$ip_like_sql" : '';
|
$where_sql .= ($ip_like_sql != '') ? ($where_sql != '') ? " OR $ip_like_sql" : (string)$ip_like_sql : '';
|
||||||
|
|
||||||
if (!$where_sql) {
|
if (!$where_sql) {
|
||||||
bb_die('invalid request');
|
bb_die('invalid request');
|
||||||
|
@ -358,7 +340,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
}
|
}
|
||||||
$where_sql = '';
|
$where_sql = '';
|
||||||
$where_sql .= ($ip_in_sql != '') ? "user_last_ip IN ($ip_in_sql)" : '';
|
$where_sql .= ($ip_in_sql != '') ? "user_last_ip IN ($ip_in_sql)" : '';
|
||||||
$where_sql .= ($ip_like_sql_flylast != '') ? ($where_sql != '') ? " OR $ip_like_sql_flylast" : "$ip_like_sql_flylast" : '';
|
$where_sql .= ($ip_like_sql_flylast != '') ? ($where_sql != '') ? " OR $ip_like_sql_flylast" : (string)$ip_like_sql_flylast : '';
|
||||||
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
|
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
|
||||||
if (!$result = DB()->sql_query($sql)) {
|
if (!$result = DB()->sql_query($sql)) {
|
||||||
bb_die('Could not count users #2');
|
bb_die('Could not count users #2');
|
||||||
|
@ -375,7 +357,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
}
|
}
|
||||||
$where_sql = '';
|
$where_sql = '';
|
||||||
$where_sql .= ($ip_in_sql != '') ? "user_reg_ip IN ($ip_in_sql)" : '';
|
$where_sql .= ($ip_in_sql != '') ? "user_reg_ip IN ($ip_in_sql)" : '';
|
||||||
$where_sql .= ($ip_like_sql_flyreg != '') ? ($where_sql != '') ? " OR $ip_like_sql_flyreg" : "$ip_like_sql_flyreg" : '';
|
$where_sql .= ($ip_like_sql_flyreg != '') ? ($where_sql != '') ? " OR $ip_like_sql_flyreg" : (string)$ip_like_sql_flyreg : '';
|
||||||
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
|
$sql = 'SELECT user_id FROM ' . BB_USERS . ' WHERE user_id <> ' . GUEST_UID . " AND ($where_sql) GROUP BY user_id";
|
||||||
if (!$result = DB()->sql_query($sql)) {
|
if (!$result = DB()->sql_query($sql)) {
|
||||||
bb_die('Could not count users #3');
|
bb_die('Could not count users #3');
|
||||||
|
@ -585,7 +567,7 @@ if (!isset($_REQUEST['dosearch'])) {
|
||||||
|
|
||||||
$text = strip_tags(htmlspecialchars(stripslashes($userfield_value)));
|
$text = strip_tags(htmlspecialchars(stripslashes($userfield_value)));
|
||||||
|
|
||||||
$userfield_value = preg_replace('/\*/', '%', trim(strip_tags(strtolower($userfield_value))));
|
$userfield_value = str_replace("\*", '%', trim(strip_tags(strtolower($userfield_value))));
|
||||||
|
|
||||||
if (false !== strpos($userfield_value, '%')) {
|
if (false !== strpos($userfield_value, '%')) {
|
||||||
$op = 'LIKE';
|
$op = 'LIKE';
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!empty($setmodules)) {
|
if (!empty($setmodules)) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__ . '/pagestart.php';
|
require __DIR__ . '/pagestart.php';
|
||||||
|
@ -50,7 +34,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
||||||
ksort($module);
|
ksort($module);
|
||||||
|
|
||||||
foreach ($module as $cat => $action_array) {
|
foreach ($module as $cat => $action_array) {
|
||||||
$cat = (!empty($lang[$cat])) ? $lang[$cat] : preg_replace('/_/', ' ', $cat);
|
$cat = (!empty($lang[$cat])) ? $lang[$cat] : str_replace("_", ' ', $cat);
|
||||||
|
|
||||||
$template->assign_block_vars('catrow', array(
|
$template->assign_block_vars('catrow', array(
|
||||||
'ADMIN_CATEGORY' => $cat,
|
'ADMIN_CATEGORY' => $cat,
|
||||||
|
@ -62,7 +46,7 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
|
||||||
foreach ($action_array as $action => $file) {
|
foreach ($action_array as $action => $file) {
|
||||||
$row_class = !($row_count % 2) ? 'row1' : 'row2';
|
$row_class = !($row_count % 2) ? 'row1' : 'row2';
|
||||||
|
|
||||||
$action = (!empty($lang[$action])) ? $lang[$action] : preg_replace('/_/', ' ', $action);
|
$action = (!empty($lang[$action])) ? $lang[$action] : str_replace("_", ' ', $action);
|
||||||
|
|
||||||
$template->assign_block_vars('catrow.modulerow', array(
|
$template->assign_block_vars('catrow.modulerow', array(
|
||||||
'ROW_CLASS' => $row_class,
|
'ROW_CLASS' => $row_class,
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_ROOT', './../');
|
define('BB_ROOT', './../');
|
||||||
|
@ -29,7 +13,6 @@ define('IN_ADMIN', true);
|
||||||
require dirname(__DIR__) . '/common.php';
|
require dirname(__DIR__) . '/common.php';
|
||||||
require ATTACH_DIR . '/attachment_mod.php';
|
require ATTACH_DIR . '/attachment_mod.php';
|
||||||
require ATTACH_DIR . '/includes/functions_admin.php';
|
require ATTACH_DIR . '/includes/functions_admin.php';
|
||||||
require_once INC_DIR . '/functions_admin.php';
|
|
||||||
|
|
||||||
$user->session_start();
|
$user->session_start();
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('IN_ADMIN', true);
|
define('IN_ADMIN', true);
|
||||||
|
|
44
ajax.php
44
ajax.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'ajax');
|
define('BB_SCRIPT', 'ajax');
|
||||||
|
@ -47,14 +31,9 @@ if ($ajax->action != 'manage_admin') {
|
||||||
// Load actions required modules
|
// Load actions required modules
|
||||||
switch ($ajax->action) {
|
switch ($ajax->action) {
|
||||||
case 'view_post':
|
case 'view_post':
|
||||||
require INC_DIR . '/bbcode.php';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'posts':
|
case 'posts':
|
||||||
case 'post_mod_comment':
|
case 'post_mod_comment':
|
||||||
require INC_DIR . '/bbcode.php';
|
require INC_DIR . '/bbcode.php';
|
||||||
require INC_DIR . '/functions_post.php';
|
|
||||||
require INC_DIR . '/functions_admin.php';
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'view_torrent':
|
case 'view_torrent':
|
||||||
|
@ -63,21 +42,6 @@ switch ($ajax->action) {
|
||||||
case 'change_torrent':
|
case 'change_torrent':
|
||||||
case 'gen_passkey':
|
case 'gen_passkey':
|
||||||
require ATTACH_DIR . '/attachment_mod.php';
|
require ATTACH_DIR . '/attachment_mod.php';
|
||||||
require INC_DIR . '/functions_torrent.php';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'user_register':
|
|
||||||
require INC_DIR . '/functions_validate.php';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'manage_user':
|
|
||||||
case 'manage_admin':
|
|
||||||
require INC_DIR . '/functions_admin.php';
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'group_membership':
|
|
||||||
case 'manage_group':
|
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('IN_TRACKER', true);
|
define('IN_TRACKER', true);
|
||||||
|
@ -36,7 +20,7 @@ if (empty($_SERVER['HTTP_USER_AGENT'])) {
|
||||||
|
|
||||||
// Ignore 'completed' event
|
// Ignore 'completed' event
|
||||||
if (isset($_GET['event']) && $_GET['event'] === 'completed') {
|
if (isset($_GET['event']) && $_GET['event'] === 'completed') {
|
||||||
dummy_exit(mt_rand(600, 1200));
|
dummy_exit(random_int(600, 1200));
|
||||||
}
|
}
|
||||||
|
|
||||||
$announce_interval = $bb_cfg['announce_interval'];
|
$announce_interval = $bb_cfg['announce_interval'];
|
||||||
|
@ -87,7 +71,7 @@ foreach ($input_vars_num as $var_name) {
|
||||||
$$var_name = isset($_GET[$var_name]) ? (float)$_GET[$var_name] : null;
|
$$var_name = isset($_GET[$var_name]) ? (float)$_GET[$var_name] : null;
|
||||||
}
|
}
|
||||||
// Passkey
|
// Passkey
|
||||||
$passkey = isset($$passkey_key) ? $$passkey_key : null;
|
$passkey = $$passkey_key ?? null;
|
||||||
|
|
||||||
// Verify request
|
// Verify request
|
||||||
// Required params (info_hash, peer_id, port, uploaded, downloaded, left, passkey)
|
// Required params (info_hash, peer_id, port, uploaded, downloaded, left, passkey)
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_TRACKER')) {
|
if (!defined('IN_TRACKER')) {
|
||||||
|
|
24
bt/index.php
24
bt/index.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__ . '/announce.php';
|
require __DIR__ . '/announce.php';
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('IN_TRACKER', true);
|
define('IN_TRACKER', true);
|
||||||
|
|
26
callseed.php
26
callseed.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'callseed');
|
define('BB_SCRIPT', 'callseed');
|
||||||
|
@ -65,7 +49,7 @@ $user_list = DB()->fetch_rowset("
|
||||||
");
|
");
|
||||||
|
|
||||||
$subject = sprintf($lang['CALLSEED_SUBJECT'], $t_data['topic_title']);
|
$subject = sprintf($lang['CALLSEED_SUBJECT'], $t_data['topic_title']);
|
||||||
$message = sprintf($lang['CALLSEED_TEXT'], make_url(TOPIC_URL . $topic_id), $t_data['topic_title'], make_url(DOWNLOAD_URL . $t_data['attach_id']));
|
$message = sprintf($lang['CALLSEED_TEXT'], make_url(TOPIC_URL . $topic_id), $t_data['topic_title'], make_url(DL_URL . $t_data['attach_id']));
|
||||||
|
|
||||||
if ($user_list) {
|
if ($user_list) {
|
||||||
foreach ($user_list as $row) {
|
foreach ($user_list as $row) {
|
||||||
|
|
46
common.php
46
common.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (isset($_REQUEST['GLOBALS'])) {
|
if (isset($_REQUEST['GLOBALS'])) {
|
||||||
|
@ -209,14 +193,6 @@ switch ($bb_cfg['datastore_type']) {
|
||||||
$datastore = new TorrentPier\Legacy\Datastore\Redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
|
$datastore = new TorrentPier\Legacy\Datastore\Redis($bb_cfg['cache']['redis'], $bb_cfg['cache']['prefix']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'apc':
|
|
||||||
$datastore = new TorrentPier\Legacy\Datastore\Apc($bb_cfg['cache']['prefix']);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'xcache':
|
|
||||||
$datastore = new TorrentPier\Legacy\Datastore\Xcache($bb_cfg['cache']['prefix']);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'filecache':
|
case 'filecache':
|
||||||
default:
|
default:
|
||||||
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
|
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
|
||||||
|
@ -264,7 +240,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
|
||||||
$old_name = $file;
|
$old_name = $file;
|
||||||
$ext = '';
|
$ext = '';
|
||||||
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
|
if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) {
|
||||||
list($old_name, $ext) = $matches;
|
[$old_name, $ext] = $matches;
|
||||||
}
|
}
|
||||||
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
|
$new_name = $old_name . '_[old]_' . date('Y-m-d_H-i-s_') . getmypid() . $ext;
|
||||||
clearstatcache();
|
clearstatcache();
|
||||||
|
@ -359,6 +335,10 @@ function hexhex($value)
|
||||||
return dechex(hexdec($value));
|
return dechex(hexdec($value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $str
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function str_compact($str)
|
function str_compact($str)
|
||||||
{
|
{
|
||||||
return preg_replace('#\s+#u', ' ', trim($str));
|
return preg_replace('#\s+#u', ' ', trim($str));
|
||||||
|
@ -406,10 +386,10 @@ function sys($param)
|
||||||
return function_exists('sys_getloadavg') ? implode(' ', sys_getloadavg()) : 0;
|
return function_exists('sys_getloadavg') ? implode(' ', sys_getloadavg()) : 0;
|
||||||
break;
|
break;
|
||||||
case 'mem':
|
case 'mem':
|
||||||
return function_exists('memory_get_usage') ? memory_get_usage() : 0;
|
return memory_get_usage();
|
||||||
break;
|
break;
|
||||||
case 'mem_peak':
|
case 'mem_peak':
|
||||||
return function_exists('memory_get_peak_usage') ? memory_get_peak_usage() : 0;
|
return memory_get_peak_usage();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
trigger_error("invalid param: $param", E_USER_ERROR);
|
trigger_error("invalid param: $param", E_USER_ERROR);
|
||||||
|
@ -473,7 +453,7 @@ function log_request($file = '', $prepend_str = false, $add_post = true)
|
||||||
if (!defined('IN_TRACKER')) {
|
if (!defined('IN_TRACKER')) {
|
||||||
require INC_DIR . '/init_bb.php';
|
require INC_DIR . '/init_bb.php';
|
||||||
} else {
|
} else {
|
||||||
define('DUMMY_PEER', pack('Nn', ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : mt_rand(1000, 65000)));
|
define('DUMMY_PEER', pack('Nn', ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : random_int(1000, 65000)));
|
||||||
|
|
||||||
function dummy_exit($interval = 1800)
|
function dummy_exit($interval = 1800)
|
||||||
{
|
{
|
||||||
|
@ -492,7 +472,7 @@ if (!defined('IN_TRACKER')) {
|
||||||
if (!defined('IN_ADMIN')) {
|
if (!defined('IN_ADMIN')) {
|
||||||
// Exit if tracker is disabled via ON/OFF trigger
|
// Exit if tracker is disabled via ON/OFF trigger
|
||||||
if (file_exists(BB_DISABLED)) {
|
if (file_exists(BB_DISABLED)) {
|
||||||
dummy_exit(mt_rand(60, 2400));
|
dummy_exit(random_int(60, 2400));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
{
|
{
|
||||||
"name": "Exile",
|
"name": "Exile",
|
||||||
"email": "admin@torrentpier.com",
|
"email": "admin@torrentpier.com",
|
||||||
"homepage": "https://github.com/Exile37",
|
"homepage": "https://github.com/Exileum",
|
||||||
"role": "Developer"
|
"role": "Developer"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -35,17 +35,20 @@
|
||||||
"docs": "https://docs.torrentpier.com/"
|
"docs": "https://docs.torrentpier.com/"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^5.6 || ^7.0",
|
"php": "^7.1.3",
|
||||||
"bugsnag/bugsnag": "^3.5",
|
"bugsnag/bugsnag": "3.13.0",
|
||||||
"filp/whoops": "^2.1",
|
"filp/whoops": "^2.2.0",
|
||||||
"gigablah/sphinxphp": "^2.0",
|
"gigablah/sphinxphp": "2.0.8",
|
||||||
"google/recaptcha": "^1.1",
|
"google/recaptcha": "1.1.3",
|
||||||
"longman/ip-tools": "^1.2",
|
"longman/ip-tools": "1.2.1",
|
||||||
"rych/bencode": "^1.0",
|
"rych/bencode": "1.0.0",
|
||||||
"samdark/sitemap": "^2.0",
|
"samdark/sitemap": "2.2.0",
|
||||||
"swiftmailer/swiftmailer": "^5.4",
|
"swiftmailer/swiftmailer": "6.0.2",
|
||||||
"symfony/dotenv": "^3.3",
|
"symfony/dotenv": "4.1.0",
|
||||||
"symfony/var-dumper": "^3.3"
|
"symfony/var-dumper": "4.1.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"roave/security-advisories": "dev-master"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
1304
composer.lock
generated
Normal file
1304
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
24
cron.php
24
cron.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('START_CRON', true);
|
define('START_CRON', true);
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFileSocket.xsd">
|
|
||||||
<allow-access-from domain="*" to-ports="*" secure="false"/>
|
|
||||||
<site-control permitted-cross-domain-policies="master-only"/>
|
|
||||||
</cross-domain-policy>
|
|
36
dl.php
36
dl.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'dl');
|
define('BB_SCRIPT', 'dl');
|
||||||
|
@ -60,8 +44,7 @@ function send_file_to_browser($attachment, $upload_dir)
|
||||||
|
|
||||||
//bt
|
//bt
|
||||||
if (!(isset($_GET['original']) && !IS_USER)) {
|
if (!(isset($_GET['original']) && !IS_USER)) {
|
||||||
include INC_DIR . '/functions_torrent.php';
|
\TorrentPier\Legacy\Torrent::send_torrent_with_passkey($filename);
|
||||||
send_torrent_with_passkey($filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now the tricky part... let's dance
|
// Now the tricky part... let's dance
|
||||||
|
@ -145,7 +128,6 @@ for ($i = 0; $i < $num_auth_pages && $authorised == false; $i++) {
|
||||||
$topic_id = $row['topic_id'];
|
$topic_id = $row['topic_id'];
|
||||||
$forum_id = $row['forum_id'];
|
$forum_id = $row['forum_id'];
|
||||||
|
|
||||||
$is_auth = array();
|
|
||||||
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
|
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
|
||||||
set_die_append_msg($forum_id, $topic_id);
|
set_die_append_msg($forum_id, $topic_id);
|
||||||
|
|
||||||
|
@ -198,12 +180,13 @@ if ($download_mode == PHYSICAL_LINK) {
|
||||||
$url = make_url($upload_dir . '/' . $attachment['physical_filename']);
|
$url = make_url($upload_dir . '/' . $attachment['physical_filename']);
|
||||||
header('Location: ' . $url);
|
header('Location: ' . $url);
|
||||||
exit;
|
exit;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
if (IS_GUEST && !bb_captcha('check')) {
|
if (IS_GUEST && !bb_captcha('check')) {
|
||||||
global $template;
|
global $template;
|
||||||
|
|
||||||
$redirect_url = isset($_POST['redirect_url']) ? $_POST['redirect_url'] : (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/');
|
$redirect_url = $_POST['redirect_url'] ?? $_SERVER['HTTP_REFERER'] ?? '/';
|
||||||
$message = '<form action="' . DOWNLOAD_URL . $attachment['attach_id'] . '" method="post">';
|
$message = '<form action="' . DL_URL . $attachment['attach_id'] . '" method="post">';
|
||||||
$message .= $lang['CAPTCHA'] . ':';
|
$message .= $lang['CAPTCHA'] . ':';
|
||||||
$message .= '<div class="mrg_10" align="center">' . bb_captcha('get') . '</div>';
|
$message .= '<div class="mrg_10" align="center">' . bb_captcha('get') . '</div>';
|
||||||
$message .= '<input type="hidden" name="redirect_url" value="' . $redirect_url . '" />';
|
$message .= '<input type="hidden" name="redirect_url" value="' . $redirect_url . '" />';
|
||||||
|
@ -221,4 +204,3 @@ if ($download_mode == PHYSICAL_LINK) {
|
||||||
|
|
||||||
send_file_to_browser($attachment, $upload_dir);
|
send_file_to_browser($attachment, $upload_dir);
|
||||||
exit;
|
exit;
|
||||||
}
|
|
||||||
|
|
24
dl_list.php
24
dl_list.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'dl_list');
|
define('BB_SCRIPT', 'dl_list');
|
||||||
|
|
36
feed.php
36
feed.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'feed');
|
define('BB_SCRIPT', 'feed');
|
||||||
|
@ -29,9 +13,9 @@ require __DIR__ . '/common.php';
|
||||||
|
|
||||||
$user->session_start(array('req_login' => true));
|
$user->session_start(array('req_login' => true));
|
||||||
|
|
||||||
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
|
$mode = $_REQUEST['mode'] ?? '';
|
||||||
$type = isset($_POST['type']) ? $_POST['type'] : '';
|
$type = $_POST['type'] ?? '';
|
||||||
$id = isset($_POST['id']) ? $_POST['id'] : 0;
|
$id = $_POST['id'] ?? 0;
|
||||||
$timecheck = TIMENOW - 600;
|
$timecheck = TIMENOW - 600;
|
||||||
|
|
||||||
if (!$mode) {
|
if (!$mode) {
|
||||||
|
@ -52,8 +36,7 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) {
|
||||||
if (file_exists($bb_cfg['atom']['path'] . '/f/' . $id . '.atom') && filemtime($bb_cfg['atom']['path'] . '/f/' . $id . '.atom') > $timecheck) {
|
if (file_exists($bb_cfg['atom']['path'] . '/f/' . $id . '.atom') && filemtime($bb_cfg['atom']['path'] . '/f/' . $id . '.atom') > $timecheck) {
|
||||||
redirect($bb_cfg['atom']['url'] . '/f/' . $id . '.atom');
|
redirect($bb_cfg['atom']['url'] . '/f/' . $id . '.atom');
|
||||||
} else {
|
} else {
|
||||||
require_once INC_DIR . '/functions_atom.php';
|
if (\TorrentPier\Legacy\Atom::update_forum_feed($id, $forum_data)) {
|
||||||
if (update_forum_feed($id, $forum_data)) {
|
|
||||||
redirect($bb_cfg['atom']['url'] . '/f/' . $id . '.atom');
|
redirect($bb_cfg['atom']['url'] . '/f/' . $id . '.atom');
|
||||||
} else {
|
} else {
|
||||||
bb_simple_die($lang['ATOM_NO_FORUM']);
|
bb_simple_die($lang['ATOM_NO_FORUM']);
|
||||||
|
@ -71,8 +54,7 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) {
|
||||||
if (file_exists($bb_cfg['atom']['path'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom') && filemtime($bb_cfg['atom']['path'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom') > $timecheck) {
|
if (file_exists($bb_cfg['atom']['path'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom') && filemtime($bb_cfg['atom']['path'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom') > $timecheck) {
|
||||||
redirect($bb_cfg['atom']['url'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom');
|
redirect($bb_cfg['atom']['url'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom');
|
||||||
} else {
|
} else {
|
||||||
require_once INC_DIR . '/functions_atom.php';
|
if (\TorrentPier\Legacy\Atom::update_user_feed($id, $username)) {
|
||||||
if (update_user_feed($id, $username)) {
|
|
||||||
redirect($bb_cfg['atom']['url'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom');
|
redirect($bb_cfg['atom']['url'] . '/u/' . floor($id / 5000) . '/' . ($id % 100) . '/' . $id . '.atom');
|
||||||
} else {
|
} else {
|
||||||
bb_simple_die($lang['ATOM_NO_USER']);
|
bb_simple_die($lang['ATOM_NO_USER']);
|
||||||
|
|
39
group.php
39
group.php
|
@ -1,33 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'group');
|
define('BB_SCRIPT', 'group');
|
||||||
define('BB_ROOT', './');
|
define('BB_ROOT', './');
|
||||||
require __DIR__ . '/common.php';
|
require __DIR__ . '/common.php';
|
||||||
require INC_DIR . '/bbcode.php';
|
require INC_DIR . '/bbcode.php';
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
|
|
||||||
$page_cfg['use_tablesorter'] = true;
|
$page_cfg['use_tablesorter'] = true;
|
||||||
|
|
||||||
|
@ -57,8 +40,6 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$
|
||||||
} else {
|
} else {
|
||||||
$www = '';
|
$www = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->session_start(array('req_login' => true));
|
$user->session_start(array('req_login' => true));
|
||||||
|
@ -75,7 +56,7 @@ $group_info = array();
|
||||||
$is_moderator = false;
|
$is_moderator = false;
|
||||||
|
|
||||||
if ($group_id) {
|
if ($group_id) {
|
||||||
if (!$group_info = get_group_data($group_id)) {
|
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
if (!$group_info['group_id'] || !$group_info['group_moderator'] || !$group_info['moderator_name']) {
|
if (!$group_info['group_id'] || !$group_info['group_moderator'] || !$group_info['moderator_name']) {
|
||||||
|
@ -209,7 +190,7 @@ if (!$group_id) {
|
||||||
bb_die($lang['ALREADY_MEMBER_GROUP']);
|
bb_die($lang['ALREADY_MEMBER_GROUP']);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_user_into_group($group_id, $userdata['user_id'], 1, TIMENOW);
|
\TorrentPier\Legacy\Group::add_user_into_group($group_id, $userdata['user_id'], 1, TIMENOW);
|
||||||
|
|
||||||
if ($bb_cfg['group_send_email']) {
|
if ($bb_cfg['group_send_email']) {
|
||||||
/** @var TorrentPier\Legacy\Emailer() $emailer */
|
/** @var TorrentPier\Legacy\Emailer() $emailer */
|
||||||
|
@ -233,7 +214,7 @@ if (!$group_id) {
|
||||||
set_die_append_msg(false, false, $group_id);
|
set_die_append_msg(false, false, $group_id);
|
||||||
bb_die($lang['GROUP_JOINED']);
|
bb_die($lang['GROUP_JOINED']);
|
||||||
} elseif (!empty($_POST['unsub']) || !empty($_POST['unsubpending'])) {
|
} elseif (!empty($_POST['unsub']) || !empty($_POST['unsubpending'])) {
|
||||||
delete_user_group($group_id, $userdata['user_id']);
|
\TorrentPier\Legacy\Group::delete_user_group($group_id, $userdata['user_id']);
|
||||||
|
|
||||||
set_die_append_msg(false, false, $group_id);
|
set_die_append_msg(false, false, $group_id);
|
||||||
bb_die($lang['UNSUB_SUCCESS']);
|
bb_die($lang['UNSUB_SUCCESS']);
|
||||||
|
@ -251,7 +232,7 @@ if (!$group_id) {
|
||||||
bb_die($lang['COULD_NOT_ADD_USER']);
|
bb_die($lang['COULD_NOT_ADD_USER']);
|
||||||
}
|
}
|
||||||
|
|
||||||
add_user_into_group($group_id, $row['user_id']);
|
\TorrentPier\Legacy\Group::add_user_into_group($group_id, $row['user_id']);
|
||||||
|
|
||||||
if ($bb_cfg['group_send_email']) {
|
if ($bb_cfg['group_send_email']) {
|
||||||
/** @var TorrentPier\Legacy\Emailer() $emailer */
|
/** @var TorrentPier\Legacy\Emailer() $emailer */
|
||||||
|
@ -290,7 +271,7 @@ if (!$group_id) {
|
||||||
AND group_id = $group_id
|
AND group_id = $group_id
|
||||||
");
|
");
|
||||||
|
|
||||||
update_user_level($sql_in);
|
\TorrentPier\Legacy\Group::update_user_level($sql_in);
|
||||||
} elseif (!empty($_POST['deny']) || !empty($_POST['remove'])) {
|
} elseif (!empty($_POST['deny']) || !empty($_POST['remove'])) {
|
||||||
DB()->query("
|
DB()->query("
|
||||||
DELETE FROM " . BB_USER_GROUP . "
|
DELETE FROM " . BB_USER_GROUP . "
|
||||||
|
@ -299,7 +280,7 @@ if (!$group_id) {
|
||||||
");
|
");
|
||||||
|
|
||||||
if (!empty($_POST['remove'])) {
|
if (!empty($_POST['remove'])) {
|
||||||
update_user_level($sql_in);
|
\TorrentPier\Legacy\Group::update_user_level($sql_in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Email users when they are approved
|
// Email users when they are approved
|
||||||
|
|
|
@ -1,32 +1,15 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'group_edit');
|
define('BB_SCRIPT', 'group_edit');
|
||||||
define('BB_ROOT', './');
|
define('BB_ROOT', './');
|
||||||
require __DIR__ . '/common.php';
|
require __DIR__ . '/common.php';
|
||||||
require INC_DIR . '/functions_group.php';
|
|
||||||
|
|
||||||
$page_cfg['include_bbcode_js'] = true;
|
$page_cfg['include_bbcode_js'] = true;
|
||||||
|
|
||||||
|
@ -40,7 +23,7 @@ $is_moderator = false;
|
||||||
$submit = !empty($_POST['submit']);
|
$submit = !empty($_POST['submit']);
|
||||||
|
|
||||||
if ($group_id) {
|
if ($group_id) {
|
||||||
if (!$group_info = get_group_data($group_id)) {
|
if (!$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
bb_die($lang['GROUP_NOT_EXIST']);
|
bb_die($lang['GROUP_NOT_EXIST']);
|
||||||
}
|
}
|
||||||
if (!$group_info['group_id'] || !$group_info['group_moderator'] || !$group_info['moderator_name']) {
|
if (!$group_info['group_id'] || !$group_info['group_moderator'] || !$group_info['moderator_name']) {
|
||||||
|
|
80
index.php
80
index.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'index');
|
define('BB_SCRIPT', 'index');
|
||||||
|
@ -53,11 +37,11 @@ $user->session_start();
|
||||||
|
|
||||||
// Init main vars
|
// Init main vars
|
||||||
$viewcat = isset($_GET['c']) ? (int)$_GET['c'] : 0;
|
$viewcat = isset($_GET['c']) ? (int)$_GET['c'] : 0;
|
||||||
$lastvisit = (IS_GUEST) ? TIMENOW : $userdata['user_lastvisit'];
|
$lastvisit = IS_GUEST ? TIMENOW : $userdata['user_lastvisit'];
|
||||||
|
|
||||||
// Caching output
|
// Caching output
|
||||||
$req_page = 'index_page';
|
$req_page = 'index_page';
|
||||||
$req_page .= ($viewcat) ? "_c{$viewcat}" : '';
|
$req_page .= $viewcat ? "_c{$viewcat}" : '';
|
||||||
|
|
||||||
define('REQUESTED_PAGE', $req_page);
|
define('REQUESTED_PAGE', $req_page);
|
||||||
caching_output(IS_GUEST, 'send', REQUESTED_PAGE . '_guest_' . $bb_cfg['default_lang']);
|
caching_output(IS_GUEST, 'send', REQUESTED_PAGE . '_guest_' . $bb_cfg['default_lang']);
|
||||||
|
@ -90,28 +74,28 @@ $only_new = $user->opt_js['only_new'];
|
||||||
|
|
||||||
// Validate requested category id
|
// Validate requested category id
|
||||||
if ($viewcat && !($viewcat =& $forums['c'][$viewcat]['cat_id'])) {
|
if ($viewcat && !($viewcat =& $forums['c'][$viewcat]['cat_id'])) {
|
||||||
redirect("index.php");
|
redirect('index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forums
|
// Forums
|
||||||
$forums_join_sql = 'f.cat_id = c.cat_id';
|
$forums_join_sql = 'f.cat_id = c.cat_id';
|
||||||
$forums_join_sql .= ($viewcat) ? "
|
$forums_join_sql .= $viewcat ? "
|
||||||
AND f.cat_id = $viewcat
|
AND f.cat_id = $viewcat
|
||||||
" : '';
|
" : '';
|
||||||
$forums_join_sql .= ($excluded_forums_csv) ? "
|
$forums_join_sql .= $excluded_forums_csv ? "
|
||||||
AND f.forum_id NOT IN($excluded_forums_csv)
|
AND f.forum_id NOT IN($excluded_forums_csv)
|
||||||
AND f.forum_parent NOT IN($excluded_forums_csv)
|
AND f.forum_parent NOT IN($excluded_forums_csv)
|
||||||
" : '';
|
" : '';
|
||||||
|
|
||||||
// Posts
|
// Posts
|
||||||
$posts_join_sql = "p.post_id = f.forum_last_post_id";
|
$posts_join_sql = 'p.post_id = f.forum_last_post_id';
|
||||||
$posts_join_sql .= ($only_new == ONLY_NEW_POSTS) ? "
|
$posts_join_sql .= ($only_new == ONLY_NEW_POSTS) ? "
|
||||||
AND p.post_time > $lastvisit
|
AND p.post_time > $lastvisit
|
||||||
" : '';
|
" : '';
|
||||||
$join_p_type = ($only_new == ONLY_NEW_POSTS) ? 'INNER JOIN' : 'LEFT JOIN';
|
$join_p_type = ($only_new == ONLY_NEW_POSTS) ? 'INNER JOIN' : 'LEFT JOIN';
|
||||||
|
|
||||||
// Topics
|
// Topics
|
||||||
$topics_join_sql = "t.topic_last_post_id = p.post_id";
|
$topics_join_sql = 't.topic_last_post_id = p.post_id';
|
||||||
$topics_join_sql .= ($only_new == ONLY_NEW_TOPICS) ? "
|
$topics_join_sql .= ($only_new == ONLY_NEW_TOPICS) ? "
|
||||||
AND t.topic_time > $lastvisit
|
AND t.topic_time > $lastvisit
|
||||||
" : '';
|
" : '';
|
||||||
|
@ -124,13 +108,13 @@ $sql = "
|
||||||
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,
|
t.topic_id AS last_topic_id, t.topic_title AS last_topic_title,
|
||||||
u.user_id AS last_post_user_id, u.user_rank AS last_post_user_rank,
|
u.user_id AS last_post_user_id, u.user_rank AS last_post_user_rank,
|
||||||
IF(p.poster_id = $anon, p.post_username, u.username) AS last_post_username
|
IF(p.poster_id = $anon, p.post_username, u.username) AS last_post_username
|
||||||
FROM " . BB_CATEGORIES . " c
|
FROM " . BB_CATEGORIES . ' c
|
||||||
INNER JOIN " . BB_FORUMS . " f ON($forums_join_sql)
|
INNER JOIN ' . BB_FORUMS . " f ON($forums_join_sql)
|
||||||
$join_p_type " . BB_POSTS . " p ON($posts_join_sql)
|
$join_p_type " . BB_POSTS . " p ON($posts_join_sql)
|
||||||
$join_t_type " . BB_TOPICS . " t ON($topics_join_sql)
|
$join_t_type " . BB_TOPICS . " t ON($topics_join_sql)
|
||||||
LEFT JOIN " . BB_USERS . " u ON(u.user_id = p.poster_id)
|
LEFT JOIN " . BB_USERS . ' u ON(u.user_id = p.poster_id)
|
||||||
ORDER BY c.cat_order, f.forum_order
|
ORDER BY c.cat_order, f.forum_order
|
||||||
";
|
';
|
||||||
|
|
||||||
$replace_in_parent = array(
|
$replace_in_parent = array(
|
||||||
'last_post_id',
|
'last_post_id',
|
||||||
|
@ -207,11 +191,11 @@ foreach ($cat_forums as $cid => $c) {
|
||||||
$template->assign_block_vars('h_c', array(
|
$template->assign_block_vars('h_c', array(
|
||||||
'H_C_ID' => $cid,
|
'H_C_ID' => $cid,
|
||||||
'H_C_TITLE' => $cat_title_html[$cid],
|
'H_C_TITLE' => $cat_title_html[$cid],
|
||||||
'H_C_CHEKED' => in_array($cid, preg_split("/[-]+/", $hide_cat_opt)) ? 'checked' : '',
|
'H_C_CHEKED' => in_array($cid, preg_split('/[-]+/', $hide_cat_opt)) ? 'checked' : '',
|
||||||
));
|
));
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'H_C_AL_MESS' => ($hide_cat_opt && !$showhide),
|
'H_C_AL_MESS' => $hide_cat_opt && !$showhide,
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!$showhide && isset($hide_cat_user[$cid]) && !$viewcat) {
|
if (!$showhide && isset($hide_cat_user[$cid]) && !$viewcat) {
|
||||||
|
@ -232,10 +216,10 @@ foreach ($cat_forums as $cid => $c) {
|
||||||
|
|
||||||
$forums_count++;
|
$forums_count++;
|
||||||
$new = is_unread($f['last_post_time'], $f['last_topic_id'], $f['forum_id']) ? '_new' : '';
|
$new = is_unread($f['last_post_time'], $f['last_topic_id'], $f['forum_id']) ? '_new' : '';
|
||||||
$folder_image = ($is_sf) ? $images["icon_minipost{$new}"] : $images["forum{$new}"];
|
$folder_image = $is_sf ? $images["icon_minipost{$new}"] : $images["forum{$new}"];
|
||||||
|
|
||||||
if ($f['forum_status'] == FORUM_LOCKED) {
|
if ($f['forum_status'] == FORUM_LOCKED) {
|
||||||
$folder_image = ($is_sf) ? $images['icon_minipost'] : $images['forum_locked'];
|
$folder_image = $is_sf ? $images['icon_minipost'] : $images['forum_locked'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($is_sf) {
|
if ($is_sf) {
|
||||||
|
@ -254,9 +238,9 @@ foreach ($cat_forums as $cid => $c) {
|
||||||
'FORUM_DESC' => $f['forum_desc'],
|
'FORUM_DESC' => $f['forum_desc'],
|
||||||
'POSTS' => commify($f['forum_posts']),
|
'POSTS' => commify($f['forum_posts']),
|
||||||
'TOPICS' => commify($f['forum_topics']),
|
'TOPICS' => commify($f['forum_topics']),
|
||||||
'LAST_SF_ID' => isset($f['last_sf_id']) ? $f['last_sf_id'] : null,
|
'LAST_SF_ID' => $f['last_sf_id'] ?? null,
|
||||||
'MODERATORS' => isset($moderators[$fid]) ? implode(', ', $moderators[$fid]) : '',
|
'MODERATORS' => isset($moderators[$fid]) ? implode(', ', $moderators[$fid]) : '',
|
||||||
'FORUM_FOLDER_ALT' => ($new) ? $lang['NEW'] : $lang['OLD'],
|
'FORUM_FOLDER_ALT' => $new ? $lang['NEW'] : $lang['OLD'],
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($f['last_post_id']) {
|
if ($f['last_post_id']) {
|
||||||
|
@ -273,9 +257,9 @@ foreach ($cat_forums as $cid => $c) {
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'SHOW_FORUMS' => $forums_count,
|
'SHOW_FORUMS' => $forums_count,
|
||||||
'SHOW_MAP' => (isset($_GET['map']) && !IS_GUEST),
|
'SHOW_MAP' => isset($_GET['map']) && !IS_GUEST,
|
||||||
'PAGE_TITLE' => ($viewcat) ? $cat_title_html[$viewcat] : $lang['HOME'],
|
'PAGE_TITLE' => $viewcat ? $cat_title_html[$viewcat] : $lang['HOME'],
|
||||||
'NO_FORUMS_MSG' => ($only_new) ? $lang['NO_NEW_POSTS'] : $lang['NO_FORUMS'],
|
'NO_FORUMS_MSG' => $only_new ? $lang['NO_NEW_POSTS'] : $lang['NO_FORUMS'],
|
||||||
|
|
||||||
'TOTAL_TOPICS' => sprintf($lang['POSTED_TOPICS_TOTAL'], $stats['topiccount']),
|
'TOTAL_TOPICS' => sprintf($lang['POSTED_TOPICS_TOTAL'], $stats['topiccount']),
|
||||||
'TOTAL_POSTS' => sprintf($lang['POSTED_ARTICLES_TOTAL'], $stats['postcount']),
|
'TOTAL_POSTS' => sprintf($lang['POSTED_ARTICLES_TOTAL'], $stats['postcount']),
|
||||||
|
@ -310,13 +294,13 @@ $template->assign_vars(array(
|
||||||
'FORUM_LOCKED_IMG' => $images['forum_locked'],
|
'FORUM_LOCKED_IMG' => $images['forum_locked'],
|
||||||
|
|
||||||
'SHOW_ONLY_NEW_MENU' => true,
|
'SHOW_ONLY_NEW_MENU' => true,
|
||||||
'ONLY_NEW_POSTS_ON' => ($only_new == ONLY_NEW_POSTS),
|
'ONLY_NEW_POSTS_ON' => $only_new == ONLY_NEW_POSTS,
|
||||||
'ONLY_NEW_TOPICS_ON' => ($only_new == ONLY_NEW_TOPICS),
|
'ONLY_NEW_TOPICS_ON' => $only_new == ONLY_NEW_TOPICS,
|
||||||
|
|
||||||
'U_SEARCH_NEW' => "search.php?new=1",
|
'U_SEARCH_NEW' => 'search.php?new=1',
|
||||||
'U_SEARCH_SELF_BY_MY' => "search.php?uid={$userdata['user_id']}&o=1",
|
'U_SEARCH_SELF_BY_MY' => "search.php?uid={$userdata['user_id']}&o=1",
|
||||||
'U_SEARCH_LATEST' => "search.php?search_id=latest",
|
'U_SEARCH_LATEST' => 'search.php?search_id=latest',
|
||||||
'U_SEARCH_UNANSWERED' => "search.php?search_id=unanswered",
|
'U_SEARCH_UNANSWERED' => 'search.php?search_id=unanswered',
|
||||||
|
|
||||||
'SHOW_LAST_TOPIC' => $show_last_topic,
|
'SHOW_LAST_TOPIC' => $show_last_topic,
|
||||||
));
|
));
|
||||||
|
@ -379,9 +363,9 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled']) {
|
||||||
$week_all = true;
|
$week_all = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$week_list[] = profile_url($week) . ' <span class="small">(' . birthday_age($week['user_birthday'] - 1) . ')</span>';
|
$week_list[] = profile_url($week) . ' <span class="small">(' . birthday_age($week['user_birthday']) . ')</span>';
|
||||||
}
|
}
|
||||||
$week_all = ($week_all) ? ' <a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_week\'}); return false;" title="' . $lang['ALL'] . '">...</a>' : '';
|
$week_all = $week_all ? ' <a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_week\'}); return false;" title="' . $lang['ALL'] . '">...</a>' : '';
|
||||||
$week_list = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], implode(', ', $week_list)) . $week_all;
|
$week_list = sprintf($lang['BIRTHDAY_WEEK'], $bb_cfg['birthday_check_day'], implode(', ', $week_list)) . $week_all;
|
||||||
} else {
|
} else {
|
||||||
$week_list = sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday_check_day']);
|
$week_list = sprintf($lang['NOBIRTHDAY_WEEK'], $bb_cfg['birthday_check_day']);
|
||||||
|
@ -396,7 +380,7 @@ if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled']) {
|
||||||
}
|
}
|
||||||
$today_list[] = profile_url($today) . ' <span class="small">(' . birthday_age($today['user_birthday']) . ')</span>';
|
$today_list[] = profile_url($today) . ' <span class="small">(' . birthday_age($today['user_birthday']) . ')</span>';
|
||||||
}
|
}
|
||||||
$today_all = ($today_all) ? ' <a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_today\'}); return false;" title="' . $lang['ALL'] . '">...</a>' : '';
|
$today_all = $today_all ? ' <a class="txtb" href="#" onclick="ajax.exec({action: \'index_data\', mode: \'birthday_today\'}); return false;" title="' . $lang['ALL'] . '">...</a>' : '';
|
||||||
$today_list = $lang['BIRTHDAY_TODAY'] . implode(', ', $today_list) . $today_all;
|
$today_list = $lang['BIRTHDAY_TODAY'] . implode(', ', $today_list) . $today_all;
|
||||||
} else {
|
} else {
|
||||||
$today_list = $lang['NOBIRTHDAY_TODAY'];
|
$today_list = $lang['NOBIRTHDAY_TODAY'];
|
||||||
|
|
24
info.php
24
info.php
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define('BB_SCRIPT', 'info');
|
define('BB_SCRIPT', 'info');
|
||||||
|
|
|
@ -569,8 +569,8 @@ CREATE TABLE IF NOT EXISTS `bb_cron` (
|
||||||
`run_day` ENUM ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28') DEFAULT NULL,
|
`run_day` ENUM ('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28') DEFAULT NULL,
|
||||||
`run_time` TIME DEFAULT '04:00:00',
|
`run_time` TIME DEFAULT '04:00:00',
|
||||||
`run_order` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
|
`run_order` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
`last_run` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`last_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00',
|
||||||
`next_run` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
`next_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00',
|
||||||
`run_interval` TIME DEFAULT NULL DEFAULT '0',
|
`run_interval` TIME DEFAULT NULL DEFAULT '0',
|
||||||
`log_enabled` TINYINT(1) NOT NULL DEFAULT '0',
|
`log_enabled` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`log_file` CHAR(120) NOT NULL DEFAULT '',
|
`log_file` CHAR(120) NOT NULL DEFAULT '',
|
||||||
|
@ -896,7 +896,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts` (
|
||||||
`post_edit_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
|
`post_edit_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0',
|
||||||
`post_attachment` TINYINT(1) NOT NULL DEFAULT '0',
|
`post_attachment` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`user_post` TINYINT(1) NOT NULL DEFAULT '1',
|
`user_post` TINYINT(1) NOT NULL DEFAULT '1',
|
||||||
`mc_comment` TEXT NOT NULL,
|
`mc_comment` TEXT NOT NULL DEFAULT '',
|
||||||
`mc_type` TINYINT(1) NOT NULL DEFAULT '0',
|
`mc_type` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`mc_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0',
|
`mc_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0',
|
||||||
PRIMARY KEY (`post_id`),
|
PRIMARY KEY (`post_id`),
|
||||||
|
@ -964,7 +964,7 @@ CREATE TABLE IF NOT EXISTS `bb_posts_text` (
|
||||||
-- Records of bb_posts_text
|
-- Records of bb_posts_text
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `bb_posts_text` VALUES ('1',
|
INSERT INTO `bb_posts_text` VALUES ('1',
|
||||||
'Благодарим вас за установку новой версии TorrentPier Aurochs!\n\nЧто делать дальше? Сперва настройте ваш сайт в администраторском разделе. Измените базовые опции: заголовок сайта, число сообщений на страницу, часовой пояс, язык по-умолчанию, настройки сидбонусов, дней рождения и т.д. Создайте несколько форумов, а также не забудьте переименовать или удалить этот. Обязательно настройте возможность создания релизов в созданных вами разделах и добавьте [url=https://torrentpier.com/threads/25867/]шаблоны оформления раздач[/url] для них. Если у вас возникнут вопросы или потребность в дополнительных модификациях, [url=https://torrentpier.com/forum/]посетите наш форум[/url].\n\nТакже напоминаем, что у проекта TorrentPier есть несколько сайтов, которые могут оказаться полезны для вас:\n[list]\n[*]Форум: https://torrentpier.com/forum/\n[*]Демо-версия: https://demo.torrentpier.com/\n[*]Инструкция: https://docs.torrentpier.com/\n[*]Центр загрузки: https://get.torrentpier.com/\n[*]Перевод на другие языки: https://crowdin.com/project/torrentpier\n[/list]\nНе забудьте добавить их себе в закладки и регулярно проверять наличие новых версий движка на нашем форуме, для своевременного обновления.\n\nНе сомневаемся, вам под силу создать самый лучший трекер. Удачи!');
|
'Благодарим вас за установку новой версии TorrentPier Bison!\n\nЧто делать дальше? Сперва настройте ваш сайт в администраторском разделе. Измените базовые опции: заголовок сайта, число сообщений на страницу, часовой пояс, язык по-умолчанию, настройки сидбонусов, дней рождения и т.д. Создайте несколько форумов, а также не забудьте переименовать или удалить этот. Обязательно настройте возможность создания релизов в созданных вами разделах и добавьте [url=https://torrentpier.com/threads/25867/]шаблоны оформления раздач[/url] для них. Если у вас возникнут вопросы или потребность в дополнительных модификациях, [url=https://torrentpier.com/forum/]посетите наш форум[/url].\n\nТакже напоминаем, что у проекта TorrentPier есть несколько сайтов, которые могут оказаться полезны для вас:\n[list]\n[*]Форум: https://torrentpier.com/forum/\n[*]Демо-версия: https://demo.torrentpier.com/\n[*]Инструкция: https://docs.torrentpier.com/\n[*]Центр загрузки: https://get.torrentpier.com/\n[*]Перевод на другие языки: https://crowdin.com/project/torrentpier\n[/list]\nНе забудьте добавить их себе в закладки и регулярно проверять наличие новых версий движка на нашем форуме, для своевременного обновления.\n\nНе сомневаемся, вам под силу создать самый лучший трекер. Удачи!');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for `bb_privmsgs`
|
-- Table structure for `bb_privmsgs`
|
||||||
|
@ -1224,7 +1224,7 @@ CREATE TABLE IF NOT EXISTS `bb_topics` (
|
||||||
-- Records of bb_topics
|
-- Records of bb_topics
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `bb_topics` VALUES
|
INSERT INTO `bb_topics` VALUES
|
||||||
('1', '1', 'Добро пожаловать в TorrentPier Aurochs', '2', UNIX_TIMESTAMP(), '2', '0', '0', '0', '0', '1', '1', '0', '0',
|
('1', '1', 'Добро пожаловать в TorrentPier Bison', '2', UNIX_TIMESTAMP(), '2', '0', '0', '0', '0', '1', '1', '0', '0',
|
||||||
'0', '1414658247', '0');
|
'0', '1414658247', '0');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
@ -1297,7 +1297,7 @@ CREATE TABLE IF NOT EXISTS `bb_users` (
|
||||||
`user_rank` INT(11) NOT NULL DEFAULT '0',
|
`user_rank` INT(11) NOT NULL DEFAULT '0',
|
||||||
`avatar_ext_id` TINYINT(4) NOT NULL DEFAULT '0',
|
`avatar_ext_id` TINYINT(4) NOT NULL DEFAULT '0',
|
||||||
`user_gender` TINYINT(1) NOT NULL DEFAULT '0',
|
`user_gender` TINYINT(1) NOT NULL DEFAULT '0',
|
||||||
`user_birthday` DATE NOT NULL DEFAULT '0000-00-00',
|
`user_birthday` DATE NOT NULL DEFAULT '1900-01-01',
|
||||||
`user_email` VARCHAR(255) NOT NULL DEFAULT '',
|
`user_email` VARCHAR(255) NOT NULL DEFAULT '',
|
||||||
`user_skype` VARCHAR(32) NOT NULL DEFAULT '',
|
`user_skype` VARCHAR(32) NOT NULL DEFAULT '',
|
||||||
`user_twitter` VARCHAR(15) NOT NULL DEFAULT '',
|
`user_twitter` VARCHAR(15) NOT NULL DEFAULT '',
|
||||||
|
@ -1331,21 +1331,21 @@ INSERT INTO `bb_users` VALUES
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'0000-00-00',
|
'1900-01-01',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
'', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
||||||
INSERT INTO `bb_users` VALUES
|
INSERT INTO `bb_users` VALUES
|
||||||
('-746', '0', 'bot', 'd41d8cd98f00b204e9800998ecf8427e', '0', '0', '0', UNIX_TIMESTAMP(), '0', '0', '0', '', 'ru', '0',
|
('-746', '0', 'bot', 'd41d8cd98f00b204e9800998ecf8427e', '0', '0', '0', UNIX_TIMESTAMP(), '0', '0', '0', '', 'ru', '0',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'144', '0',
|
'144', '0',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'0000-00-00',
|
'1900-01-01',
|
||||||
'bot@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
'bot@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
||||||
INSERT INTO `bb_users` VALUES
|
INSERT INTO `bb_users` VALUES
|
||||||
('2', '1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3', '0', '0', '0', UNIX_TIMESTAMP(), '0', '1', '1', '', 'ru', '0',
|
('2', '1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3', '0', '0', '0', UNIX_TIMESTAMP(), '0', '1', '1', '', 'ru', '0',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'304', '1',
|
'304', '1',
|
||||||
'0', '0',
|
'0', '0',
|
||||||
'0000-00-00',
|
'1900-01-01',
|
||||||
'admin@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
'admin@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
|
@ -32,3 +32,9 @@ ALTER TABLE `bb_banlist` CHANGE `ban_ip` `ban_ip` varchar(42) NOT NULL DEFAULT '
|
||||||
// 2.2.2
|
// 2.2.2
|
||||||
ALTER TABLE `bb_ranks` DROP `rank_min`;
|
ALTER TABLE `bb_ranks` DROP `rank_min`;
|
||||||
ALTER TABLE `bb_ranks` DROP `rank_special`;
|
ALTER TABLE `bb_ranks` DROP `rank_special`;
|
||||||
|
|
||||||
|
// 2.3.0
|
||||||
|
ALTER TABLE `bb_cron` CHANGE `last_run` `last_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00';
|
||||||
|
ALTER TABLE `bb_cron` CHANGE `next_run` `next_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00';
|
||||||
|
ALTER TABLE `bb_users` CHANGE `user_birthday` `user_birthday` DATE NOT NULL DEFAULT '1900-01-01';
|
||||||
|
ALTER TABLE `bb_posts` CHANGE `mc_comment` `mc_comment` TEXT NOT NULL DEFAULT '';
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -52,6 +36,6 @@ switch ($mode) {
|
||||||
|
|
||||||
DB()->query("UPDATE " . BB_USERS . " SET avatar_ext_id = $new_ext_id WHERE user_id = $user_id");
|
DB()->query("UPDATE " . BB_USERS . " SET avatar_ext_id = $new_ext_id WHERE user_id = $user_id");
|
||||||
|
|
||||||
cache_rm_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($user_id);
|
||||||
|
|
||||||
$this->response['avatar_html'] = $response;
|
$this->response['avatar_html'] = $response;
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -99,7 +83,7 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
change_tor_status($attach_id, $new_status);
|
\TorrentPier\Legacy\Torrent::change_tor_status($attach_id, $new_status);
|
||||||
|
|
||||||
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b> · ' . profile_url($userdata) . ' · <i>' . delta_time(TIMENOW) . $lang['TOR_BACK'] . '</i>';
|
$this->response['status'] = $bb_cfg['tor_icons'][$new_status] . ' <b> ' . $lang['TOR_STATUS_NAME'][$new_status] . '</b> · ' . profile_url($userdata) . ' · <i>' . delta_time(TIMENOW) . $lang['TOR_BACK'] . '</i>';
|
||||||
|
|
||||||
|
@ -113,7 +97,7 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']);
|
send_pm($tor['poster_id'], $subject, $message, $userdata['user_id']);
|
||||||
cache_rm_user_sessions($tor['poster_id']);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($tor['poster_id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -131,7 +115,7 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
send_pm($tor['checked_user_id'], $subject, $message, $userdata['user_id']);
|
send_pm($tor['checked_user_id'], $subject, $message, $userdata['user_id']);
|
||||||
cache_rm_user_sessions($tor['checked_user_id']);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($tor['checked_user_id']);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -85,18 +69,18 @@ switch ($type) {
|
||||||
} else {
|
} else {
|
||||||
$tor_type = 0;
|
$tor_type = 0;
|
||||||
}
|
}
|
||||||
change_tor_type($attach_id, $tor_type);
|
\TorrentPier\Legacy\Torrent::change_tor_type($attach_id, $tor_type);
|
||||||
$title = $lang['CHANGE_TOR_TYPE'];
|
$title = $lang['CHANGE_TOR_TYPE'];
|
||||||
$url = make_url(TOPIC_URL . $torrent['topic_id']);
|
$url = make_url(TOPIC_URL . $torrent['topic_id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'reg':
|
case 'reg':
|
||||||
tracker_register($attach_id);
|
\TorrentPier\Legacy\Torrent::tracker_register($attach_id);
|
||||||
$url = (TOPIC_URL . $torrent['topic_id']);
|
$url = (TOPIC_URL . $torrent['topic_id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'unreg':
|
case 'unreg':
|
||||||
tracker_unregister($attach_id);
|
\TorrentPier\Legacy\Torrent::tracker_unregister($attach_id);
|
||||||
$url = (TOPIC_URL . $torrent['topic_id']);
|
$url = (TOPIC_URL . $torrent['topic_id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -104,7 +88,7 @@ switch ($type) {
|
||||||
if (empty($this->request['confirmed'])) {
|
if (empty($this->request['confirmed'])) {
|
||||||
$this->prompt_for_confirm($lang['DEL_TORRENT']);
|
$this->prompt_for_confirm($lang['DEL_TORRENT']);
|
||||||
}
|
}
|
||||||
delete_torrent($attach_id);
|
\TorrentPier\Legacy\Torrent::delete_torrent($attach_id);
|
||||||
$url = make_url(TOPIC_URL . $torrent['topic_id']);
|
$url = make_url(TOPIC_URL . $torrent['topic_id']);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -112,7 +96,7 @@ switch ($type) {
|
||||||
if (empty($this->request['confirmed'])) {
|
if (empty($this->request['confirmed'])) {
|
||||||
$this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']);
|
$this->prompt_for_confirm($lang['DEL_MOVE_TORRENT']);
|
||||||
}
|
}
|
||||||
delete_torrent($attach_id);
|
\TorrentPier\Legacy\Torrent::delete_torrent($attach_id);
|
||||||
$url = make_url("modcp.php?t={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}");
|
$url = make_url("modcp.php?t={$torrent['topic_id']}&mode=move&sid={$userdata['session_id']}");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -49,6 +33,6 @@ foreach ($bf['user_opt'] as $opt_name => $opt_bit) {
|
||||||
DB()->query("UPDATE " . BB_USERS . " SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id");
|
DB()->query("UPDATE " . BB_USERS . " SET user_opt = {$u_data['user_opt']} WHERE user_id = $user_id");
|
||||||
|
|
||||||
// Удаляем данные из кеша
|
// Удаляем данные из кеша
|
||||||
cache_rm_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($user_id);
|
||||||
|
|
||||||
$this->response['resp_html'] = $lang['SAVED'];
|
$this->response['resp_html'] = $lang['SAVED'];
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -42,7 +26,7 @@ if ($rank_id != 0 && !isset($ranks[$rank_id])) {
|
||||||
|
|
||||||
DB()->query("UPDATE " . BB_USERS . " SET user_rank = $rank_id WHERE user_id = $user_id");
|
DB()->query("UPDATE " . BB_USERS . " SET user_rank = $rank_id WHERE user_id = $user_id");
|
||||||
|
|
||||||
cache_rm_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($user_id);
|
||||||
|
|
||||||
$user_rank = ($rank_id) ? '<span class="' . $ranks[$rank_id]['rank_style'] . '">' . $ranks[$rank_id]['rank_title'] . '</span>' : '';
|
$user_rank = ($rank_id) ? '<span class="' . $ranks[$rank_id]['rank_style'] . '">' . $ranks[$rank_id]['rank_title'] . '</span>' : '';
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -29,7 +13,7 @@ if (!defined('IN_AJAX')) {
|
||||||
|
|
||||||
global $bb_cfg, $userdata, $lang;
|
global $bb_cfg, $userdata, $lang;
|
||||||
|
|
||||||
if (!$group_id = (int)$this->request['group_id'] or !$group_info = get_group_data($group_id)) {
|
if (!$group_id = (int)$this->request['group_id'] or !$group_info = \TorrentPier\Legacy\Group::get_group_data($group_id)) {
|
||||||
$this->ajax_die($lang['NO_GROUP_ID_SPECIFIED']);
|
$this->ajax_die($lang['NO_GROUP_ID_SPECIFIED']);
|
||||||
}
|
}
|
||||||
if (!$mode = (string)$this->request['mode']) {
|
if (!$mode = (string)$this->request['mode']) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -41,18 +25,16 @@ $value = $this->request['value'] = (string)(isset($this->request['value'])) ? $t
|
||||||
|
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'username':
|
case 'username':
|
||||||
require_once INC_DIR . '/functions_validate.php';
|
|
||||||
$value = clean_username($value);
|
$value = clean_username($value);
|
||||||
if ($err = validate_username($value)) {
|
if ($err = \TorrentPier\Legacy\Validate::username($value)) {
|
||||||
$this->ajax_die(strip_tags($err));
|
$this->ajax_die(strip_tags($err));
|
||||||
}
|
}
|
||||||
$this->response['new_value'] = $this->request['value'];
|
$this->response['new_value'] = $this->request['value'];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'user_email':
|
case 'user_email':
|
||||||
require_once INC_DIR . '/functions_validate.php';
|
|
||||||
$value = htmlCHR($value);
|
$value = htmlCHR($value);
|
||||||
if ($err = validate_email($value)) {
|
if ($err = \TorrentPier\Legacy\Validate::email($value)) {
|
||||||
$this->ajax_die($err);
|
$this->ajax_die($err);
|
||||||
}
|
}
|
||||||
$this->response['new_value'] = $this->request['value'];
|
$this->response['new_value'] = $this->request['value'];
|
||||||
|
@ -146,7 +128,7 @@ switch ($field) {
|
||||||
|
|
||||||
foreach (array('KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4) as $s => $m) {
|
foreach (array('KB' => 1, 'MB' => 2, 'GB' => 3, 'TB' => 4) as $s => $m) {
|
||||||
if (strpos($this->request['value'], $s) !== false) {
|
if (strpos($this->request['value'], $s) !== false) {
|
||||||
$value *= pow(1024, $m);
|
$value *= (1024 ** $m);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,8 +136,7 @@ switch ($field) {
|
||||||
$this->response['new_value'] = humn_size($value, null, null, ' ');
|
$this->response['new_value'] = humn_size($value, null, null, ' ');
|
||||||
|
|
||||||
if (!$btu = get_bt_userdata($user_id)) {
|
if (!$btu = get_bt_userdata($user_id)) {
|
||||||
require INC_DIR . '/functions_torrent.php';
|
\TorrentPier\Legacy\Torrent::generate_passkey($user_id, true);
|
||||||
generate_passkey($user_id, true);
|
|
||||||
$btu = get_bt_userdata($user_id);
|
$btu = get_bt_userdata($user_id);
|
||||||
}
|
}
|
||||||
$btu[$field] = $value;
|
$btu[$field] = $value;
|
||||||
|
@ -163,7 +144,6 @@ switch ($field) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'user_points':
|
case 'user_points':
|
||||||
$value = htmlCHR($value);
|
|
||||||
$value = (float)str_replace(',', '.', $this->request['value']);
|
$value = (float)str_replace(',', '.', $this->request['value']);
|
||||||
$value = sprintf('%.2f', $value);
|
$value = sprintf('%.2f', $value);
|
||||||
$this->response['new_value'] = $value;
|
$this->response['new_value'] = $value;
|
||||||
|
@ -176,6 +156,6 @@ switch ($field) {
|
||||||
$value_sql = DB()->escape($value, true);
|
$value_sql = DB()->escape($value, true);
|
||||||
DB()->query("UPDATE $table SET $field = $value_sql WHERE user_id = $user_id");
|
DB()->query("UPDATE $table SET $field = $value_sql WHERE user_id = $user_id");
|
||||||
|
|
||||||
cache_rm_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($user_id);
|
||||||
|
|
||||||
$this->response['edit_id'] = $this->request['edit_id'];
|
$this->response['edit_id'] = $this->request['edit_id'];
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -36,11 +20,11 @@ if ($req_uid == $userdata['user_id'] || IS_ADMIN) {
|
||||||
$this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
|
$this->prompt_for_confirm($lang['BT_GEN_PASSKEY_NEW']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$passkey = generate_passkey($req_uid, IS_ADMIN)) {
|
if (!$passkey = \TorrentPier\Legacy\Torrent::generate_passkey($req_uid, IS_ADMIN)) {
|
||||||
$this->ajax_die('Could not insert passkey');
|
$this->ajax_die('Could not insert passkey');
|
||||||
}
|
}
|
||||||
|
|
||||||
tracker_rm_user($req_uid);
|
\TorrentPier\Legacy\Torrent::tracker_rm_user($req_uid);
|
||||||
|
|
||||||
$this->response['passkey'] = $passkey;
|
$this->response['passkey'] = $passkey;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -106,7 +90,7 @@ switch ($mode) {
|
||||||
// Set current user timezone
|
// Set current user timezone
|
||||||
DB()->query("UPDATE " . BB_USERS . " SET user_timezone = $tz WHERE user_id = " . $userdata['user_id']);
|
DB()->query("UPDATE " . BB_USERS . " SET user_timezone = $tz WHERE user_id = " . $userdata['user_id']);
|
||||||
$bb_cfg['board_timezone'] = $tz;
|
$bb_cfg['board_timezone'] = $tz;
|
||||||
cache_rm_user_sessions($userdata['user_id']);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($userdata['user_id']);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -63,7 +47,7 @@ switch ($mode) {
|
||||||
$dir = $template->cachedir;
|
$dir = $template->cachedir;
|
||||||
$res = @opendir($dir);
|
$res = @opendir($dir);
|
||||||
while (($file = readdir($res)) !== false) {
|
while (($file = readdir($res)) !== false) {
|
||||||
if (substr($file, 0, $match_len) === $match) {
|
if (0 === strpos($file, $match)) {
|
||||||
@unlink($dir . $file);
|
@unlink($dir . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,9 +80,7 @@ switch ($mode) {
|
||||||
|
|
||||||
case 'update_user_level':
|
case 'update_user_level':
|
||||||
|
|
||||||
require INC_DIR . '/functions_group.php';
|
\TorrentPier\Legacy\Group::update_user_level('all');
|
||||||
|
|
||||||
update_user_level('all');
|
|
||||||
|
|
||||||
$this->response['update_user_level_html'] = '<span class="seed bold">' . $lang['USER_LEVELS_UPDATED'] . '</span>';
|
$this->response['update_user_level_html'] = '<span class="seed bold">' . $lang['USER_LEVELS_UPDATED'] . '</span>';
|
||||||
|
|
||||||
|
@ -106,8 +88,8 @@ switch ($mode) {
|
||||||
|
|
||||||
case 'sync_topics':
|
case 'sync_topics':
|
||||||
|
|
||||||
sync('topic', 'all');
|
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
|
||||||
sync_all_forums();
|
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
|
||||||
|
|
||||||
$this->response['sync_topics_html'] = '<span class="seed bold">' . $lang['TOPICS_DATA_SYNCHRONIZED'] . '</span>';
|
$this->response['sync_topics_html'] = '<span class="seed bold">' . $lang['TOPICS_DATA_SYNCHRONIZED'] . '</span>';
|
||||||
|
|
||||||
|
@ -115,7 +97,7 @@ switch ($mode) {
|
||||||
|
|
||||||
case 'sync_user_posts':
|
case 'sync_user_posts':
|
||||||
|
|
||||||
sync('user_posts', 'all');
|
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
|
||||||
|
|
||||||
$this->response['sync_user_posts_html'] = '<span class="seed bold">' . $lang['USER_POSTS_COUNT_SYNCHRONIZED'] . '</span>';
|
$this->response['sync_user_posts_html'] = '<span class="seed bold">' . $lang['USER_POSTS_COUNT_SYNCHRONIZED'] . '</span>';
|
||||||
|
|
||||||
|
@ -123,7 +105,7 @@ switch ($mode) {
|
||||||
|
|
||||||
case 'unlock_cron':
|
case 'unlock_cron':
|
||||||
|
|
||||||
TorrentPier\Helpers\CronHelper::enableBoard();
|
\TorrentPier\Helpers\CronHelper::enableBoard();
|
||||||
|
|
||||||
$this->response['unlock_cron_html'] = '<span class="seed bold">' . $lang['ADMIN_UNLOCKED'] . '</span>';
|
$this->response['unlock_cron_html'] = '<span class="seed bold">' . $lang['ADMIN_UNLOCKED'] . '</span>';
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -43,8 +27,8 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user_id != BOT_UID) {
|
if ($user_id != BOT_UID) {
|
||||||
delete_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::delete_user_sessions($user_id);
|
||||||
user_delete($user_id);
|
\TorrentPier\Legacy\Admin\Common::user_delete($user_id);
|
||||||
|
|
||||||
$this->response['info'] = $lang['USER_DELETED'];
|
$this->response['info'] = $lang['USER_DELETED'];
|
||||||
} else {
|
} else {
|
||||||
|
@ -64,8 +48,8 @@ switch ($mode) {
|
||||||
|
|
||||||
if (IS_ADMIN) {
|
if (IS_ADMIN) {
|
||||||
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM " . BB_TOPICS . " WHERE topic_poster = $user_id", 'topic_id');
|
$user_topics = DB()->fetch_rowset("SELECT topic_id FROM " . BB_TOPICS . " WHERE topic_poster = $user_id", 'topic_id');
|
||||||
$deleted_topics = topic_delete($user_topics);
|
$deleted_topics = \TorrentPier\Legacy\Admin\Common::topic_delete($user_topics);
|
||||||
$deleted_posts = post_delete('user', $user_id);
|
$deleted_posts = \TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||||
|
|
||||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||||
} else {
|
} else {
|
||||||
|
@ -84,7 +68,7 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ADMIN) {
|
if (IS_ADMIN) {
|
||||||
post_delete('user', $user_id);
|
\TorrentPier\Legacy\Admin\Common::post_delete('user', $user_id);
|
||||||
|
|
||||||
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
$this->response['info'] = $lang['USER_DELETED_POSTS'];
|
||||||
} else {
|
} else {
|
||||||
|
@ -115,7 +99,7 @@ switch ($mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DB()->query("UPDATE " . BB_USERS . " SET user_active = '0' WHERE user_id = " . $user_id);
|
DB()->query("UPDATE " . BB_USERS . " SET user_active = '0' WHERE user_id = " . $user_id);
|
||||||
delete_user_sessions($user_id);
|
\TorrentPier\Legacy\Sessions::delete_user_sessions($user_id);
|
||||||
|
|
||||||
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
|
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -44,7 +28,7 @@ switch ($mode) {
|
||||||
$topic_ids = DB()->fetch_rowset("SELECT attach_id FROM " . BB_BT_TORRENTS . " WHERE topic_id IN($topics)", 'attach_id');
|
$topic_ids = DB()->fetch_rowset("SELECT attach_id FROM " . BB_BT_TORRENTS . " WHERE topic_id IN($topics)", 'attach_id');
|
||||||
|
|
||||||
foreach ($topic_ids as $attach_id) {
|
foreach ($topic_ids as $attach_id) {
|
||||||
change_tor_status($attach_id, $status);
|
\TorrentPier\Legacy\Torrent::change_tor_status($attach_id, $status);
|
||||||
}
|
}
|
||||||
$this->response['status'] = $bb_cfg['tor_icons'][$status];
|
$this->response['status'] = $bb_cfg['tor_icons'][$status];
|
||||||
$this->response['topics'] = explode(',', $topics);
|
$this->response['topics'] = explode(',', $topics);
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -59,7 +43,7 @@ if ($mc_type && $post['poster_id'] != $userdata['user_id']) {
|
||||||
$message = sprintf($lang['MC_COMMENT_PM_MSG'], get_username($post['poster_id']), make_url(POST_URL . "$post_id#$post_id"), $lang['MC_COMMENT'][$mc_type]['type'], $mc_text);
|
$message = sprintf($lang['MC_COMMENT_PM_MSG'], get_username($post['poster_id']), make_url(POST_URL . "$post_id#$post_id"), $lang['MC_COMMENT'][$mc_type]['type'], $mc_text);
|
||||||
|
|
||||||
send_pm($post['poster_id'], $subject, $message);
|
send_pm($post['poster_id'], $subject, $message);
|
||||||
cache_rm_user_sessions($post['poster_id']);
|
\TorrentPier\Legacy\Sessions::cache_rm_user_sessions($post['poster_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($mc_type) {
|
switch ($mc_type) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -76,7 +60,7 @@ switch ($this->request['type']) {
|
||||||
if (empty($this->request['confirmed'])) {
|
if (empty($this->request['confirmed'])) {
|
||||||
$this->prompt_for_confirm($lang['CONFIRM_DELETE']);
|
$this->prompt_for_confirm($lang['CONFIRM_DELETE']);
|
||||||
}
|
}
|
||||||
post_delete($post_id);
|
\TorrentPier\Legacy\Admin\Common::post_delete($post_id);
|
||||||
|
|
||||||
// Update atom feed
|
// Update atom feed
|
||||||
update_atom('topic', (int)$this->request['topic_id']);
|
update_atom('topic', (int)$this->request['topic_id']);
|
||||||
|
@ -287,7 +271,7 @@ switch ($this->request['type']) {
|
||||||
$post_id = DB()->sql_nextid();
|
$post_id = DB()->sql_nextid();
|
||||||
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '" . DB()->escape($message) . "')");
|
DB()->sql_query("INSERT INTO " . BB_POSTS_TEXT . " (post_id, post_text) VALUES ($post_id, '" . DB()->escape($message) . "')");
|
||||||
|
|
||||||
update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
|
\TorrentPier\Legacy\Post::update_post_stats('reply', $post, $post['forum_id'], $topic_id, $post_id, $userdata['user_id']);
|
||||||
|
|
||||||
$s_message = str_replace('\n', "\n", $message);
|
$s_message = str_replace('\n', "\n", $message);
|
||||||
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
|
$s_topic_title = str_replace('\n', "\n", $post['topic_title']);
|
||||||
|
@ -299,7 +283,7 @@ switch ($this->request['type']) {
|
||||||
|
|
||||||
if ($bb_cfg['topic_notify_enabled']) {
|
if ($bb_cfg['topic_notify_enabled']) {
|
||||||
$notify = !empty($this->request['notify']);
|
$notify = !empty($this->request['notify']);
|
||||||
user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
|
\TorrentPier\Legacy\Post::user_notification('reply', $post, $post['topic_title'], $post['forum_id'], $topic_id, $notify);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update atom feed
|
// Update atom feed
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
@ -38,7 +22,7 @@ switch ($mode) {
|
||||||
|
|
||||||
if (empty($username)) {
|
if (empty($username)) {
|
||||||
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $lang['CHOOSE_A_NAME'] . '</span>';
|
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $lang['CHOOSE_A_NAME'] . '</span>';
|
||||||
} elseif ($err = validate_username($username)) {
|
} elseif ($err = \TorrentPier\Legacy\Validate::username($username)) {
|
||||||
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $err . '</span>';
|
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $err . '</span>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -48,7 +32,7 @@ switch ($mode) {
|
||||||
|
|
||||||
if (empty($email)) {
|
if (empty($email)) {
|
||||||
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $lang['CHOOSE_E_MAIL'] . '</span>';
|
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $lang['CHOOSE_E_MAIL'] . '</span>';
|
||||||
} elseif ($err = validate_email($email)) {
|
} elseif ($err = \TorrentPier\Legacy\Validate::email($email)) {
|
||||||
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $err . '</span>';
|
$html = '<img src="./styles/images/bad.gif"> <span class="leechmed bold">' . $err . '</span>';
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('IN_AJAX')) {
|
if (!defined('IN_AJAX')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -47,12 +31,12 @@ function attach_mod_get_lang($language_file)
|
||||||
$file = LANG_ROOT_DIR . '/' . $bb_cfg['default_lang'] . '/' . $language_file . '.php';
|
$file = LANG_ROOT_DIR . '/' . $bb_cfg['default_lang'] . '/' . $language_file . '.php';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
return $bb_cfg['default_lang'];
|
return $bb_cfg['default_lang'];
|
||||||
} else {
|
}
|
||||||
|
|
||||||
$file = LANG_ROOT_DIR . '/' . $attach_config['board_lang'] . '/' . $language_file . '.php';
|
$file = LANG_ROOT_DIR . '/' . $attach_config['board_lang'] . '/' . $language_file . '.php';
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
return $attach_config['board_lang'];
|
return $attach_config['board_lang'];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
bb_die('Attachment mod language file does not exist: language/' . $attach_config['board_lang'] . '/' . $language_file . '.php');
|
bb_die('Attachment mod language file does not exist: language/' . $attach_config['board_lang'] . '/' . $language_file . '.php');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -41,7 +25,7 @@ function init_complete_extensions_data()
|
||||||
global $allowed_extensions, $display_categories, $download_modes, $upload_icons;
|
global $allowed_extensions, $display_categories, $download_modes, $upload_icons;
|
||||||
|
|
||||||
if (!$extension_informations = get_extension_informations()) {
|
if (!$extension_informations = get_extension_informations()) {
|
||||||
$extension_informations = $GLOBALS['datastore']->update('attach_extensions'); //get_extension_informations()
|
$GLOBALS['datastore']->update('attach_extensions');
|
||||||
$extension_informations = get_extension_informations();
|
$extension_informations = get_extension_informations();
|
||||||
}
|
}
|
||||||
$allowed_extensions = array();
|
$allowed_extensions = array();
|
||||||
|
@ -229,7 +213,7 @@ function display_attachments($post_id)
|
||||||
|
|
||||||
if (@(int)$display_categories[$attachments['_' . $post_id][$i]['extension']] == IMAGE_CAT && (int)$attach_config['img_display_inlined']) {
|
if (@(int)$display_categories[$attachments['_' . $post_id][$i]['extension']] == IMAGE_CAT && (int)$attach_config['img_display_inlined']) {
|
||||||
if ((int)$attach_config['img_link_width'] != 0 || (int)$attach_config['img_link_height'] != 0) {
|
if ((int)$attach_config['img_link_width'] != 0 || (int)$attach_config['img_link_height'] != 0) {
|
||||||
list($width, $height) = image_getdimension($filename);
|
[$width, $height] = image_getdimension($filename);
|
||||||
|
|
||||||
if ($width == 0 && $height == 0) {
|
if ($width == 0 && $height == 0) {
|
||||||
$image = true;
|
$image = true;
|
||||||
|
@ -255,7 +239,7 @@ function display_attachments($post_id)
|
||||||
if ($image) {
|
if ($image) {
|
||||||
// Images
|
// Images
|
||||||
if ($attach_config['upload_dir'][0] == '/' || ($attach_config['upload_dir'][0] != '/' && $attach_config['upload_dir'][1] == ':')) {
|
if ($attach_config['upload_dir'][0] == '/' || ($attach_config['upload_dir'][0] != '/' && $attach_config['upload_dir'][1] == ':')) {
|
||||||
$img_source = BB_ROOT . DOWNLOAD_URL . $attachments['_' . $post_id][$i]['attach_id'];
|
$img_source = BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'];
|
||||||
$download_link = true;
|
$download_link = true;
|
||||||
} else {
|
} else {
|
||||||
$img_source = $filename;
|
$img_source = $filename;
|
||||||
|
@ -285,7 +269,7 @@ function display_attachments($post_id)
|
||||||
if ($thumbnail) {
|
if ($thumbnail) {
|
||||||
// Images, but display Thumbnail
|
// Images, but display Thumbnail
|
||||||
if ($attach_config['upload_dir'][0] == '/' || ($attach_config['upload_dir'][0] != '/' && $attach_config['upload_dir'][1] == ':')) {
|
if ($attach_config['upload_dir'][0] == '/' || ($attach_config['upload_dir'][0] != '/' && $attach_config['upload_dir'][1] == ':')) {
|
||||||
$thumb_source = BB_ROOT . DOWNLOAD_URL . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1';
|
$thumb_source = BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1';
|
||||||
} else {
|
} else {
|
||||||
$thumb_source = $thumbnail_filename;
|
$thumb_source = $thumbnail_filename;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +277,7 @@ function display_attachments($post_id)
|
||||||
$template->assign_block_vars('postrow.attach.cat_thumb_images', array(
|
$template->assign_block_vars('postrow.attach.cat_thumb_images', array(
|
||||||
'DOWNLOAD_NAME' => $display_name,
|
'DOWNLOAD_NAME' => $display_name,
|
||||||
'S_UPLOAD_IMAGE' => $upload_image,
|
'S_UPLOAD_IMAGE' => $upload_image,
|
||||||
'IMG_SRC' => BB_ROOT . DOWNLOAD_URL . $attachments['_' . $post_id][$i]['attach_id'],
|
'IMG_SRC' => BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'],
|
||||||
'IMG_THUMB_SRC' => $thumb_source,
|
'IMG_THUMB_SRC' => $thumb_source,
|
||||||
'FILESIZE' => $filesize,
|
'FILESIZE' => $filesize,
|
||||||
'COMMENT' => $comment,
|
'COMMENT' => $comment,
|
||||||
|
@ -308,7 +292,7 @@ function display_attachments($post_id)
|
||||||
|
|
||||||
// display attachment
|
// display attachment
|
||||||
$template->assign_block_vars('postrow.attach.attachrow', array(
|
$template->assign_block_vars('postrow.attach.attachrow', array(
|
||||||
'U_DOWNLOAD_LINK' => BB_ROOT . DOWNLOAD_URL . $attachments['_' . $post_id][$i]['attach_id'],
|
'U_DOWNLOAD_LINK' => BB_ROOT . DL_URL . $attachments['_' . $post_id][$i]['attach_id'],
|
||||||
'S_UPLOAD_IMAGE' => $upload_image,
|
'S_UPLOAD_IMAGE' => $upload_image,
|
||||||
'DOWNLOAD_NAME' => $display_name,
|
'DOWNLOAD_NAME' => $display_name,
|
||||||
'FILESIZE' => $filesize,
|
'FILESIZE' => $filesize,
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -56,7 +40,7 @@ $template->assign_vars(array(
|
||||||
|
|
||||||
// Define show peers mode (count only || user names with complete % || full details)
|
// Define show peers mode (count only || user names with complete % || full details)
|
||||||
$cfg_sp_mode = $bb_cfg['bt_show_peers_mode'];
|
$cfg_sp_mode = $bb_cfg['bt_show_peers_mode'];
|
||||||
$get_sp_mode = (isset($_GET['spmode'])) ? $_GET['spmode'] : '';
|
$get_sp_mode = $_GET['spmode'] ?? '';
|
||||||
|
|
||||||
$s_mode = 'count';
|
$s_mode = 'count';
|
||||||
|
|
||||||
|
@ -93,7 +77,7 @@ $tor_auth_del = ($tor_auth && $tor_reged);
|
||||||
|
|
||||||
$tracker_link = ($tor_reged) ? $lang['BT_REG_YES'] : $lang['BT_REG_NO'];
|
$tracker_link = ($tor_reged) ? $lang['BT_REG_YES'] : $lang['BT_REG_NO'];
|
||||||
|
|
||||||
$download_link = DOWNLOAD_URL . $attach_id;
|
$download_link = DL_URL . $attach_id;
|
||||||
$description = ($comment) ?: preg_replace("#.torrent$#i", '', $display_name);
|
$description = ($comment) ?: preg_replace("#.torrent$#i", '', $display_name);
|
||||||
|
|
||||||
if ($tor_auth_reg || $tor_auth_del) {
|
if ($tor_auth_reg || $tor_auth_del) {
|
||||||
|
@ -159,7 +143,7 @@ if ($tor_reged && $tor_info) {
|
||||||
|
|
||||||
// Magnet link
|
// Magnet link
|
||||||
$passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = " . (int)$bt_user_id . " LIMIT 1");
|
$passkey = DB()->fetch_row("SELECT auth_key FROM " . BB_BT_USERS . " WHERE user_id = " . (int)$bt_user_id . " LIMIT 1");
|
||||||
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key'], $userdata['session_logged_in']);
|
$tor_magnet = create_magnet($tor_info['info_hash'], $passkey['auth_key']);
|
||||||
|
|
||||||
// ratio limits
|
// ratio limits
|
||||||
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];
|
$min_ratio_dl = $bb_cfg['bt_min_ratio_allow_dl_tor'];
|
||||||
|
@ -183,14 +167,14 @@ if ($tor_reged && $tor_info) {
|
||||||
|
|
||||||
$bt_userdata = DB()->fetch_row($sql);
|
$bt_userdata = DB()->fetch_row($sql);
|
||||||
|
|
||||||
$user_status = isset($bt_userdata['user_status']) ? $bt_userdata['user_status'] : null;
|
$user_status = $bt_userdata['user_status'] ?? null;
|
||||||
|
|
||||||
if (($min_ratio_dl || $min_ratio_warn) && $user_status != DL_STATUS_COMPLETE && $bt_user_id != $poster_id && $tor_type != TOR_TYPE_GOLD) {
|
if (($min_ratio_dl || $min_ratio_warn) && $user_status != DL_STATUS_COMPLETE && $bt_user_id != $poster_id && $tor_type != TOR_TYPE_GOLD) {
|
||||||
if (($user_ratio = get_bt_ratio($bt_userdata)) !== null) {
|
if (($user_ratio = get_bt_ratio($bt_userdata)) !== null) {
|
||||||
$dl_allowed = ($user_ratio > $min_ratio_dl);
|
$dl_allowed = ($user_ratio > $min_ratio_dl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((isset($user_ratio) && isset($min_ratio_warn) && $user_ratio < $min_ratio_warn && TR_RATING_LIMITS) || ($bt_userdata['u_down_total'] < MIN_DL_FOR_RATIO)) {
|
if ((isset($user_ratio, $min_ratio_warn) && $user_ratio < $min_ratio_warn && TR_RATING_LIMITS) || ($bt_userdata['u_down_total'] < MIN_DL_FOR_RATIO)) {
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
'SHOW_RATIO_WARN' => true,
|
'SHOW_RATIO_WARN' => true,
|
||||||
'RATIO_WARN_MSG' => sprintf($lang['BT_RATIO_WARNING_MSG'], $min_ratio_dl, $bb_cfg['ratio_url_help']),
|
'RATIO_WARN_MSG' => sprintf($lang['BT_RATIO_WARNING_MSG'], $min_ratio_dl, $bb_cfg['ratio_url_help']),
|
||||||
|
@ -400,7 +384,7 @@ if ($tor_reged && $tor_info) {
|
||||||
define('SEEDER_EXIST', true);
|
define('SEEDER_EXIST', true);
|
||||||
$seed_order_action = "viewtopic.php?" . POST_TOPIC_URL . "=$bt_topic_id&spmode=full#seeders";
|
$seed_order_action = "viewtopic.php?" . POST_TOPIC_URL . "=$bt_topic_id&spmode=full#seeders";
|
||||||
|
|
||||||
$template->assign_block_vars("$x_full", array(
|
$template->assign_block_vars((string)$x_full, array(
|
||||||
'SEED_ORD_ACT' => $seed_order_action,
|
'SEED_ORD_ACT' => $seed_order_action,
|
||||||
'SEEDERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s'
|
'SEEDERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s'
|
||||||
));
|
));
|
||||||
|
@ -422,7 +406,7 @@ if ($tor_reged && $tor_info) {
|
||||||
define('LEECHER_EXIST', true);
|
define('LEECHER_EXIST', true);
|
||||||
$leech_order_action = "viewtopic.php?" . POST_TOPIC_URL . "=$bt_topic_id&spmode=full#leechers";
|
$leech_order_action = "viewtopic.php?" . POST_TOPIC_URL . "=$bt_topic_id&spmode=full#leechers";
|
||||||
|
|
||||||
$template->assign_block_vars("$x_full", array(
|
$template->assign_block_vars((string)$x_full, array(
|
||||||
'LEECH_ORD_ACT' => $leech_order_action,
|
'LEECH_ORD_ACT' => $leech_order_action,
|
||||||
'LEECHERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s',
|
'LEECHERS_UP_TOT' => humn_size($sp_up_tot[$x], 0, 'KB') . '/s',
|
||||||
'LEECHERS_DOWN_TOT' => humn_size($sp_down_tot[$x], 0, 'KB') . '/s'
|
'LEECHERS_DOWN_TOT' => humn_size($sp_down_tot[$x], 0, 'KB') . '/s'
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +101,7 @@ function sort_multi_array($sort_array, $key, $sort_order, $pre_string_sort = 0)
|
||||||
for ($i = 0; $i < $last_element; $i++) {
|
for ($i = 0; $i < $last_element; $i++) {
|
||||||
$num_iterations = $last_element - $i;
|
$num_iterations = $last_element - $i;
|
||||||
|
|
||||||
for ($j = 0; $j < $num_iterations; $j++) {
|
foreach ($sort_array as $j => $jValue) {
|
||||||
// do checks based on key
|
// do checks based on key
|
||||||
$switch = false;
|
$switch = false;
|
||||||
if (!$string_sort) {
|
if (!$string_sort) {
|
||||||
|
@ -133,7 +117,7 @@ function sort_multi_array($sort_array, $key, $sort_order, $pre_string_sort = 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($switch) {
|
if ($switch) {
|
||||||
$temp = $sort_array[$j];
|
$temp = $jValue;
|
||||||
$sort_array[$j] = $sort_array[$j + 1];
|
$sort_array[$j] = $sort_array[$j + 1];
|
||||||
$sort_array[$j + 1] = $temp;
|
$sort_array[$j + 1] = $temp;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +1,16 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All Attachment Functions needed everywhere
|
* All Attachment Functions needed everywhere
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* html_entity_decode replacement (from php manual)
|
|
||||||
*/
|
|
||||||
if (!function_exists('html_entity_decode')) {
|
|
||||||
function html_entity_decode($given_html, $quote_style = ENT_QUOTES)
|
|
||||||
{
|
|
||||||
$trans_table = array_flip(get_html_translation_table(HTML_SPECIALCHARS, $quote_style));
|
|
||||||
$trans_table['''] = "'";
|
|
||||||
return (strtr($given_html, $trans_table));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple dectobase64 function
|
* A simple dectobase64 function
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +56,7 @@ function base64_unpack($string)
|
||||||
for ($i = 1; $i <= $length; $i++) {
|
for ($i = 1; $i <= $length; $i++) {
|
||||||
$pos = $length - $i;
|
$pos = $length - $i;
|
||||||
$operand = strpos($chars, $string[$pos]);
|
$operand = strpos($chars, $string[$pos]);
|
||||||
$exponent = pow($base, $i - 1);
|
$exponent = $base ** ($i - 1);
|
||||||
$decValue = $operand * $exponent;
|
$decValue = $operand * $exponent;
|
||||||
$number += $decValue;
|
$number += $decValue;
|
||||||
}
|
}
|
||||||
|
@ -103,7 +75,7 @@ function auth_pack($auth_array)
|
||||||
$one_char = $two_char = false;
|
$one_char = $two_char = false;
|
||||||
$auth_cache = '';
|
$auth_cache = '';
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($auth_array); $i < $iMax; $i++) {
|
foreach ($auth_array as $i => $iValue) {
|
||||||
$val = base64_pack((int)$auth_array[$i]);
|
$val = base64_pack((int)$auth_array[$i]);
|
||||||
if (strlen($val) == 1 && !$one_char) {
|
if (strlen($val) == 1 && !$one_char) {
|
||||||
$auth_cache .= $one_char_encoding;
|
$auth_cache .= $one_char_encoding;
|
||||||
|
@ -130,7 +102,7 @@ function auth_unpack($auth_cache)
|
||||||
$auth = [];
|
$auth = [];
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
|
||||||
for ($pos = 0; $pos < strlen($auth_cache); $pos += $auth_len) {
|
for ($pos = 0, $posMax = strlen($auth_cache); $pos < $posMax; $pos += $auth_len) {
|
||||||
$forum_auth = $auth_cache[$pos];
|
$forum_auth = $auth_cache[$pos];
|
||||||
if ($forum_auth == $one_char_encoding) {
|
if ($forum_auth == $one_char_encoding) {
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
@ -165,7 +137,7 @@ function is_forum_authed($auth_cache, $check_forum_id)
|
||||||
$auth = [];
|
$auth = [];
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
|
||||||
for ($pos = 0; $pos < strlen($auth_cache); $pos += $auth_len) {
|
for ($pos = 0, $posMax = strlen($auth_cache); $pos < $posMax; $pos += $auth_len) {
|
||||||
$forum_auth = $auth_cache[$pos];
|
$forum_auth = $auth_cache[$pos];
|
||||||
if ($forum_auth == $one_char_encoding) {
|
if ($forum_auth == $one_char_encoding) {
|
||||||
$auth_len = 1;
|
$auth_len = 1;
|
||||||
|
@ -282,7 +254,7 @@ function get_attachments_from_post($post_id_array)
|
||||||
$post_id_array[] = $post_id;
|
$post_id_array[] = $post_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
$post_id_array = implode(', ', array_map('intval', $post_id_array));
|
$post_id_array = implode(', ', array_map('\intval', $post_id_array));
|
||||||
|
|
||||||
if ($post_id_array == '') {
|
if ($post_id_array == '') {
|
||||||
return $attachments;
|
return $attachments;
|
||||||
|
@ -320,7 +292,7 @@ function get_total_attach_filesize($attach_ids)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
$attach_ids = implode(', ', array_map('intval', $attach_ids));
|
$attach_ids = implode(', ', array_map('\intval', $attach_ids));
|
||||||
|
|
||||||
if (!$attach_ids) {
|
if (!$attach_ids) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -428,7 +400,7 @@ function get_extension($filename)
|
||||||
*/
|
*/
|
||||||
function delete_extension($filename)
|
function delete_extension($filename)
|
||||||
{
|
{
|
||||||
return substr($filename, 0, strrpos(strtolower(trim($filename)), '.'));
|
return substr($filename, 0, strripos(trim($filename), '.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -551,7 +523,7 @@ function attach_mod_sql_escape($text)
|
||||||
return DB()->escape_string($text);
|
return DB()->escape_string($text);
|
||||||
}
|
}
|
||||||
|
|
||||||
return str_replace("'", "''", str_replace('\\', '\\\\', $text));
|
return str_replace(['\\', "'"], ['\\\\', "''"], $text);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,7 +27,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
||||||
if (!is_array($attach_id_array)) {
|
if (!is_array($attach_id_array)) {
|
||||||
if (false !== strpos($attach_id_array, ', ')) {
|
if (false !== strpos($attach_id_array, ', ')) {
|
||||||
$attach_id_array = explode(', ', $attach_id_array);
|
$attach_id_array = explode(', ', $attach_id_array);
|
||||||
} elseif (strstr($attach_id_array, ',')) {
|
} elseif (false !== strpos($attach_id_array, ',')) {
|
||||||
$attach_id_array = explode(',', $attach_id_array);
|
$attach_id_array = explode(',', $attach_id_array);
|
||||||
} else {
|
} else {
|
||||||
$attach_id = (int)$attach_id_array;
|
$attach_id = (int)$attach_id_array;
|
||||||
|
@ -84,7 +68,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
||||||
|
|
||||||
if (false !== strpos($post_id_array, ', ')) {
|
if (false !== strpos($post_id_array, ', ')) {
|
||||||
$post_id_array = explode(', ', $post_id_array);
|
$post_id_array = explode(', ', $post_id_array);
|
||||||
} elseif (strstr($post_id_array, ',')) {
|
} elseif (false !== strpos($post_id_array, ',')) {
|
||||||
$post_id_array = explode(',', $post_id_array);
|
$post_id_array = explode(',', $post_id_array);
|
||||||
} else {
|
} else {
|
||||||
$post_id = (int)$post_id_array;
|
$post_id = (int)$post_id_array;
|
||||||
|
@ -129,7 +113,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
||||||
if (!is_array($attach_id_array)) {
|
if (!is_array($attach_id_array)) {
|
||||||
if (false !== strpos($attach_id_array, ', ')) {
|
if (false !== strpos($attach_id_array, ', ')) {
|
||||||
$attach_id_array = explode(', ', $attach_id_array);
|
$attach_id_array = explode(', ', $attach_id_array);
|
||||||
} elseif (strstr($attach_id_array, ',')) {
|
} elseif (false !== strpos($attach_id_array, ',')) {
|
||||||
$attach_id_array = explode(',', $attach_id_array);
|
$attach_id_array = explode(',', $attach_id_array);
|
||||||
} else {
|
} else {
|
||||||
$attach_id = (int)$attach_id_array;
|
$attach_id = (int)$attach_id_array;
|
||||||
|
@ -187,7 +171,7 @@ function delete_attachment($post_id_array = 0, $attach_id_array = 0, $page = 0,
|
||||||
}
|
}
|
||||||
//bt end
|
//bt end
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($attach_id_array); $i < $iMax; $i++) {
|
foreach ($attach_id_array as $i => $iValue) {
|
||||||
$sql = 'SELECT attach_id
|
$sql = 'SELECT attach_id
|
||||||
FROM ' . BB_ATTACHMENTS . '
|
FROM ' . BB_ATTACHMENTS . '
|
||||||
WHERE attach_id = ' . (int)$attach_id_array[$i];
|
WHERE attach_id = ' . (int)$attach_id_array[$i];
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -204,7 +188,7 @@ function quota_limit_select($select_name, $default_quota = 0)
|
||||||
}
|
}
|
||||||
DB()->sql_freeresult($result);
|
DB()->sql_freeresult($result);
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($quota_name); $i < $iMax; $i++) {
|
foreach ($quota_name as $i => $iValue) {
|
||||||
$selected = ($quota_name[$i]['quota_limit_id'] == $default_quota) ? ' selected="selected"' : '';
|
$selected = ($quota_name[$i]['quota_limit_id'] == $default_quota) ? ' selected="selected"' : '';
|
||||||
$quota_select .= '<option value="' . $quota_name[$i]['quota_limit_id'] . '"' . $selected . '>' . $quota_name[$i]['quota_desc'] . '</option>';
|
$quota_select .= '<option value="' . $quota_name[$i]['quota_limit_id'] . '"' . $selected . '>' . $quota_name[$i]['quota_desc'] . '</option>';
|
||||||
}
|
}
|
||||||
|
@ -235,7 +219,7 @@ function default_quota_limit_select($select_name, $default_quota = 0)
|
||||||
}
|
}
|
||||||
DB()->sql_freeresult($result);
|
DB()->sql_freeresult($result);
|
||||||
|
|
||||||
for ($i = 0, $iMax = count($quota_name); $i < $iMax; $i++) {
|
foreach ($quota_name as $i => $iValue) {
|
||||||
$selected = ($quota_name[$i]['quota_limit_id'] == $default_quota) ? ' selected="selected"' : '';
|
$selected = ($quota_name[$i]['quota_limit_id'] == $default_quota) ? ' selected="selected"' : '';
|
||||||
$quota_select .= '<option value="' . $quota_name[$i]['quota_limit_id'] . '"' . $selected . '>' . $quota_name[$i]['quota_desc'] . '</option>';
|
$quota_select .= '<option value="' . $quota_name[$i]['quota_limit_id'] . '"' . $selected . '>' . $quota_name[$i]['quota_desc'] . '</option>';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -42,13 +26,13 @@ function get_img_size_format($width, $height)
|
||||||
round($width * ($max_width / $width)),
|
round($width * ($max_width / $width)),
|
||||||
round($height * ($max_width / $width))
|
round($height * ($max_width / $width))
|
||||||
);
|
);
|
||||||
} else {
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
round($width * ($max_width / $height)),
|
round($width * ($max_width / $height)),
|
||||||
round($height * ($max_width / $height))
|
round($height * ($max_width / $height))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if imagick is present
|
* Check if imagick is present
|
||||||
|
@ -60,9 +44,9 @@ function is_imagick()
|
||||||
if ($attach_config['img_imagick'] != '') {
|
if ($attach_config['img_imagick'] != '') {
|
||||||
$imagick = $attach_config['img_imagick'];
|
$imagick = $attach_config['img_imagick'];
|
||||||
return true;
|
return true;
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -119,15 +103,13 @@ function create_thumbnail($source, $new_file, $mimetype)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
list($width, $height, $type, ) = getimagesize($source);
|
[$width, $height, $type,] = getimagesize($source);
|
||||||
|
|
||||||
if (!$width || !$height) {
|
if (!$width || !$height) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
list($new_width, $new_height) = get_img_size_format($width, $height);
|
[$new_width, $new_height] = get_img_size_format($width, $height);
|
||||||
|
|
||||||
$tmp_path = $old_file = '';
|
|
||||||
|
|
||||||
$used_imagick = false;
|
$used_imagick = false;
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -28,7 +12,7 @@ if (!defined('BB_ROOT')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain_name = 'torrentpier.com'; // enter here your primary domain name of your site
|
$domain_name = 'torrentpier.com'; // enter here your primary domain name of your site
|
||||||
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
$domain_name = !empty($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
||||||
$domain_ssl = false;
|
$domain_ssl = false;
|
||||||
|
|
||||||
$bb_cfg = [];
|
$bb_cfg = [];
|
||||||
|
@ -37,9 +21,9 @@ $bb_cfg = [];
|
||||||
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
|
$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1;
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
$bb_cfg['tp_version'] = '2.2.3';
|
$bb_cfg['tp_version'] = '2.3.0';
|
||||||
$bb_cfg['tp_release_date'] = '07-08-2017';
|
$bb_cfg['tp_release_date'] = '26-06-2018';
|
||||||
$bb_cfg['tp_release_codename'] = 'Aurochs';
|
$bb_cfg['tp_release_codename'] = 'Bison';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
// Настройка баз данных ['db']['srv_name'] => (array) srv_cfg;
|
// Настройка баз данных ['db']['srv_name'] => (array) srv_cfg;
|
||||||
|
@ -71,7 +55,7 @@ $bb_cfg['db_alias'] = [
|
||||||
$bb_cfg['cache'] = [
|
$bb_cfg['cache'] = [
|
||||||
'pconnect' => true,
|
'pconnect' => true,
|
||||||
'db_dir' => realpath(BB_ROOT) . '/internal_data/cache/filecache/',
|
'db_dir' => realpath(BB_ROOT) . '/internal_data/cache/filecache/',
|
||||||
'prefix' => 'tp_', // Префикс кеша ('tp_')
|
'prefix' => 'tp_',
|
||||||
'memcache' => [
|
'memcache' => [
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'port' => 11211,
|
'port' => 11211,
|
||||||
|
@ -83,7 +67,7 @@ $bb_cfg['cache'] = [
|
||||||
'port' => 6379,
|
'port' => 6379,
|
||||||
'con_required' => true,
|
'con_required' => true,
|
||||||
],
|
],
|
||||||
// Available cache types: memcache, sqlite, redis, apc, xcache (default of filecache)
|
// Available cache types: memcache, sqlite, redis, (filecache by default)
|
||||||
'engines' => [
|
'engines' => [
|
||||||
'bb_cache' => ['filecache', []],
|
'bb_cache' => ['filecache', []],
|
||||||
'bb_config' => ['filecache', []],
|
'bb_config' => ['filecache', []],
|
||||||
|
@ -96,12 +80,12 @@ $bb_cfg['cache'] = [
|
||||||
];
|
];
|
||||||
|
|
||||||
// Datastore
|
// Datastore
|
||||||
// Available datastore types: memcache, sqlite, redis, apc, xcache (default filecache)
|
// Available datastore types: memcache, sqlite, redis (filecache by default)
|
||||||
$bb_cfg['datastore_type'] = 'filecache';
|
$bb_cfg['datastore_type'] = 'filecache';
|
||||||
|
|
||||||
// Server
|
// Server
|
||||||
$bb_cfg['server_name'] = $domain_name; // The domain name from which this board runs
|
$bb_cfg['server_name'] = $domain_name; // The domain name from which this board runs
|
||||||
$bb_cfg['server_port'] = (!empty($_SERVER['SERVER_PORT'])) ? $_SERVER['SERVER_PORT'] : 80; // The port your server is running on
|
$bb_cfg['server_port'] = !empty($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80; // The port your server is running on
|
||||||
$bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name
|
$bb_cfg['script_path'] = '/'; // The path where FORUM is located relative to the domain name
|
||||||
|
|
||||||
// GZip
|
// GZip
|
||||||
|
@ -157,6 +141,7 @@ $bb_cfg['torhelp_enabled'] = false; // find dead torrents (without seeder) that
|
||||||
|
|
||||||
// URL's
|
// URL's
|
||||||
$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
|
$bb_cfg['ajax_url'] = 'ajax.php'; # "http://{$_SERVER['SERVER_NAME']}/ajax.php"
|
||||||
|
$bb_cfg['dl_url'] = 'dl.php?id='; # "http://{$domain_name}/dl.php?id="
|
||||||
$bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php"
|
$bb_cfg['login_url'] = 'login.php'; # "http://{$domain_name}/login.php"
|
||||||
$bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php"
|
$bb_cfg['posting_url'] = 'posting.php'; # "http://{$domain_name}/posting.php"
|
||||||
$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
|
$bb_cfg['pm_url'] = 'privmsg.php'; # "http://{$domain_name}/privmsg.php"
|
||||||
|
@ -383,7 +368,8 @@ $bb_cfg['last_visit_update_intrv'] = 3600; // sec
|
||||||
$bb_cfg['invalid_logins'] = 5; // Количество неверных попыток ввода пароля, перед выводом проверки капчей
|
$bb_cfg['invalid_logins'] = 5; // Количество неверных попыток ввода пароля, перед выводом проверки капчей
|
||||||
$bb_cfg['new_user_reg_disabled'] = false; // Запретить регистрацию новых учетных записей
|
$bb_cfg['new_user_reg_disabled'] = false; // Запретить регистрацию новых учетных записей
|
||||||
$bb_cfg['unique_ip'] = false; // Запретить регистрацию нескольких учетных записей с одного ip
|
$bb_cfg['unique_ip'] = false; // Запретить регистрацию нескольких учетных записей с одного ip
|
||||||
$bb_cfg['new_user_reg_restricted'] = false; // Ограничить регистрацию новых пользователей по времени с 01:00 до 17:00
|
$bb_cfg['new_user_reg_restricted'] = false; // Ограничить регистрацию новых пользователей по времени по указанному ниже интервалу
|
||||||
|
$bb_cfg['new_user_reg_interval'] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]; // Допустимые часы регистрации
|
||||||
$bb_cfg['reg_email_activation'] = true; // Требовать активацию учетной записи по email
|
$bb_cfg['reg_email_activation'] = true; // Требовать активацию учетной записи по email
|
||||||
|
|
||||||
// Email
|
// Email
|
||||||
|
@ -471,7 +457,7 @@ $bb_cfg['use_ajax_posts'] = true;
|
||||||
$bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx
|
$bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx
|
||||||
$bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1';
|
$bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1';
|
||||||
$bb_cfg['sphinx_topic_titles_port'] = 3312;
|
$bb_cfg['sphinx_topic_titles_port'] = 3312;
|
||||||
$bb_cfg['sphinx_config_path'] = realpath("../install/sphinx/sphinx.conf");
|
$bb_cfg['sphinx_config_path'] = '../install/sphinx/sphinx.conf';
|
||||||
$bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies
|
$bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies
|
||||||
$bb_cfg['disable_search_for_guest'] = true;
|
$bb_cfg['disable_search_for_guest'] = true;
|
||||||
$bb_cfg['allow_search_in_bool_mode'] = true;
|
$bb_cfg['allow_search_in_bool_mode'] = true;
|
||||||
|
@ -508,7 +494,7 @@ $bb_cfg['group_members_per_page'] = 50;
|
||||||
$bb_cfg['tidy_post'] = (!in_array('tidy', get_loaded_extensions(), true)) ? false : true;
|
$bb_cfg['tidy_post'] = (!in_array('tidy', get_loaded_extensions(), true)) ? false : true;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
$bb_cfg['mem_on_start'] = MEM_USAGE ? memory_get_usage() : 0;
|
$bb_cfg['mem_on_start'] = memory_get_usage();
|
||||||
$bb_cfg['translate_dates'] = true; // in displaying time
|
$bb_cfg['translate_dates'] = true; // in displaying time
|
||||||
$bb_cfg['use_word_censor'] = true;
|
$bb_cfg['use_word_censor'] = true;
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -91,9 +75,6 @@ define('BB_DISABLED', TRIGGERS_DIR . '/$off');
|
||||||
define('CRON_ALLOWED', TRIGGERS_DIR . '/cron_allowed');
|
define('CRON_ALLOWED', TRIGGERS_DIR . '/cron_allowed');
|
||||||
define('CRON_RUNNING', TRIGGERS_DIR . '/cron_running');
|
define('CRON_RUNNING', TRIGGERS_DIR . '/cron_running');
|
||||||
|
|
||||||
// Misc
|
|
||||||
define('MEM_USAGE', function_exists('memory_get_usage'));
|
|
||||||
|
|
||||||
// Gzip
|
// Gzip
|
||||||
define('GZIP_OUTPUT_ALLOWED', extension_loaded('zlib') && !ini_get('zlib.output_compression'));
|
define('GZIP_OUTPUT_ALLOWED', extension_loaded('zlib') && !ini_get('zlib.output_compression'));
|
||||||
define('UA_GZIP_SUPPORTED', isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false);
|
define('UA_GZIP_SUPPORTED', isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false);
|
||||||
|
@ -113,9 +94,14 @@ define('TOR_TMP', 10); // временная
|
||||||
define('TOR_PREMOD', 11); // премодерация
|
define('TOR_PREMOD', 11); // премодерация
|
||||||
define('TOR_REPLENISH', 12); // пополняемая
|
define('TOR_REPLENISH', 12); // пополняемая
|
||||||
|
|
||||||
|
// Cron
|
||||||
define('CRON_LOG_ENABLED', true); // global ON/OFF
|
define('CRON_LOG_ENABLED', true); // global ON/OFF
|
||||||
define('CRON_FORCE_LOG', false); // always log regardless of job settings
|
define('CRON_FORCE_LOG', false); // always log regardless of job settings
|
||||||
define('CRON_DIR', INC_DIR . '/cron/');
|
define('CRON_DIR', INC_DIR . '/cron/');
|
||||||
define('CRON_JOB_DIR', CRON_DIR . 'jobs/');
|
define('CRON_JOB_DIR', CRON_DIR . 'jobs/');
|
||||||
define('CRON_LOG_DIR', 'cron'); // inside LOG_DIR
|
define('CRON_LOG_DIR', 'cron'); // inside LOG_DIR
|
||||||
define('CRON_LOG_FILE', 'cron'); // without ext
|
define('CRON_LOG_FILE', 'cron'); // without ext
|
||||||
|
|
||||||
|
// Session variables
|
||||||
|
define('ONLY_NEW_POSTS', 1);
|
||||||
|
define('ONLY_NEW_TOPICS', 2);
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
@ -216,7 +200,7 @@ function strip_quotes($text)
|
||||||
do {
|
do {
|
||||||
$pos = strpos($lowertext, '[quote', $curpos);
|
$pos = strpos($lowertext, '[quote', $curpos);
|
||||||
if ($pos !== false) {
|
if ($pos !== false) {
|
||||||
$start_pos["$pos"] = 'start';
|
$start_pos[(string)$pos] = 'start';
|
||||||
$curpos = $pos + 6;
|
$curpos = $pos + 6;
|
||||||
}
|
}
|
||||||
} while ($pos !== false);
|
} while ($pos !== false);
|
||||||
|
@ -231,7 +215,7 @@ function strip_quotes($text)
|
||||||
do {
|
do {
|
||||||
$pos = strpos($lowertext, '[/quote', $curpos);
|
$pos = strpos($lowertext, '[/quote', $curpos);
|
||||||
if ($pos !== false) {
|
if ($pos !== false) {
|
||||||
$end_pos["$pos"] = 'end';
|
$end_pos[(string)$pos] = 'end';
|
||||||
$curpos = $pos + 8;
|
$curpos = $pos + 8;
|
||||||
}
|
}
|
||||||
} while ($pos !== false);
|
} while ($pos !== false);
|
||||||
|
@ -275,7 +259,7 @@ function strip_quotes($text)
|
||||||
// recursion.
|
// recursion.
|
||||||
if ($stack) {
|
if ($stack) {
|
||||||
foreach ($stack as $pos) {
|
foreach ($stack as $pos) {
|
||||||
unset($pos_list["$pos"]);
|
unset($pos_list[(string)$pos]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while ($stack);
|
} while ($stack);
|
||||||
|
@ -354,9 +338,7 @@ function extract_search_words($text)
|
||||||
$text = preg_replace('/(\w*?)&#?[0-9a-z]+;(\w*?)/iu', '', $text);
|
$text = preg_replace('/(\w*?)&#?[0-9a-z]+;(\w*?)/iu', '', $text);
|
||||||
// Remove URL's ((www|ftp)\.[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]*?)
|
// Remove URL's ((www|ftp)\.[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]*?)
|
||||||
$text = preg_replace('#\b[a-z0-9]+://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+(/[0-9a-z\?\.%_\-\+=&/]+)?#u', ' ', $text);
|
$text = preg_replace('#\b[a-z0-9]+://[\w\#!$%&~/.\-;:=,?@а-яА-Я\[\]+]+(/[0-9a-z\?\.%_\-\+=&/]+)?#u', ' ', $text);
|
||||||
$text = str_replace('[url=', ' ', $text);
|
$text = str_replace(['[url=', '?', '!'], ' ', $text);
|
||||||
$text = str_replace('?', ' ', $text);
|
|
||||||
$text = str_replace('!', ' ', $text);
|
|
||||||
|
|
||||||
$text = strip_bbcode($text);
|
$text = strip_bbcode($text);
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,38 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
die(basename(__FILE__));
|
die(basename(__FILE__));
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once INC_DIR . '/functions_admin.php';
|
|
||||||
|
|
||||||
// Синхронизация
|
// Синхронизация
|
||||||
sync('topic', 'all');
|
\TorrentPier\Legacy\Admin\Common::sync('topic', 'all');
|
||||||
sync('user_posts', 'all');
|
\TorrentPier\Legacy\Admin\Common::sync('user_posts', 'all');
|
||||||
sync_all_forums();
|
\TorrentPier\Legacy\Admin\Common::sync_all_forums();
|
||||||
|
|
||||||
// Чистка bb_poll_users
|
// Чистка bb_poll_users
|
||||||
if ($poll_max_days = (int)$bb_cfg['poll_max_days']) {
|
if ($poll_max_days = (int)$bb_cfg['poll_max_days']) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,26 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
|
|
|
@ -1,38 +1,20 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* MIT License
|
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||||
*
|
*
|
||||||
* Copyright (c) 2005-2017 TorrentPier
|
* @copyright Copyright (c) 2005-2018 TorrentPier (https://torrentpier.com)
|
||||||
*
|
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) {
|
if (!defined('BB_ROOT')) {
|
||||||
die(basename(__FILE__));
|
die(basename(__FILE__));
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once INC_DIR . '/functions_admin.php';
|
|
||||||
|
|
||||||
if ($bb_cfg['prune_enable']) {
|
if ($bb_cfg['prune_enable']) {
|
||||||
$sql = "SELECT forum_id, prune_days FROM " . BB_FORUMS . " WHERE prune_days != 0";
|
$sql = "SELECT forum_id, prune_days FROM " . BB_FORUMS . " WHERE prune_days != 0";
|
||||||
|
|
||||||
foreach (DB()->fetch_rowset($sql) as $row) {
|
foreach (DB()->fetch_rowset($sql) as $row) {
|
||||||
topic_delete('prune', $row['forum_id'], (TIMENOW - 86400 * $row['prune_days']));
|
\TorrentPier\Legacy\Admin\Common::topic_delete('prune', $row['forum_id'], (TIMENOW - 86400 * $row['prune_days']));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue