From fbde8cd421c9048afe70ddb41d0a9ed26d3fbef5 Mon Sep 17 00:00:00 2001 From: Yury Pikhtarev Date: Fri, 20 Jun 2025 13:23:33 +0400 Subject: [PATCH] feat(migrations): implement Phinx database migration system (#1976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(migrations): implement Phinx database migration system and update installation process - Introduced a modern database migration system using Phinx, replacing the legacy SQL import method. - Updated `install.php` to run migrations instead of importing SQL dumps. - Added migration configuration file `phinx.php` and initial migration files for schema and data seeding. - Created a new admin panel for migration status management. - Updated UPGRADE_GUIDE.md to include migration setup instructions and benefits. - Ensured backward compatibility for existing installations while facilitating a smoother transition to the new system. * update runProcess to return process exit code * refactor(migrations): clean up whitespace and formatting in migration files - Removed unnecessary whitespace and adjusted formatting for consistency across migration files. * fix(migrations): enforce NOT NULL constraints on migration columns - Updated various migration columns to enforce NOT NULL constraints, ensuring data integrity across the schema. - Adjusted default values and nullability for multiple fields in the initial schema migration files. * refactor(database): standardize table engines to InnoDB for reliability - Updated UPGRADE_GUIDE.md to reflect the use of InnoDB for all tables, emphasizing data integrity and reliability. - Modified migration files to change table engines from MyISAM to InnoDB for various tracker and temporary tables. - Optimized session variable settings in cron jobs for InnoDB compatibility. - Ensured consistency across the schema by enforcing InnoDB usage in all relevant areas. * fix(migrations): correct MySQL integer field types to match original schema - Fix bb_forums table: forum_status (INTβ†’TINYINT), forum_tpl_id (INTβ†’SMALLINT) - Fix bb_users table: avatar_ext_id remains TINYINT as per original schema - Fix bb_groups table: avatar_ext_id (SMALLINTβ†’INT) to match original INT(15) - Fix bb_topics table: topic_show_first_post, topic_allow_robots (TINYINT(1)β†’TINYINT UNSIGNED) - Remove incorrect 'limit' => 11 from standard INT fields, use default Phinx behavior - Fix search_size field to use proper INT type instead of maximum value hack - Correct poll table field types: vote_id (TINYINT), user_id (MEDIUMINT), vote_result (MEDIUMINT UNSIGNED) - Standardize all timestamp and ID fields to use appropriate MySQL integer types Ensures migration creates database schema identical to install/sql/mysql.sql while maintaining InnoDB engine for all tables instead of MyISAM. * fix(cache): auto-create cache directories when using FileStorage The UnifiedCacheSystem was constructing directory paths for Nette FileStorage but not creating them, causing "Directory not found" errors when accessing caches like 'bb_login_err'. FileStorage expects directories to already exist. Changes: - Add automatic directory creation using bb_mkdir() before FileStorage init - Handle both regular cache directories and SQLite parent directories - Apply to both _buildStorage() and _buildDatastoreStorage() methods - Add proper error handling with RuntimeException for failed creation - Maintain consistency with TorrentPier's directory creation patterns This ensures cache directories are created automatically when first accessed, eliminating the need for manual directory creation during deployment. Fixes: Cache initialization failures with missing directories * refactor(docs): update README for clarity and remove legacy SQL file - Improved formatting and clarity in the README, ensuring consistent line breaks and spacing. - Updated installation instructions to reflect the new migration process, emphasizing the use of `phinx` for database setup. - Removed the legacy SQL dump file `mysql.sql` and the `legacy-changes.txt` file, streamlining the installation process and reducing confusion for new users. - Enhanced the documentation to guide users through the setup process more effectively. * docs: enhance CLAUDE.md with migration details and directory updates - Updated the `/library/` section to clarify its purpose. - Added a new `/migrations/` directory section detailing database migration files managed by Phinx. - Included migration commands for running and checking migration status. - Revised the initial schema and seed data references for clarity. - Improved formatting for consistency throughout the document. * refactor(cron): remove demo_mode.php cron job and related functionality - Deleted the demo_mode.php cron job file, which was responsible for managing demo mode operations. - Added a migration to remove the demo_mode.php entry from the bb_cron table, ensuring a clean database state. - Updated the initial schema migration comment to reflect the creation of essential database schema for fresh installations. * refactor(docs): Fixed some typos * chore: update changelog generation starting from v2.4.6-alpha.4 * refactor: Changed some `php_sapi_name()` to `PHP_SAPI` constants * refactor: Extract hardcoded migrations to class property * refactor: Use `count()` to count $initialMigrations elements * feat(migrations): enhance migration management UI with new language variables - Added new language variables for migration status, instructions, and applied/pending migrations to improve user interface clarity. - Updated admin migration template to utilize these new language variables for better localization and maintainability. - Introduced a new file 'CLAUDE.md' to the cleanup process for documentation purposes. --------- Co-authored-by: Roman Kelesidis --- .github/workflows/schedule.yml | 2 +- CLAUDE.md | 144 ++ HISTORY.md | 1131 ------------ README.md | 34 +- UPGRADE_GUIDE.md | 352 ++++ _cleanup.php | 6 +- _release.php | 4 +- admin/admin_migrations.php | 79 + composer.json | 1 + composer.lock | 799 ++++++++- install.php | 45 +- install/sql/mysql.sql | 1553 ----------------- install/upgrade/legacy-changes.txt | 157 -- library/defines.php | 3 + library/includes/cron/cron_run.php | 8 +- .../includes/cron/jobs/attach_maintenance.php | 2 +- library/includes/cron/jobs/demo_mode.php | 44 - library/includes/functions_cli.php | 8 +- library/language/source/main.php | 25 + migrations/20250619000001_initial_schema.php | 1017 +++++++++++ .../20250619000002_seed_initial_data.php | 968 ++++++++++ .../20250620001449_remove_demo_mode.php | 44 + phinx.php | 74 + src/Cache/UnifiedCacheSystem.php | 38 + src/Database/MigrationStatus.php | 305 ++++ styles/templates/admin/admin_migrations.tpl | 183 ++ 26 files changed, 4084 insertions(+), 2942 deletions(-) create mode 100644 CLAUDE.md delete mode 100644 HISTORY.md create mode 100644 admin/admin_migrations.php delete mode 100644 install/sql/mysql.sql delete mode 100644 install/upgrade/legacy-changes.txt delete mode 100644 library/includes/cron/jobs/demo_mode.php create mode 100644 migrations/20250619000001_initial_schema.php create mode 100644 migrations/20250619000002_seed_initial_data.php create mode 100644 migrations/20250620001449_remove_demo_mode.php create mode 100644 phinx.php create mode 100644 src/Database/MigrationStatus.php create mode 100644 styles/templates/admin/admin_migrations.tpl diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml index 271f74933..c1ad4f3c1 100644 --- a/.github/workflows/schedule.yml +++ b/.github/workflows/schedule.yml @@ -22,7 +22,7 @@ jobs: id: git-cliff with: config: cliff.toml - args: v2.4.5-rc.2.. --verbose + args: v2.4.6-alpha.4.. --verbose env: OUTPUT: CHANGELOG.md GITHUB_REPO: ${{ github.repository }} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 000000000..42bf73fcb --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,144 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +TorrentPier is a BitTorrent tracker engine written in PHP, designed for hosting BitTorrent communities with forum functionality. The project is in active modernization, transitioning from legacy code to modern PHP practices while maintaining backward compatibility. + +## Technology Stack & Architecture + +- **PHP 8.1+** with modern features +- **MySQL/MariaDB/Percona** database +- **Nette Database** with backward-compatible wrapper +- **Composer** for dependency management +- **Custom BitTorrent tracker** implementation + +## Key Directory Structure + +- `/src/` - Modern PHP classes (PSR-4 autoloaded as `TorrentPier\`) +- `/library/` - Core application logic and legacy code +- `/admin/` - Administrative interface +- `/bt/` - BitTorrent tracker functionality (announce.php, scrape.php) +- `/styles/` - Templates, CSS, JS, images +- `/internal_data/` - Cache, logs, compiled templates +- `/install/` - Installation scripts and configuration examples +- `/migrations/` - Database migration files (Phinx) + +## Entry Points & Key Files + +- `index.php` - Main forum homepage +- `tracker.php` - Torrent search/browse interface +- `bt/announce.php` - BitTorrent announce endpoint +- `bt/scrape.php` - BitTorrent scrape endpoint +- `admin/index.php` - Administrative panel +- `cron.php` - Background task runner (CLI only) +- `install.php` - Installation script (CLI only) + +## Development Commands + +### Installation & Setup +```bash +# Automated installation (CLI) +php install.php + +# Install dependencies +composer install + +# Update dependencies +composer update +``` + +### Maintenance & Operations +```bash +# Run background maintenance tasks +php cron.php +``` + +### Code Quality +The project uses **StyleCI** with PSR-2 preset for code style enforcement. StyleCI configuration is in `.styleci.yml` targeting `src/` directory. + +## Modern Architecture Components + +### Database Layer (`/src/Database/`) +- **Nette Database** with full old SqlDb backward compatibility +- Singleton pattern accessible via `DB()` function +- Support for multiple database connections and debug functionality +- Migration path to ORM-style Explorer queries + +### Cache System (`/src/Cache/`) +- **Unified caching** using Nette Caching internally +- 100% backward compatibility with existing `CACHE()` and $datastore calls +- Supports file, SQLite, memory, and Memcached storage +- Advanced features: memoization, cache dependencies + +### Configuration Management +- Environment-based config with `.env` files +- Singleton `Config` class accessible via `config()` function +- Local overrides supported via `library/config.local.php` + +## Configuration Files +- `.env` - Environment variables (copy from `.env.example`) +- `library/config.php` - Main application configuration +- `library/config.local.php` - Local configuration overrides +- `composer.json` - Dependencies and PSR-4 autoloading + +## Development Workflow + +### CI/CD Pipeline +- **GitHub Actions** for automated testing and deployment +- **StyleCI** for code style enforcement +- **Dependabot** for dependency updates +- **FTP deployment** to demo environment + +### Installation Methods +1. **Automated**: `php install.php` (recommended) +2. **Composer**: `composer create-project torrentpier/torrentpier` +3. **Manual**: Git clone + `composer install` + database setup + +## Database & Schema + +- **Database migrations** managed via Phinx in `/migrations/` directory +- Initial schema: `20250619000001_initial_schema.php` +- Initial seed data: `20250619000002_seed_initial_data.php` +- UTF-8 (utf8mb4) character set required +- Multiple database alias support for different components + +### Migration Commands +```bash +# Run all pending migrations +php vendor/bin/phinx migrate --configuration=phinx.php + +# Check migration status +php vendor/bin/phinx status --configuration=phinx.php + +# Mark migrations as applied (for existing installations) +php vendor/bin/phinx migrate --fake --configuration=phinx.php +``` + +## Legacy Compatibility Strategy + +The codebase maintains 100% backward compatibility while introducing modern alternatives: + +- **Database layer**: Existing old SqlDb calls work while new code can use Nette Database +- **Cache system**: All existing `CACHE()` and $datastore calls preserved while adding modern features +- **Configuration**: Legacy config access maintained alongside new singleton pattern + +This approach allows gradual modernization without breaking existing functionality - critical for a mature application with existing deployments. + +## Security & Performance + +- **Environment-based secrets** management via `.env` +- **CDN/proxy support** (Cloudflare, Fastly) +- **Input sanitization** and CSRF protection +- **Advanced caching** with multiple storage backends +- **Rate limiting** and IP-based restrictions + +## BitTorrent Tracker Features + +- **BitTorrent v1 & v2** support +- **TorrServer integration** capability +- **Client ban system** for problematic torrent clients +- **Scrape support** for tracker statistics + +When working with this codebase, prioritize understanding the legacy compatibility approach and modern architecture patterns. Always test both legacy and modern code paths when making changes to core systems. diff --git a/HISTORY.md b/HISTORY.md deleted file mode 100644 index 6862444c4..000000000 --- a/HISTORY.md +++ /dev/null @@ -1,1131 +0,0 @@ -# πŸ“– Change Log (History) - -> [!NOTE] -> Changelog from **v2.0.0** to **v2.4.5-rc.2**. - -## [v2.4.5-rc.2](https://github.com/torrentpier/torrentpier/tree/v2.4.5-rc.2) (2025-01-10) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.5-rc.1...v2.4.5-rc.2) - -**Merged pull requests:** - -- Release 2.4.5-rc.2 🍧️ ([belomaxorka](https://github.com/belomaxorka)) -- Added `IndexNow` protocol support πŸ€– [\#1736](https://github.com/torrentpier/torrentpier/pull/1736) ([belomaxorka](https://github.com/belomaxorka)) -- Added `TorrentPier instance hash` generation [\#1726](https://github.com/torrentpier/torrentpier/pull/1726) ([belomaxorka](https://github.com/belomaxorka)) -- Added `m4a` extension support in M3U playback [\#1724](https://github.com/torrentpier/torrentpier/pull/1724) ([belomaxorka](https://github.com/belomaxorka)) -- Created `VersionHelper.php` [\#1731](https://github.com/torrentpier/torrentpier/pull/1731) ([belomaxorka](https://github.com/belomaxorka)) -- Removed sitemap ping because is deprecated [\#1738](https://github.com/torrentpier/torrentpier/pull/1738) ([belomaxorka](https://github.com/belomaxorka)) -- Drop Ocelot announcer support 🫑 [\#1727](https://github.com/torrentpier/torrentpier/pull/1727) ([belomaxorka](https://github.com/belomaxorka)) -- Use `DEFAULT_CHARSET` constant instead of hardcoded string [\#1734](https://github.com/torrentpier/torrentpier/pull/1734) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced some string functions to `mbstring` alternatives [\#1735](https://github.com/torrentpier/torrentpier/pull/1735) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced some `html_entity_decode` to engine's built-in function [\#1733](https://github.com/torrentpier/torrentpier/pull/1733) ([belomaxorka](https://github.com/belomaxorka)) -- Show torrent's announcers list in `filelist.php` page [\#1708](https://github.com/torrentpier/torrentpier/pull/1708) ([belomaxorka](https://github.com/belomaxorka)) -- [PHP 8.4] Fixed some deprecations [\#1718](https://github.com/torrentpier/torrentpier/pull/1718) ([belomaxorka](https://github.com/belomaxorka)) -- [Configurable] Show magnet-links for guests [\#1712](https://github.com/torrentpier/torrentpier/pull/1712) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed issues with searching by username [\#1722](https://github.com/torrentpier/torrentpier/pull/1722) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed searching by username in `memberlist.php` [\#1721](https://github.com/torrentpier/torrentpier/pull/1721) ([belomaxorka](https://github.com/belomaxorka)) -- Set `cursor: pointer;` for buttons, inputs (buttons) [\#1710](https://github.com/torrentpier/torrentpier/pull/1710), [\#1711](https://github.com/torrentpier/torrentpier/pull/1711) ([belomaxorka](https://github.com/belomaxorka)) -- Some updater improvements [\#1725](https://github.com/torrentpier/torrentpier/pull/1725) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1705](https://github.com/torrentpier/torrentpier/pull/1705), [\#1713](https://github.com/torrentpier/torrentpier/pull/1713), [\#1715](https://github.com/torrentpier/torrentpier/pull/1715), [\#1717](https://github.com/torrentpier/torrentpier/pull/1717), [\#1719](https://github.com/torrentpier/torrentpier/pull/1719), [\#1720](https://github.com/torrentpier/torrentpier/pull/1720), [\#1728](https://github.com/torrentpier/torrentpier/pull/1728), [\#1730](https://github.com/torrentpier/torrentpier/pull/1730), [\#1739](https://github.com/torrentpier/torrentpier/pull/1739) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1723](https://github.com/torrentpier/torrentpier/pull/1723) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1704](https://github.com/torrentpier/torrentpier/pull/1704), [\#1706](https://github.com/torrentpier/torrentpier/pull/1706), [\#1714](https://github.com/torrentpier/torrentpier/pull/1714), [\#1716](https://github.com/torrentpier/torrentpier/pull/1716) ([Exileum](https://github.com/Exileum)) - -## [v2.4.5-rc.1](https://github.com/torrentpier/torrentpier/tree/v2.4.5-rc.1) (2024-12-08) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.4...v2.4.5-rc.1) - -**Merged pull requests:** - -- Release 2.4.5-rc.1 πŸ¦• ([belomaxorka](https://github.com/belomaxorka)) -- [CLI] TorrentPier installer β˜•οΈ [\#1576](https://github.com/torrentpier/torrentpier/pull/1576), [\#1582](https://github.com/torrentpier/torrentpier/pull/1582), [\#1585](https://github.com/torrentpier/torrentpier/pull/1585), [\#1591](https://github.com/torrentpier/torrentpier/pull/1591) ([belomaxorka](https://github.com/belomaxorka)) -- Added avif images support πŸŒ„ [\#1660](https://github.com/torrentpier/torrentpier/pull/1660) ([belomaxorka](https://github.com/belomaxorka)) -- Added some new HTML meta-tags [\#1562](https://github.com/torrentpier/torrentpier/pull/1562) ([belomaxorka](https://github.com/belomaxorka)) -- Added robots meta-tag support πŸ€– [\#1587](https://github.com/torrentpier/torrentpier/pull/1587) ([belomaxorka](https://github.com/belomaxorka)) -- Added [TorrServer](https://github.com/YouROK/TorrServer) instance support! 🎞 [\#1603](https://github.com/torrentpier/torrentpier/pull/1603), [\#1623](https://github.com/torrentpier/torrentpier/pull/1623), [\#1624](https://github.com/torrentpier/torrentpier/pull/1624), [\#1628](https://github.com/torrentpier/torrentpier/pull/1628) ([belomaxorka](https://github.com/belomaxorka)) -- Newtopic: Added configuring robots indexing [\#1599](https://github.com/torrentpier/torrentpier/pull/1599) ([belomaxorka](https://github.com/belomaxorka)) -- Added showing releaser stats in profile [\#1568](https://github.com/torrentpier/torrentpier/pull/1568) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to set country name manually [\#1652](https://github.com/torrentpier/torrentpier/pull/1652) ([belomaxorka](https://github.com/belomaxorka)) -- Added new constant `TOR_TYPE_DEFAULT` [\#1698](https://github.com/torrentpier/torrentpier/pull/1698) ([belomaxorka](https://github.com/belomaxorka)) -- Improved BitTorrent clients ban functionality [\#1657](https://github.com/torrentpier/torrentpier/pull/1657) ([belomaxorka](https://github.com/belomaxorka)) -- Improved `filelist.php` [\#1586](https://github.com/torrentpier/torrentpier/pull/1586) ([belomaxorka](https://github.com/belomaxorka)) -- Invites: Permanent invites feature [\#1670](https://github.com/torrentpier/torrentpier/pull/1670) ([belomaxorka](https://github.com/belomaxorka)) -- Show torrent unregister action in log actions [\#1696](https://github.com/torrentpier/torrentpier/pull/1696) ([belomaxorka](https://github.com/belomaxorka)) -- Show torrent status changes in actions log [\#1688](https://github.com/torrentpier/torrentpier/pull/1688) ([belomaxorka](https://github.com/belomaxorka)) -- Show torrent type (gold / silver) changes in actions log [\#1689](https://github.com/torrentpier/torrentpier/pull/1689) ([belomaxorka](https://github.com/belomaxorka)) -- Bring back `DBG_USER` (old debug method), fixed bugsnag handler [\#1701](https://github.com/torrentpier/torrentpier/pull/1701) ([belomaxorka](https://github.com/belomaxorka)) -- Merged some fixes from `new-attachments` branch [\#1700](https://github.com/torrentpier/torrentpier/pull/1700) ([belomaxorka](https://github.com/belomaxorka)) -- Changed database encoding to `utf8mb4_unicode_ci` [\#1684](https://github.com/torrentpier/torrentpier/pull/1684) ([belomaxorka](https://github.com/belomaxorka)) -- Demo mode: Save user language in cookies [\#1584](https://github.com/torrentpier/torrentpier/pull/1584) ([belomaxorka](https://github.com/belomaxorka)) -- Make `get_torrent_info()` as public method for re-use [\#1697](https://github.com/torrentpier/torrentpier/pull/1697) ([belomaxorka](https://github.com/belomaxorka)) -- BBCode: Fixed relative links working [\#1613](https://github.com/torrentpier/torrentpier/pull/1613) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed empty `topic_id` in log actions after topic rename [\#1687](https://github.com/torrentpier/torrentpier/pull/1687) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken torrent stats displaying [\#1672](https://github.com/torrentpier/torrentpier/pull/1672), [\#1673](https://github.com/torrentpier/torrentpier/pull/1673) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed template caching issue [\#1622](https://github.com/torrentpier/torrentpier/pull/1622) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka)) -- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka)) -- Disabled resizing for textarea tag [\#1638](https://github.com/torrentpier/torrentpier/pull/1638) ([belomaxorka](https://github.com/belomaxorka)) -- Revert "Datastore improvements" ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570), [\#1571](https://github.com/torrentpier/torrentpier/pull/1571), [\#1575](https://github.com/torrentpier/torrentpier/pull/1575), [\#1589](https://github.com/torrentpier/torrentpier/pull/1589), [\#1592](https://github.com/torrentpier/torrentpier/pull/1592), [\#1605](https://github.com/torrentpier/torrentpier/pull/1605), [\#1611](https://github.com/torrentpier/torrentpier/pull/1611), [\#1612](https://github.com/torrentpier/torrentpier/pull/1612), [\#1615](https://github.com/torrentpier/torrentpier/pull/1615), [\#1627](https://github.com/torrentpier/torrentpier/pull/1627), [\#1633](https://github.com/torrentpier/torrentpier/pull/1633), [\#1641](https://github.com/torrentpier/torrentpier/pull/1641), [\#1651](https://github.com/torrentpier/torrentpier/pull/1651), [\#1658](https://github.com/torrentpier/torrentpier/pull/1658), [\#1674](https://github.com/torrentpier/torrentpier/pull/1674), [\#1675](https://github.com/torrentpier/torrentpier/pull/1675), [\#1676](https://github.com/torrentpier/torrentpier/pull/1676), [\#1679](https://github.com/torrentpier/torrentpier/pull/1679), [\#1681](https://github.com/torrentpier/torrentpier/pull/1681), [\#1683](https://github.com/torrentpier/torrentpier/pull/1683), [\#1685](https://github.com/torrentpier/torrentpier/pull/1685), [\#1686](https://github.com/torrentpier/torrentpier/pull/1686), [\#1702](https://github.com/torrentpier/torrentpier/pull/1702), [\#1703](https://github.com/torrentpier/torrentpier/pull/1703) ([belomaxorka](https://github.com/belomaxorka)) -- Updated `modern-normalize` to `v3.0.1` [\#1669](https://github.com/torrentpier/torrentpier/pull/1669) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1563](https://github.com/torrentpier/torrentpier/pull/1563), [\#1564](https://github.com/torrentpier/torrentpier/pull/1564), [\#1608](https://github.com/torrentpier/torrentpier/pull/1608), [\#1609](https://github.com/torrentpier/torrentpier/pull/1609), [\#1610](https://github.com/torrentpier/torrentpier/pull/1610), [\#1637](https://github.com/torrentpier/torrentpier/pull/1637), [\#1646](https://github.com/torrentpier/torrentpier/pull/1646), [\#1647](https://github.com/torrentpier/torrentpier/pull/1647), [\#1650](https://github.com/torrentpier/torrentpier/pull/1650), [\#1656](https://github.com/torrentpier/torrentpier/pull/1656), [\#1677](https://github.com/torrentpier/torrentpier/pull/1677), [\#1682](https://github.com/torrentpier/torrentpier/pull/1682), [\#1699](https://github.com/torrentpier/torrentpier/pull/1699) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1569](https://github.com/torrentpier/torrentpier/pull/1569), [\#1572](https://github.com/torrentpier/torrentpier/pull/1572), [\#1573](https://github.com/torrentpier/torrentpier/pull/1573), [\#1574](https://github.com/torrentpier/torrentpier/pull/1574), [\#1588](https://github.com/torrentpier/torrentpier/pull/1588), [\#1590](https://github.com/torrentpier/torrentpier/pull/1590), [\#1600](https://github.com/torrentpier/torrentpier/pull/1600), [\#1601](https://github.com/torrentpier/torrentpier/pull/1601), [\#1606](https://github.com/torrentpier/torrentpier/pull/1606), [\#1607](https://github.com/torrentpier/torrentpier/pull/1607), [\#1625](https://github.com/torrentpier/torrentpier/pull/1625), [\#1626](https://github.com/torrentpier/torrentpier/pull/1626), [\#1629](https://github.com/torrentpier/torrentpier/pull/1629), [\#1630](https://github.com/torrentpier/torrentpier/pull/1630), [\#1631](https://github.com/torrentpier/torrentpier/pull/1631), [\#1632](https://github.com/torrentpier/torrentpier/pull/1632), [\#1639](https://github.com/torrentpier/torrentpier/pull/1639), [\#1640](https://github.com/torrentpier/torrentpier/pull/1640), [\#1654](https://github.com/torrentpier/torrentpier/pull/1654), [\#1655](https://github.com/torrentpier/torrentpier/pull/1655) ([Exileum](https://github.com/Exileum)) - -## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.3...v2.4.4) - -**Merged pull requests:** - -- Release 2.4.4 🦩 ([belomaxorka](https://github.com/belomaxorka)) -- Supports PHP 8.2 / PHP 8.3 ([belomaxorka](https://github.com/belomaxorka)) -- CVE-2024-40624: Deserialization of untrusted data ([belomaxorka](https://github.com/belomaxorka)) -- Refactored cache drivers πŸ—ƒ [\#1553](https://github.com/torrentpier/torrentpier/pull/1553), [\#1557](https://github.com/torrentpier/torrentpier/pull/1557) ([belomaxorka](https://github.com/belomaxorka)) -- Create tech stack docs (`techstack.yml` and `techstack.md`) [\#1521](https://github.com/torrentpier/torrentpier/pull/1521), [\#1522](https://github.com/torrentpier/torrentpier/pull/1522) ([belomaxorka](https://github.com/belomaxorka)) -- Added MonsterID avatars support πŸŽ‡ [\#1546](https://github.com/torrentpier/torrentpier/pull/1546) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to reset ratio [\#1545](https://github.com/torrentpier/torrentpier/pull/1545) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: function `utf8_encode()` is deprecated [\#1556](https://github.com/torrentpier/torrentpier/pull/1556) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken "Disable Board" function [\#1529](https://github.com/torrentpier/torrentpier/pull/1529) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed seed bonus accrual [\#1518](https://github.com/torrentpier/torrentpier/pull/1518) ([belomaxorka](https://github.com/belomaxorka)) -- [BETA] Added emojis support πŸ˜„πŸ˜ [\#1514](https://github.com/torrentpier/torrentpier/pull/1514) ([belomaxorka](https://github.com/belomaxorka)) -- Pagination with `rel="next"` and `rel="prev"` support [\#1551](https://github.com/torrentpier/torrentpier/pull/1551) ([belomaxorka](https://github.com/belomaxorka)) -- Resize user/group avatar image if too large πŸŒ† [\#1512](https://github.com/torrentpier/torrentpier/pull/1512) ([belomaxorka](https://github.com/belomaxorka)) -- Increased `PASSWORD_MAX_LENGTH` [\#1510](https://github.com/torrentpier/torrentpier/pull/1510) ([belomaxorka](https://github.com/belomaxorka)) -- Bring back forum description in `viewforum.php` [\#1540](https://github.com/torrentpier/torrentpier/pull/1540) ([belomaxorka](https://github.com/belomaxorka)) -- Some security improvements πŸ”‘ [\#1503](https://github.com/torrentpier/torrentpier/pull/1503), [\#1505](https://github.com/torrentpier/torrentpier/pull/1505) ([belomaxorka](https://github.com/belomaxorka)) -- Some improvements for integrity checker [\#1501](https://github.com/torrentpier/torrentpier/pull/1501) ([belomaxorka](https://github.com/belomaxorka)) -- Some improvements for ratio functionality [\#1552](https://github.com/torrentpier/torrentpier/pull/1552) ([belomaxorka](https://github.com/belomaxorka)) -- Hide in topic: Added country hiding [\#1535](https://github.com/torrentpier/torrentpier/pull/1535) ([belomaxorka](https://github.com/belomaxorka)) -- Hide vote button in topic for guests [\#1507](https://github.com/torrentpier/torrentpier/pull/1507) ([belomaxorka](https://github.com/belomaxorka)) -- Word censor code optimization [\#1537](https://github.com/torrentpier/torrentpier/pull/1537) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532), [\#1536](https://github.com/torrentpier/torrentpier/pull/1536), [\#1539](https://github.com/torrentpier/torrentpier/pull/1539), [\#1542](https://github.com/torrentpier/torrentpier/pull/1542), [\#1544](https://github.com/torrentpier/torrentpier/pull/1544), [\#1548](https://github.com/torrentpier/torrentpier/pull/1548), [\#1550](https://github.com/torrentpier/torrentpier/pull/1550), [\#1558](https://github.com/torrentpier/torrentpier/pull/1558) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1526](https://github.com/torrentpier/torrentpier/pull/1526), [\#1527](https://github.com/torrentpier/torrentpier/pull/1527), [\#1528](https://github.com/torrentpier/torrentpier/pull/1528), [\#1554](https://github.com/torrentpier/torrentpier/pull/1554), [\#1555](https://github.com/torrentpier/torrentpier/pull/1555) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1504](https://github.com/torrentpier/torrentpier/pull/1504), [\#1513](https://github.com/torrentpier/torrentpier/pull/1513), [\#1524](https://github.com/torrentpier/torrentpier/pull/1524), [\#1541](https://github.com/torrentpier/torrentpier/pull/1541), [\#1543](https://github.com/torrentpier/torrentpier/pull/1543), [\#1547](https://github.com/torrentpier/torrentpier/pull/1547), [\#1549](https://github.com/torrentpier/torrentpier/pull/1549), [\#1559](https://github.com/torrentpier/torrentpier/pull/1559), [\#1560](https://github.com/torrentpier/torrentpier/pull/1560) ([Exileum](https://github.com/Exileum)) - -## [v2.4.3](https://github.com/torrentpier/torrentpier/tree/v2.4.3) (2024-06-09) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.2...v2.4.3) - -**Merged pull requests:** - -- Release 2.4.3 🐎 ([belomaxorka](https://github.com/belomaxorka)) -- Added restoring corrupt TorrentPier files πŸͺ› [\#1493](https://github.com/torrentpier/torrentpier/pull/1493) ([belomaxorka](https://github.com/belomaxorka)) -- Added TorrentPier files integrity check πŸ“¦ [\#1491](https://github.com/torrentpier/torrentpier/pull/1491) ([belomaxorka](https://github.com/belomaxorka)) -- Added updates checker βš™οΈ [\#1451](https://github.com/torrentpier/torrentpier/pull/1451), [\#1475](https://github.com/torrentpier/torrentpier/pull/1475) ([belomaxorka](https://github.com/belomaxorka)) -- Added preview for country flags while editing [\#1448](https://github.com/torrentpier/torrentpier/pull/1448) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for APCu caching method [\#1442](https://github.com/torrentpier/torrentpier/pull/1442) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for attribute to ignoring auto spoilers opening [\#1466](https://github.com/torrentpier/torrentpier/pull/1466) ([belomaxorka](https://github.com/belomaxorka)) -- Some enhancements [\#1445](https://github.com/torrentpier/torrentpier/pull/1445) ([belomaxorka](https://github.com/belomaxorka)) -- Some cleanup...😣 [\#1488](https://github.com/torrentpier/torrentpier/pull/1488) ([belomaxorka](https://github.com/belomaxorka)) -- Guests can view polls [\#1464](https://github.com/torrentpier/torrentpier/pull/1464) ([belomaxorka](https://github.com/belomaxorka)) -- Improved app debug [\#1438](https://github.com/torrentpier/torrentpier/pull/1438) ([belomaxorka](https://github.com/belomaxorka)) -- Show client country in seeders / leechers list 🌍 [\#1478](https://github.com/torrentpier/torrentpier/pull/1478) ([belomaxorka](https://github.com/belomaxorka)) -- Some enhancements for flags [\#1470](https://github.com/torrentpier/torrentpier/pull/1470), [\#1471](https://github.com/torrentpier/torrentpier/pull/1471) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed quote selection for smiles [\#1457](https://github.com/torrentpier/torrentpier/pull/1457) ([belomaxorka](https://github.com/belomaxorka)) -- Demo mode: Allow registering torrents by default [\#1440](https://github.com/torrentpier/torrentpier/pull/1440) ([belomaxorka](https://github.com/belomaxorka)) -- Temp: Removed showing forum description in `viewforum.php` [\#1465](https://github.com/torrentpier/torrentpier/pull/1465) ([belomaxorka](https://github.com/belomaxorka)) -- Code refactoring [\#1441](https://github.com/torrentpier/torrentpier/pull/1441) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1435](https://github.com/torrentpier/torrentpier/pull/1435), [\#1443](https://github.com/torrentpier/torrentpier/pull/1443), [\#1446](https://github.com/torrentpier/torrentpier/pull/1446), [\#1450](https://github.com/torrentpier/torrentpier/pull/1450), [\#1452](https://github.com/torrentpier/torrentpier/pull/1452), [\#1458](https://github.com/torrentpier/torrentpier/pull/1458), [\#1461](https://github.com/torrentpier/torrentpier/pull/1461), [\#1462](https://github.com/torrentpier/torrentpier/pull/1462), [\#1467](https://github.com/torrentpier/torrentpier/pull/1467), [\#1469](https://github.com/torrentpier/torrentpier/pull/1469), [\#1472](https://github.com/torrentpier/torrentpier/pull/1472), [\#1477](https://github.com/torrentpier/torrentpier/pull/1477), [\#1480](https://github.com/torrentpier/torrentpier/pull/1480), [\#1481](https://github.com/torrentpier/torrentpier/pull/1481), [\#1482](https://github.com/torrentpier/torrentpier/pull/1482), [\#1484](https://github.com/torrentpier/torrentpier/pull/1484), [\#1490](https://github.com/torrentpier/torrentpier/pull/1490), [\#1494](https://github.com/torrentpier/torrentpier/pull/1494), [\#1497](https://github.com/torrentpier/torrentpier/pull/1497), [\#1499](https://github.com/torrentpier/torrentpier/pull/1499), [\#1500](https://github.com/torrentpier/torrentpier/pull/1500) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1454](https://github.com/torrentpier/torrentpier/pull/1454), [\#1455](https://github.com/torrentpier/torrentpier/pull/1455), [\#1459](https://github.com/torrentpier/torrentpier/pull/1459), [\#1460](https://github.com/torrentpier/torrentpier/pull/1460), [\#1485](https://github.com/torrentpier/torrentpier/pull/1485), [\#1486](https://github.com/torrentpier/torrentpier/pull/1486) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1444](https://github.com/torrentpier/torrentpier/pull/1444), [\#1447](https://github.com/torrentpier/torrentpier/pull/1447), [\#1453](https://github.com/torrentpier/torrentpier/pull/1453), [\#1468](https://github.com/torrentpier/torrentpier/pull/1468), [\#1473](https://github.com/torrentpier/torrentpier/pull/1473), [\#1476](https://github.com/torrentpier/torrentpier/pull/1476), [\#1479](https://github.com/torrentpier/torrentpier/pull/1479), [\#1487](https://github.com/torrentpier/torrentpier/pull/1487), [\#1489](https://github.com/torrentpier/torrentpier/pull/1489), [\#1492](https://github.com/torrentpier/torrentpier/pull/1492), [\#1495](https://github.com/torrentpier/torrentpier/pull/1495), [\#1496](https://github.com/torrentpier/torrentpier/pull/1496), [\#1498](https://github.com/torrentpier/torrentpier/pull/1498) ([Exileum](https://github.com/Exileum)) - -## [v2.4.2](https://github.com/torrentpier/torrentpier/tree/v2.4.2) (2024-03-30) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.1...v2.4.2) - -**Merged pull requests:** - -- Release 2.4.2 🐯 ([belomaxorka](https://github.com/belomaxorka)) -- Added demo mode πŸ“Ί [\#1399](https://github.com/torrentpier/torrentpier/pull/1399) ([belomaxorka](https://github.com/belomaxorka)) -- Added BBCode Acronym tag [\#1419](https://github.com/torrentpier/torrentpier/pull/1419), [\#1425](https://github.com/torrentpier/torrentpier/pull/1425) ([belomaxorka](https://github.com/belomaxorka)) -- Added showing poll status in `topic_watch.php` [\#1413](https://github.com/torrentpier/torrentpier/pull/1413) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to view post_text of topic [\#1401](https://github.com/torrentpier/torrentpier/pull/1401) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for rutracker font BBCode tag [\#1397](https://github.com/torrentpier/torrentpier/pull/1397) ([belomaxorka](https://github.com/belomaxorka)) -- Added mod "Reason to move topic" [\#1388](https://github.com/torrentpier/torrentpier/pull/1388) ([belomaxorka](https://github.com/belomaxorka)) -- Created template file for AJAX quick actions [\#1381](https://github.com/torrentpier/torrentpier/pull/1381) ([belomaxorka](https://github.com/belomaxorka)) -- Don't requires fill textarea for mod comment deleting [\#1433](https://github.com/torrentpier/torrentpier/pull/1433) ([belomaxorka](https://github.com/belomaxorka)) -- Make post date clickable in `posting.php` [\#1427](https://github.com/torrentpier/torrentpier/pull/1427) ([belomaxorka](https://github.com/belomaxorka)) -- Removed `wbr()` [\#1387](https://github.com/torrentpier/torrentpier/pull/1387) ([belomaxorka](https://github.com/belomaxorka)) -- Removed converting for legacy md5 passwords [\#1386](https://github.com/torrentpier/torrentpier/pull/1386) ([belomaxorka](https://github.com/belomaxorka)) -- PHP 8.2: Fixed creation of dynamic property [\#1432](https://github.com/torrentpier/torrentpier/pull/1432) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken searching of attachments via ACP [\#1431](https://github.com/torrentpier/torrentpier/pull/1431) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed issue with poll_users cleaning at every cron job startup [\#1390](https://github.com/torrentpier/torrentpier/pull/1390) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed Undefined variable $wordCensor [\#1400](https://github.com/torrentpier/torrentpier/pull/1400) ([belomaxorka](https://github.com/belomaxorka)) -- Improved word censor 🀐 [\#1393](https://github.com/torrentpier/torrentpier/pull/1393) ([belomaxorka](https://github.com/belomaxorka)) -- Show poll prefix for guests [\#1417](https://github.com/torrentpier/torrentpier/pull/1417) ([belomaxorka](https://github.com/belomaxorka)) -- Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka)) -- Hide quote button if topic locked [\#1416](https://github.com/torrentpier/torrentpier/pull/1416) ([belomaxorka](https://github.com/belomaxorka)) -- log_error(): Hide Referer string if empty [\#1430](https://github.com/torrentpier/torrentpier/pull/1430) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398), [\#1405](https://github.com/torrentpier/torrentpier/pull/1405), [\#1406](https://github.com/torrentpier/torrentpier/pull/1406), [\#1408](https://github.com/torrentpier/torrentpier/pull/1408), [\#1409](https://github.com/torrentpier/torrentpier/pull/1409), [\#1410](https://github.com/torrentpier/torrentpier/pull/1410), [\#1411](https://github.com/torrentpier/torrentpier/pull/1411), [\#1418](https://github.com/torrentpier/torrentpier/pull/1418), [\#1422](https://github.com/torrentpier/torrentpier/pull/1422) ([belomaxorka](https://github.com/belomaxorka)) -- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1414](https://github.com/torrentpier/torrentpier/pull/1414), [\#1415](https://github.com/torrentpier/torrentpier/pull/1415), [\#1421](https://github.com/torrentpier/torrentpier/pull/1421), [\#1424](https://github.com/torrentpier/torrentpier/pull/1424) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392), [\#1402](https://github.com/torrentpier/torrentpier/pull/1402), [\#1403](https://github.com/torrentpier/torrentpier/pull/1403), [\#1412](https://github.com/torrentpier/torrentpier/pull/1412), [\#1420](https://github.com/torrentpier/torrentpier/pull/1420), [\#1429](https://github.com/torrentpier/torrentpier/pull/1429), [\#1434](https://github.com/torrentpier/torrentpier/pull/1434) ([Exileum](https://github.com/Exileum)) - -## [v2.4.1](https://github.com/torrentpier/torrentpier/tree/v2.4.1) (2024-02-04) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0...v2.4.1) - -**Merged pull requests:** - -- Release 2.4.1 πŸ¦‰ ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Timeline β€” 2.4.1 [\#1340](https://github.com/torrentpier/torrentpier/pull/1340), [\#1341](https://github.com/torrentpier/torrentpier/pull/1341), [\#1342](https://github.com/torrentpier/torrentpier/pull/1342), [\#1343](https://github.com/torrentpier/torrentpier/pull/1343), [\#1362](https://github.com/torrentpier/torrentpier/pull/1362) ([kovalensky](https://github.com/kovalensky)) -- [BEP47] sha1 hash files are binary by default [\#1348](https://github.com/torrentpier/torrentpier/pull/1348) ([kovalensky](https://github.com/kovalensky)) -- Flatten file list for hybrid files [\#1350](https://github.com/torrentpier/torrentpier/pull/1350) ([kovalensky](https://github.com/kovalensky)) -- Counter is not precise [\#1360](https://github.com/torrentpier/torrentpier/pull/1360) ([kovalensky](https://github.com/kovalensky)) -- Add referrer "origin" policy to repository links [\#1357](https://github.com/torrentpier/torrentpier/pull/1357) ([kovalensky](https://github.com/kovalensky)) -- Added new flag πŸ•Š [\#1347](https://github.com/torrentpier/torrentpier/pull/1347) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to view "Watching topics" of other people's (For admins only) [\#1336](https://github.com/torrentpier/torrentpier/pull/1336) ([belomaxorka](https://github.com/belomaxorka)) -- Added `[box]` BBCode tag [\#1368](https://github.com/torrentpier/torrentpier/pull/1368) ([belomaxorka](https://github.com/belomaxorka)) -- Added `[indent]` BBCode tag [\#1375](https://github.com/torrentpier/torrentpier/pull/1375) ([belomaxorka](https://github.com/belomaxorka)) -- Added `bt_announce_url` autofill via cron [\#1331](https://github.com/torrentpier/torrentpier/pull/1331), [\#1364](https://github.com/torrentpier/torrentpier/pull/1364) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to send debug via Telegram [\#1323](https://github.com/torrentpier/torrentpier/pull/1323), [\#1372](https://github.com/torrentpier/torrentpier/pull/1372) ([belomaxorka](https://github.com/belomaxorka)) -- Added "Random release" button in tracker.php [\#1334](https://github.com/torrentpier/torrentpier/pull/1334) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for fastly cdn [\#1327](https://github.com/torrentpier/torrentpier/pull/1327) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Use `target="_blank"` in admin for profile_url() redirects [\#1330](https://github.com/torrentpier/torrentpier/pull/1330) ([belomaxorka](https://github.com/belomaxorka)) -- Used declensions for days in some cases [\#1310](https://github.com/torrentpier/torrentpier/pull/1310) ([belomaxorka](https://github.com/belomaxorka)) -- Used `modern-normalize` instead of outdated `nornalize-css` [\#1363](https://github.com/torrentpier/torrentpier/pull/1363) ([belomaxorka](https://github.com/belomaxorka)) -- Used datastore to show statistic for more performance [\#1309](https://github.com/torrentpier/torrentpier/pull/1309) ([belomaxorka](https://github.com/belomaxorka)) -- Used `humn_size()` to count average of releases in tr_stats.php [\#1313](https://github.com/torrentpier/torrentpier/pull/1313) ([belomaxorka](https://github.com/belomaxorka)) -- Some enhancements in default template [\#1312](https://github.com/torrentpier/torrentpier/pull/1312) ([belomaxorka](https://github.com/belomaxorka)) -- Some enhancements in default template (Part 2) [\#1322](https://github.com/torrentpier/torrentpier/pull/1322) ([belomaxorka](https://github.com/belomaxorka)) -- Set response code in some cases [\#1319](https://github.com/torrentpier/torrentpier/pull/1319) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed PM quick reply issue [\#1379](https://github.com/torrentpier/torrentpier/pull/1379) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed negative integer seed bonus accrual [\#1377](https://github.com/torrentpier/torrentpier/pull/1377) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed `admin_terms.php` textarea reset in preview mode [\#1371](https://github.com/torrentpier/torrentpier/pull/1371) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken user dl status [\#1351](https://github.com/torrentpier/torrentpier/pull/1351) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: mb_strlen(): Passing null parameter [\#1374](https://github.com/torrentpier/torrentpier/pull/1374) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed download counter for torrents [\#1346](https://github.com/torrentpier/torrentpier/pull/1346) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed HTTP 500 while cron running in server-side [\#1321](https://github.com/torrentpier/torrentpier/pull/1321) ([belomaxorka](https://github.com/belomaxorka)) -- Some enhancements for topic_tpl [\#1356](https://github.com/torrentpier/torrentpier/pull/1356) ([belomaxorka](https://github.com/belomaxorka)) -- Don't update downloads counter if attachment not exists [\#1345](https://github.com/torrentpier/torrentpier/pull/1345) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315), [\#1328](https://github.com/torrentpier/torrentpier/pull/1328), [\#1338](https://github.com/torrentpier/torrentpier/pull/1338), [\#1353](https://github.com/torrentpier/torrentpier/pull/1353), [\#1355](https://github.com/torrentpier/torrentpier/pull/1355), [\#1358](https://github.com/torrentpier/torrentpier/pull/1358), [\#1369](https://github.com/torrentpier/torrentpier/pull/1369) ([belomaxorka](https://github.com/belomaxorka)) -- Some bugfixes [\#1326](https://github.com/torrentpier/torrentpier/pull/1326), [\#1378](https://github.com/torrentpier/torrentpier/pull/1378) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1304](https://github.com/torrentpier/torrentpier/pull/1304), [\#1305](https://github.com/torrentpier/torrentpier/pull/1305), [\#1305](https://github.com/torrentpier/torrentpier/pull/1305), [\#1367](https://github.com/torrentpier/torrentpier/pull/1367), [\#1366](https://github.com/torrentpier/torrentpier/pull/1366), [\#1365](https://github.com/torrentpier/torrentpier/pull/1365) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1311](https://github.com/torrentpier/torrentpier/pull/1311), [\#1314](https://github.com/torrentpier/torrentpier/pull/1314), [\#1335](https://github.com/torrentpier/torrentpier/pull/1335), [\#1337](https://github.com/torrentpier/torrentpier/pull/1337), [\#1344](https://github.com/torrentpier/torrentpier/pull/1344), [\#1376](https://github.com/torrentpier/torrentpier/pull/1376) ([Exileum](https://github.com/Exileum)) - -## [v2.4.0](https://github.com/torrentpier/torrentpier/tree/v2.4.0) (2024-01-01) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-rc2...v2.4.0) - -**Merged pull requests:** - -- Release 2.4.0 β˜ƒοΈ ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Updated copyright year [\#1201](https://github.com/torrentpier/torrentpier/pull/1201) ([belomaxorka](https://github.com/belomaxorka)) -- Update file_list_v2.php [\#1202](https://github.com/torrentpier/torrentpier/pull/1202), [\#1256](https://github.com/torrentpier/torrentpier/pull/1256) ([kovalensky](https://github.com/kovalensky)) -- Updated TorrentPier footer text (: [\#1204](https://github.com/torrentpier/torrentpier/pull/1204) ([kovalensky](https://github.com/kovalensky)) -- Repository link in page footer instead of forum [\#1205](https://github.com/torrentpier/torrentpier/pull/1205) ([kovalensky](https://github.com/kovalensky)) -- Some enhancements for dl.php [\#1209](https://github.com/torrentpier/torrentpier/pull/1209) ([belomaxorka](https://github.com/belomaxorka)) -- Cleanup for attach_mod [\#1210](https://github.com/torrentpier/torrentpier/pull/1210) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless condition in viewtopic_attach.tpl [\#1208](https://github.com/torrentpier/torrentpier/pull/1208) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements for announcer [\#1207](https://github.com/torrentpier/torrentpier/pull/1207) ([belomaxorka](https://github.com/belomaxorka)) -- tracker.php parameter sanitizing [\#1212](https://github.com/torrentpier/torrentpier/pull/1212) ([kovalensky](https://github.com/kovalensky)) -- search.php parameter sanitizing [\#1213](https://github.com/torrentpier/torrentpier/pull/1213) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) -- Limit execution time for forum file-listing [\#1211](https://github.com/torrentpier/torrentpier/pull/1211) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) -- Some reported bugfixes [\#1214](https://github.com/torrentpier/torrentpier/pull/1214), [\#1275](https://github.com/torrentpier/torrentpier/pull/1275) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1206](https://github.com/torrentpier/torrentpier/pull/1206), [\#1215](https://github.com/torrentpier/torrentpier/pull/1215), [\#1217](https://github.com/torrentpier/torrentpier/pull/1217), [\#1219](https://github.com/torrentpier/torrentpier/pull/1219), [\#1220](https://github.com/torrentpier/torrentpier/pull/1220), [\#1224](https://github.com/torrentpier/torrentpier/pull/1224), [\#1228](https://github.com/torrentpier/torrentpier/pull/1228), [\#1229](https://github.com/torrentpier/torrentpier/pull/1229), [\#1230](https://github.com/torrentpier/torrentpier/pull/1230), [\#1234](https://github.com/torrentpier/torrentpier/pull/1234), [\#1236](https://github.com/torrentpier/torrentpier/pull/1236), [\#1243](https://github.com/torrentpier/torrentpier/pull/1243), [\#1248](https://github.com/torrentpier/torrentpier/pull/1248), [\#1253](https://github.com/torrentpier/torrentpier/pull/1253), [\#1254](https://github.com/torrentpier/torrentpier/pull/1254), [\#1259](https://github.com/torrentpier/torrentpier/pull/1259), [\#1263](https://github.com/torrentpier/torrentpier/pull/1263), [\#1265](https://github.com/torrentpier/torrentpier/pull/1265), [\#1266](https://github.com/torrentpier/torrentpier/pull/1266), [\#1271](https://github.com/torrentpier/torrentpier/pull/1271), [\#1273](https://github.com/torrentpier/torrentpier/pull/1273), [\#1279](https://github.com/torrentpier/torrentpier/pull/1279), [\#1281](https://github.com/torrentpier/torrentpier/pull/1281), [\#1285](https://github.com/torrentpier/torrentpier/pull/1285), [\#1286](https://github.com/torrentpier/torrentpier/pull/1286), [\#1289](https://github.com/torrentpier/torrentpier/pull/1289), [\#1294](https://github.com/torrentpier/torrentpier/pull/1294), [\#1298](https://github.com/torrentpier/torrentpier/pull/1298), [\#1301](https://github.com/torrentpier/torrentpier/pull/1301), [\#1302](https://github.com/torrentpier/torrentpier/pull/1302) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed extensions issue [\#1218](https://github.com/torrentpier/torrentpier/pull/1218) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken sorting in group.php [\#1221](https://github.com/torrentpier/torrentpier/pull/1221) ([belomaxorka](https://github.com/belomaxorka)) -- Code re-formatting [\#1225](https://github.com/torrentpier/torrentpier/pull/1225) ([kovalensky](https://github.com/kovalensky)) -- Introduce limit setting for max number of files to be processed in separate index file-listing [\#1223](https://github.com/torrentpier/torrentpier/pull/1223) ([kovalensky](https://github.com/kovalensky)) -- Fixed set auth cookie issue [\#1227](https://github.com/torrentpier/torrentpier/pull/1227) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken captcha check on login.php [\#1233](https://github.com/torrentpier/torrentpier/pull/1233) ([belomaxorka](https://github.com/belomaxorka)) -- Hide vote button in poll if user already voted [\#1235](https://github.com/torrentpier/torrentpier/pull/1235) ([belomaxorka](https://github.com/belomaxorka)) -- Exception handling for Bencode errors [\#1237](https://github.com/torrentpier/torrentpier/pull/1237), [\#1239](https://github.com/torrentpier/torrentpier/pull/1239) ([kovalensky](https://github.com/kovalensky)) -- Handle & show upload_max_filesize occurrences [\#1241](https://github.com/torrentpier/torrentpier/pull/1241) ([kovalensky](https://github.com/kovalensky)) -- Little improvements [\#1244](https://github.com/torrentpier/torrentpier/pull/1244), [\#1272](https://github.com/torrentpier/torrentpier/pull/1272) ([kovalensky](https://github.com/kovalensky)) -- Improved handling errors while uploading [\#1246](https://github.com/torrentpier/torrentpier/pull/1246) -- Use hardcoded dictionary names for better counting result in file listing [\#1247](https://github.com/torrentpier/torrentpier/pull/1247) ([kovalensky](https://github.com/kovalensky)) -- Refactored thumbnail creation πŸŒ„ [\#1249](https://github.com/torrentpier/torrentpier/pull/1249) ([belomaxorka](https://github.com/belomaxorka)) -- Some cleanup for attach mod [\#1250](https://github.com/torrentpier/torrentpier/pull/1250), [\#1255](https://github.com/torrentpier/torrentpier/pull/1255) ([belomaxorka](https://github.com/belomaxorka)) -- Use "Views" string for thumbnails [\#1257](https://github.com/torrentpier/torrentpier/pull/1257) ([kovalensky](https://github.com/kovalensky)) -- Show user's ban status [\#1258](https://github.com/torrentpier/torrentpier/pull/1258) ([kovalensky](https://github.com/kovalensky)) -- Changed default upload path [\#1261](https://github.com/torrentpier/torrentpier/pull/1261) ([belomaxorka](https://github.com/belomaxorka)) -- Some improvements for Ban functionality [\#1262](https://github.com/torrentpier/torrentpier/pull/1262) ([belomaxorka](https://github.com/belomaxorka)) -- Striked username if user banned [\#1267](https://github.com/torrentpier/torrentpier/pull/1267) ([belomaxorka](https://github.com/belomaxorka)) -- Move filelist feature to another file [\#1268](https://github.com/torrentpier/torrentpier/pull/1268) ([kovalensky](https://github.com/kovalensky)) -- Make caching for ban list [\#1269](https://github.com/torrentpier/torrentpier/pull/1269) ([belomaxorka](https://github.com/belomaxorka)) -- Some display correction [\#1288](https://github.com/torrentpier/torrentpier/pull/1288) ([kovalensky](https://github.com/kovalensky)) -- Some enhancements [\#1278](https://github.com/torrentpier/torrentpier/pull/1278) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced some file_exists() to is_file() [\#1276](https://github.com/torrentpier/torrentpier/pull/1276) ([belomaxorka](https://github.com/belomaxorka)) -- Translations [\#1274](https://github.com/torrentpier/torrentpier/pull/1274) ([kovalensky](https://github.com/kovalensky)) -- Announcer integer limits & Country flags display [\#1277](https://github.com/torrentpier/torrentpier/pull/1277) ([kovalensky](https://github.com/kovalensky)) -- Some .png file optimizations [\#1283](https://github.com/torrentpier/torrentpier/pull/1283) ([kovalensky](https://github.com/kovalensky)) -- Few cosmetic improvements [\#1284](https://github.com/torrentpier/torrentpier/pull/1284) ([belomaxorka](https://github.com/belomaxorka)) -- Some CSS additions [\#1280](https://github.com/torrentpier/torrentpier/pull/1280) ([kovalensky](https://github.com/kovalensky)) -- Block uploading more than one torrent file [\#1293](https://github.com/torrentpier/torrentpier/pull/1293) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing lang variable [\#1295](https://github.com/torrentpier/torrentpier/pull/1295) ([belomaxorka](https://github.com/belomaxorka)) -- Moved file_list_v2.php back to includes [\#1303](https://github.com/torrentpier/torrentpier/pull/1303) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1203](https://github.com/torrentpier/torrentpier/pull/1203), [\#1222](https://github.com/torrentpier/torrentpier/pull/1222), [\#1251](https://github.com/torrentpier/torrentpier/pull/1251), [\#1260](https://github.com/torrentpier/torrentpier/pull/1260), [\#1264](https://github.com/torrentpier/torrentpier/pull/1264), [\#1282](https://github.com/torrentpier/torrentpier/pull/1282), [\#1287](https://github.com/torrentpier/torrentpier/pull/1287), [\#1296](https://github.com/torrentpier/torrentpier/pull/1296), [\#1297](https://github.com/torrentpier/torrentpier/pull/1297), [\#1299](https://github.com/torrentpier/torrentpier/pull/1299), [\#1300](https://github.com/torrentpier/torrentpier/pull/1300) ([Exileum](https://github.com/Exileum)) - -## [v2.4.0-rc2](https://github.com/torrentpier/torrentpier/tree/v2.4.0-rc2) (2023-12-12) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-rc1...v2.4.0-rc2) - -**Merged pull requests:** - -- Fixed void function result used [\#1170](https://github.com/torrentpier/torrentpier/pull/1170) ([belomaxorka](https://github.com/belomaxorka)) -- Improved cookie management πŸͺ [\#1171](https://github.com/torrentpier/torrentpier/pull/1171) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced strpos() with simplified realization [\#1172](https://github.com/torrentpier/torrentpier/pull/1172) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced some 'switch' with the 'match' expression [\#1173](https://github.com/torrentpier/torrentpier/pull/1173) ([belomaxorka](https://github.com/belomaxorka)) -- Feature to ban specific torrent clients [\#1175](https://github.com/torrentpier/torrentpier/pull/1175) ([kovalensky](https://github.com/kovalensky)) -- Code re-formatting [\#1176](https://github.com/torrentpier/torrentpier/pull/1176) ([kovalensky](https://github.com/kovalensky)) -- Removed useless width for BBCode buttons [\#1180](https://github.com/torrentpier/torrentpier/pull/1180) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored memberlist.php πŸŽ“ [\#1181](https://github.com/torrentpier/torrentpier/pull/1181) ([belomaxorka](https://github.com/belomaxorka)) -- Peer ID was erased if it contained non-latin characters [\#1185](https://github.com/torrentpier/torrentpier/pull/1185) ([kovalensky](https://github.com/kovalensky)) -- Removed verify_id() function [\#1187](https://github.com/torrentpier/torrentpier/pull/1187) ([belomaxorka](https://github.com/belomaxorka)) -- Removed sys_getloadavg() [\#1188](https://github.com/torrentpier/torrentpier/pull/1188) ([belomaxorka](https://github.com/belomaxorka)) -- RC2 timeline [\#1186](https://github.com/torrentpier/torrentpier/pull/1186) ([kovalensky](https://github.com/kovalensky)) -- Get SERVER_NAME variable for cron tasks [\#1190](https://github.com/torrentpier/torrentpier/pull/1190) ([kovalensky](https://github.com/kovalensky)) -- Remove unnecessary file hashes for in-forum file-listing [\#1192](https://github.com/torrentpier/torrentpier/pull/1192) ([kovalensky](https://github.com/kovalensky)) -- Use one GET variable for filelisting [\#1193](https://github.com/torrentpier/torrentpier/pull/1193) ([kovalensky](https://github.com/kovalensky)) -- Refactored poll.php [\#1194](https://github.com/torrentpier/torrentpier/pull/1194) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless global $lang; from info.php [\#1195](https://github.com/torrentpier/torrentpier/pull/1195) ([belomaxorka](https://github.com/belomaxorka)) -- Update file_list_v2.php [\#1196](https://github.com/torrentpier/torrentpier/pull/1196), [\#1197](https://github.com/torrentpier/torrentpier/pull/1197), [\#1199](https://github.com/torrentpier/torrentpier/pull/1199) ([kovalensky](https://github.com/kovalensky)) -- Small code re-format for scrape.php [\#1198](https://github.com/torrentpier/torrentpier/pull/1198) ([kovalensky](https://github.com/kovalensky)) -- Some reported bugfixes [\#1200](https://github.com/torrentpier/torrentpier/pull/1200) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1177](https://github.com/torrentpier/torrentpier/pull/1177), [\#1178](https://github.com/torrentpier/torrentpier/pull/1178),[\#1183](https://github.com/torrentpier/torrentpier/pull/1183), [\#1184](https://github.com/torrentpier/torrentpier/pull/1184) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1179](https://github.com/torrentpier/torrentpier/pull/1179), [\#1182](https://github.com/torrentpier/torrentpier/pull/1182), [\#1191](https://github.com/torrentpier/torrentpier/pull/1191) ([Exileum](https://github.com/Exileum)) - -## [v2.4.0-rc1](https://github.com/torrentpier/torrentpier/tree/v2.4.0-rc1) (2023-11-25) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-beta4...v2.4.0-rc1) - -**Merged pull requests:** - -- Revert "Fix sql group (#128)" [1753db1](https://github.com/torrentpier/torrentpier/commit/1753db1fcef7d50eb8f8ba4b1f5a4ad7585ffaa4) ([belomaxorka](https://github.com/belomaxorka)) -- Simplified gender function [\#1167](https://github.com/torrentpier/torrentpier/pull/1167) ([belomaxorka](https://github.com/belomaxorka)) -- Revert "Fixed input types in some cases (#697)" [20ce8ca](https://github.com/torrentpier/torrentpier/commit/20ce8cae9cf6447f5100ab2d8f4a5299254f5412) ([belomaxorka](https://github.com/belomaxorka)) -- Revert "Fixed input types in some cases (#693)" [74aa6ff](https://github.com/torrentpier/torrentpier/commit/74aa6ff29991186ffc6484980972d5f74e4d0393) ([belomaxorka](https://github.com/belomaxorka)) -- Support simultaneous id & username inputs for browsing profiles [\#1166](https://github.com/torrentpier/torrentpier/pull/1166) ([kovalensky](https://github.com/kovalensky)) -- Tighten registration requirements for torrent files [\#1165](https://github.com/torrentpier/torrentpier/pull/1165) ([kovalensky](https://github.com/kovalensky)) -- File listing β€” use browser cache [\#1164](https://github.com/torrentpier/torrentpier/pull/1164) ([kovalensky](https://github.com/kovalensky)) -- Legacy code comment translations [\#1163](https://github.com/torrentpier/torrentpier/pull/1163) ([kovalensky](https://github.com/kovalensky)) -- Invites config re-formatting [\#1162](https://github.com/torrentpier/torrentpier/pull/1162) ([belomaxorka](https://github.com/belomaxorka)) -- Use external cookie library to prevent incorrect cookie setting [\#1160](https://github.com/torrentpier/torrentpier/pull/1160), [\#1161](https://github.com/torrentpier/torrentpier/pull/1161) ([belomaxorka](https://github.com/belomaxorka)) -- Some improvements in default template [\#1159](https://github.com/torrentpier/torrentpier/pull/1159) ([belomaxorka](https://github.com/belomaxorka)) -- Use sent port instead of source [\#1158](https://github.com/torrentpier/torrentpier/pull/1158) ([kovalensky](https://github.com/kovalensky)) -- Remove unnecessary meta tags from file listing [\#1157](https://github.com/torrentpier/torrentpier/pull/1157) ([kovalensky](https://github.com/kovalensky)) -- Use different file listing url parameters for effective indexing by search engines [\#1156](https://github.com/torrentpier/torrentpier/pull/1156) ([kovalensky](https://github.com/kovalensky)) -- Check topic_id existence while searching in tracker mode [\#1155](https://github.com/torrentpier/torrentpier/pull/1155) ([kovalensky](https://github.com/kovalensky)) -- Some improvement [\#1151](https://github.com/torrentpier/torrentpier/pull/1151) ([kovalensky](https://github.com/kovalensky)) -- Disable invites by default [\#1150](https://github.com/torrentpier/torrentpier/pull/1150) ([kovalensky](https://github.com/kovalensky)) -- Event based invite system [\#1149](https://github.com/torrentpier/torrentpier/pull/1149) ([kovalensky](https://github.com/kovalensky)) -- Some code quality improvements [\#1148](https://github.com/torrentpier/torrentpier/pull/1148) ([belomaxorka](https://github.com/belomaxorka)) -- Vote button code improvements [\#1140](https://github.com/torrentpier/torrentpier/pull/1140), [\#1142](https://github.com/torrentpier/torrentpier/pull/1142), [\#1143](https://github.com/torrentpier/torrentpier/pull/1143), [\#1146](https://github.com/torrentpier/torrentpier/pull/1146) ([belomaxorka](https://github.com/belomaxorka)) -- Vote button and v2 file list topic url display [\#1138](https://github.com/torrentpier/torrentpier/pull/1138) ([kovalensky](https://github.com/kovalensky)) -- Removed topic watch useless code [\#1137](https://github.com/torrentpier/torrentpier/pull/1137) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed topic_watch array key name [\#1136](https://github.com/torrentpier/torrentpier/pull/1136) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed announce-list indexes ordering [\#1135](https://github.com/torrentpier/torrentpier/pull/1135) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed $bb_cfg['file_id_ext'] ordering [\#1134](https://github.com/torrentpier/torrentpier/pull/1134) ([belomaxorka](https://github.com/belomaxorka)) -- Normalizing announce-list [\#1133](https://github.com/torrentpier/torrentpier/pull/1133) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed announcer-list issue [\#1129](https://github.com/torrentpier/torrentpier/pull/1129), [\#1130](https://github.com/torrentpier/torrentpier/pull/1130), [\#1131](https://github.com/torrentpier/torrentpier/pull/1131), [\#1132](https://github.com/torrentpier/torrentpier/pull/1132) ([belomaxorka](https://github.com/belomaxorka)) -- Removed client column from bb_bt_tracker table [\#1128](https://github.com/torrentpier/torrentpier/pull/1128) ([belomaxorka](https://github.com/belomaxorka)) -- Removed one-time used variables [\#1120](https://github.com/torrentpier/torrentpier/pull/1120) ([belomaxorka](https://github.com/belomaxorka)) -- Don't create empty announce-list dict, if ann_urls are empty [\#1119](https://github.com/torrentpier/torrentpier/pull/1119) ([kovalensky](https://github.com/kovalensky)) -- Improve code for retracker addition [\#1118](https://github.com/torrentpier/torrentpier/pull/1118) ([kovalensky](https://github.com/kovalensky)) -- Don't use main announce url inside announce-list [\#1117](https://github.com/torrentpier/torrentpier/pull/1117) ([kovalensky](https://github.com/kovalensky)) -- Don't check for announce-list while adding new urls [\#1116](https://github.com/torrentpier/torrentpier/pull/1116) ([kovalensky](https://github.com/kovalensky)) -- Cleanup: Removed useless global variable [\#1115](https://github.com/torrentpier/torrentpier/pull/1115) ([belomaxorka](https://github.com/belomaxorka)) -- Unset debug cookies if SQL_DEBUG disabled [\#1114](https://github.com/torrentpier/torrentpier/pull/1114) ([belomaxorka](https://github.com/belomaxorka)) -- Announcer's code re-formatting [\#1112](https://github.com/torrentpier/torrentpier/pull/1112) ([kovalensky](https://github.com/kovalensky)) -- Used new-style [] array constructions in some cases [\#1111](https://github.com/torrentpier/torrentpier/pull/1111) ([belomaxorka](https://github.com/belomaxorka)) -- Use http_response_code() functions instead of old header() functions [\#1110](https://github.com/torrentpier/torrentpier/pull/1110) ([belomaxorka](https://github.com/belomaxorka)) -- Fix bypassing cache if IP changed while using cache [\#1109](https://github.com/torrentpier/torrentpier/pull/1109) ([kovalensky](https://github.com/kovalensky)) -- Use one variable to determine update status for hybrids [\#1108](https://github.com/torrentpier/torrentpier/pull/1108) ([kovalensky](https://github.com/kovalensky)) -- Don't re-announce even if peer cache is present [\#1107](https://github.com/torrentpier/torrentpier/pull/1107) ([kovalensky](https://github.com/kovalensky)) -- Used br2nl() in ajax alert messages [\#1106](https://github.com/torrentpier/torrentpier/pull/1106) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced some html_entity_decode to engine's built-in function [\#1105](https://github.com/torrentpier/torrentpier/pull/1105) ([belomaxorka](https://github.com/belomaxorka)) -- Fix typo [\#1104](https://github.com/torrentpier/torrentpier/pull/1104), [\#1124](https://github.com/torrentpier/torrentpier/pull/1124), [\#1153](https://github.com/torrentpier/torrentpier/pull/1153), [\#1168](https://github.com/torrentpier/torrentpier/pull/1168) ([kovalensky](https://github.com/kovalensky)) -- Change default engine language to en [\#1103](https://github.com/torrentpier/torrentpier/pull/1103) ([kovalensky](https://github.com/kovalensky)) -- Record changed port while re-announcing [\#1102](https://github.com/torrentpier/torrentpier/pull/1102) ([kovalensky](https://github.com/kovalensky)) -- Translations for config.php, raised scrape interval [\#1100](https://github.com/torrentpier/torrentpier/pull/1100) ([kovalensky](https://github.com/kovalensky)) -- Don't re-announce for hybrids if the event is "stopped" [\#1099](https://github.com/torrentpier/torrentpier/pull/1099) ([kovalensky](https://github.com/kovalensky)) -- Security measures [\#1098](https://github.com/torrentpier/torrentpier/pull/1098), [\#1113](https://github.com/torrentpier/torrentpier/pull/1113) ([kovalensky](https://github.com/kovalensky), [belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#1121](https://github.com/torrentpier/torrentpier/pull/1121), [\#1122](https://github.com/torrentpier/torrentpier/pull/1122), [\#1123](https://github.com/torrentpier/torrentpier/pull/1123), [\#1125](https://github.com/torrentpier/torrentpier/pull/1125), [\#1141](https://github.com/torrentpier/torrentpier/pull/1141) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#1097](https://github.com/torrentpier/torrentpier/pull/1097), [\#1101](https://github.com/torrentpier/torrentpier/pull/1101), [\#1144](https://github.com/torrentpier/torrentpier/pull/1144), [\#1154](https://github.com/torrentpier/torrentpier/pull/1154) ([Exileum](https://github.com/Exileum)) - -## [v2.4.0-beta4](https://github.com/torrentpier/torrentpier/tree/v2.4.0-beta4) (2023-11-14) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-beta3...v2.4.0-beta4) - -**Merged pull requests:** - -- Use TORRENT_EXT constants for definition torrent extension [\#1096](https://github.com/torrentpier/torrentpier/pull/1096) ([belomaxorka](https://github.com/belomaxorka)) -- Remove html entities for file names [\#1094](https://github.com/torrentpier/torrentpier/pull/1094) ([kovalensky](https://github.com/kovalensky)) -- Fix for html entities being displayed in magnet links [\#1092](https://github.com/torrentpier/torrentpier/pull/1092) ([kovalensky](https://github.com/kovalensky)) -- Calling make_jumpbox() where it needed [\#1091](https://github.com/torrentpier/torrentpier/pull/1091) ([belomaxorka](https://github.com/belomaxorka)) -- Include full url for client icon displaying [\#1088](https://github.com/torrentpier/torrentpier/pull/1088) ([kovalensky](https://github.com/kovalensky)) -- Fix not working code [\#1087](https://github.com/torrentpier/torrentpier/pull/1087) ([kovalensky](https://github.com/kovalensky)) -- Fixed data types for seeder_last_seen [\#1086](https://github.com/torrentpier/torrentpier/pull/1086) ([belomaxorka](https://github.com/belomaxorka)) -- Fix broken PM (Private messages) [\#1085](https://github.com/torrentpier/torrentpier/pull/1085) ([kovalensky](https://github.com/kovalensky)) -- Fixed a bug causing inability to view file contents for some torrents [\#1084](https://github.com/torrentpier/torrentpier/pull/1084) ([kovalensky](https://github.com/kovalensky)) -- Show file count while listing [\#1082](https://github.com/torrentpier/torrentpier/pull/1082) ([kovalensky](https://github.com/kovalensky)) -- Simplified jumpbox πŸ“œ [\#815](https://github.com/torrentpier/torrentpier/pull/815) ([belomaxorka](https://github.com/belomaxorka)) -- Removed sorting for torrent clients in table [\#1080](https://github.com/torrentpier/torrentpier/pull/1080) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken table in tracker [\#1079](https://github.com/torrentpier/torrentpier/pull/1079) ([belomaxorka](https://github.com/belomaxorka)) -- CSS improvement for file listing [\#1077](https://github.com/torrentpier/torrentpier/pull/1077), [\#1081](https://github.com/torrentpier/torrentpier/pull/1081), [\#1083](https://github.com/torrentpier/torrentpier/pull/1083) ([kovalensky](https://github.com/kovalensky)) -- Minor improvements [\#1078](https://github.com/torrentpier/torrentpier/pull/1078), [\#1095](https://github.com/torrentpier/torrentpier/pull/1095) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#1089](https://github.com/torrentpier/torrentpier/pull/1089), [\#1090](https://github.com/torrentpier/torrentpier/pull/1090) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-beta3](https://github.com/torrentpier/torrentpier/tree/v2.4.0-beta3) (2023-11-11) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-beta2...v2.4.0-beta3) - -**Merged pull requests:** - -- Use built-in delta_time for age display [\#1075](https://github.com/torrentpier/torrentpier/pull/1075) ([kovalensky](https://github.com/kovalensky)) -- List with numbers in tracker stats [\#1074](https://github.com/torrentpier/torrentpier/pull/1074) ([kovalensky](https://github.com/kovalensky)) -- Sort clients from higher to lower in tracker stats [\#1073](https://github.com/torrentpier/torrentpier/pull/1073) ([kovalensky](https://github.com/kovalensky)) -- Use more reliable original file names for attachments [\#1070](https://github.com/torrentpier/torrentpier/pull/1070) ([kovalensky](https://github.com/kovalensky)) -- Tracker client stats cache, more robust file list functions, permissions for file list access [\#1069](https://github.com/torrentpier/torrentpier/pull/1069) ([kovalensky](https://github.com/kovalensky)) -- Some code improvements for file listing [\#1068](https://github.com/torrentpier/torrentpier/pull/1068) ([kovalensky](https://github.com/kovalensky)) -- Update styles for file list [\#1067](https://github.com/torrentpier/torrentpier/pull/1067) ([kovalensky](https://github.com/kovalensky)) -- Show client information for file list [\#1066](https://github.com/torrentpier/torrentpier/pull/1066) ([kovalensky](https://github.com/kovalensky)) -- File list tables for v2 compatible torrents [\#1064](https://github.com/torrentpier/torrentpier/pull/1064) ([kovalensky](https://github.com/kovalensky)) -- Show options for version debugging of user clients [\#1061](https://github.com/torrentpier/torrentpier/pull/1061) ([kovalensky](https://github.com/kovalensky)) -- Fixed broken avatar ajax action for users [\#1060](https://github.com/torrentpier/torrentpier/pull/1060) ([belomaxorka](https://github.com/belomaxorka)) -- Show icons for clients while in the tracker statistics [\#1057](https://github.com/torrentpier/torrentpier/pull/1057) ([kovalensky](https://github.com/kovalensky)) -- Show user clients percentage in tracker statistics [\#1057](https://github.com/torrentpier/torrentpier/pull/1057) ([kovalensky](https://github.com/kovalensky)) -- Fixed undefined tpl variable SHOW_GROUP_MEMBERSHIP [\#1055](https://github.com/torrentpier/torrentpier/pull/1055) ([belomaxorka](https://github.com/belomaxorka)) -- Show guests for last seeders [\#1053](https://github.com/torrentpier/torrentpier/pull/1053) ([kovalensky](https://github.com/kovalensky)) -- Last seeder display improvements [\#1052](https://github.com/torrentpier/torrentpier/pull/1052) ([kovalensky](https://github.com/kovalensky)) -- Show the last seeder's username in topics [\#1051](https://github.com/torrentpier/torrentpier/pull/1051) ([kovalensky](https://github.com/kovalensky)) -- Minor improvements for template [\#1050](https://github.com/torrentpier/torrentpier/pull/1050) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: Moderators can't see self IP addresses [\#1049](https://github.com/torrentpier/torrentpier/pull/1049) ([belomaxorka](https://github.com/belomaxorka)) -- View user's profile also by it's username [\#1048](https://github.com/torrentpier/torrentpier/pull/1048) ([kovalensky](https://github.com/kovalensky)) -- Scrape.php code reformatting [\#1047](https://github.com/torrentpier/torrentpier/pull/1047) ([kovalensky](https://github.com/kovalensky)) -- Scraping improvements [\#1046](https://github.com/torrentpier/torrentpier/pull/1046) ([kovalensky](https://github.com/kovalensky)) -- Small tracker improvements [\#1043](https://github.com/torrentpier/torrentpier/pull/1043) ([kovalensky](https://github.com/kovalensky)) -- Small improvements to scraping [\#1042](https://github.com/torrentpier/torrentpier/pull/1042) ([kovalensky](https://github.com/kovalensky)) -- Added v2 hash search to the scraping [\#1040](https://github.com/torrentpier/torrentpier/pull/1040) ([kovalensky](https://github.com/kovalensky)) -- Update magnet icon [\#1038](https://github.com/torrentpier/torrentpier/pull/1038) ([kovalensky](https://github.com/kovalensky)) -- Magnet link tweaks [\#1035](https://github.com/torrentpier/torrentpier/pull/1035) ([kovalensky](https://github.com/kovalensky)) -- Use built-in binary hash feature [\#1032](https://github.com/torrentpier/torrentpier/pull/1032) ([kovalensky](https://github.com/kovalensky)) -- Some v2 hashes were not found in the announcer [\#1031](https://github.com/torrentpier/torrentpier/pull/1031) ([kovalensky](https://github.com/kovalensky)) -- Fix issues related to file list display and torrent registration [\#1028](https://github.com/torrentpier/torrentpier/pull/1028) ([kovalensky](https://github.com/kovalensky)) -- NAT users' real port [\#1027](https://github.com/torrentpier/torrentpier/pull/1027) ([kovalensky](https://github.com/kovalensky)) -- Removed time zone auto detection [\#1025](https://github.com/torrentpier/torrentpier/pull/1025) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to debug ajax_die() calls [\#1023](https://github.com/torrentpier/torrentpier/pull/1023) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed incorrect displaying post actions buttons [\#1021](https://github.com/torrentpier/torrentpier/pull/1021) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed undefined offset of $action_params [\#1020](https://github.com/torrentpier/torrentpier/pull/1020) ([belomaxorka](https://github.com/belomaxorka)) -- Transfer from array to ArrayObject data type [\#1019](https://github.com/torrentpier/torrentpier/pull/1019) ([kovalensky](https://github.com/kovalensky)) -- Multiple Scrape [\#1018](https://github.com/torrentpier/torrentpier/pull/1018) ([kovalensky](https://github.com/kovalensky)) -- Announce IPv4 && IPv6 of peers! [\#1017](https://github.com/torrentpier/torrentpier/pull/1017) ([kovalensky](https://github.com/kovalensky)) -- Bind peer_hash to auth_key to avoid double announces via IPv4 and IPv6 at the same time [\#1016](https://github.com/torrentpier/torrentpier/pull/1016) ([kovalensky](https://github.com/kovalensky)) -- Increase auth_key char length [\#1014](https://github.com/torrentpier/torrentpier/pull/1014) ([kovalensky](https://github.com/kovalensky)) -- More performance optimized/random string generation, removed passkey length limit from the announcer [\#1013](https://github.com/torrentpier/torrentpier/pull/1013) ([kovalensky](https://github.com/kovalensky)) -- More performance optimized/random string generation, removed limit from for announce key in the announcer [\#1012](https://github.com/torrentpier/torrentpier/pull/1012) ([kovalensky](https://github.com/kovalensky)) -- Fixed broken ordering in memberlist.php [\#1010](https://github.com/torrentpier/torrentpier/pull/1010) ([belomaxorka](https://github.com/belomaxorka)) -- Some fixes in admin_attach_cp.php [\#1009](https://github.com/torrentpier/torrentpier/pull/1009) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed undefined $lang['PREVIOUS'] [\#1008](https://github.com/torrentpier/torrentpier/pull/1008) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken letter marking in memberlist.php [\#1007](https://github.com/torrentpier/torrentpier/pull/1007) ([belomaxorka](https://github.com/belomaxorka)) -- Moved htmlCHR() in common.php [\#1006](https://github.com/torrentpier/torrentpier/pull/1006) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed error while trying to delete posts by bot [\#1004](https://github.com/torrentpier/torrentpier/pull/1004) ([belomaxorka](https://github.com/belomaxorka)) -- Escape HTML characters for peer_id once to avoid load [\#1002](https://github.com/torrentpier/torrentpier/pull/1002) ([kovalensky](https://github.com/kovalensky)) -- πŸ˜…πŸ’™ 1000th PR Merged! πŸ’™πŸ˜… [\#1001](https://github.com/torrentpier/torrentpier/pull/1001) ([belomaxorka](https://github.com/belomaxorka)) -- Added the ability to add additional announce URLs into torrent files [\#999](https://github.com/torrentpier/torrentpier/pull/999) ([belomaxorka](https://github.com/belomaxorka)) -- Expression can be replaced by '??' version [\#998](https://github.com/torrentpier/torrentpier/pull/998) ([belomaxorka](https://github.com/belomaxorka)) -- Added check $bb_cfg['magnet_links_enabled'] in create_magnet() [\#996](https://github.com/torrentpier/torrentpier/pull/996) ([belomaxorka](https://github.com/belomaxorka)) -- Added $lang['BT_UNREGISTERED_ALREADY'] lang key [\#994](https://github.com/torrentpier/torrentpier/pull/994) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless "Subject:" from email templates [\#993](https://github.com/torrentpier/torrentpier/pull/993) ([belomaxorka](https://github.com/belomaxorka)) -- SQL: Increase speed_up & speed_down type limits [\#992](https://github.com/torrentpier/torrentpier/pull/992) ([belomaxorka](https://github.com/belomaxorka)) -- Use strip_tags() for message in prompt_for_confirm() [\#991](https://github.com/torrentpier/torrentpier/pull/991) ([belomaxorka](https://github.com/belomaxorka)) -- Use strip_tags() for error message in ajax_die() [\#990](https://github.com/torrentpier/torrentpier/pull/990) ([belomaxorka](https://github.com/belomaxorka)) -- Use lang variable $lang['BT_REG_FAIL'] instead of text [\#989](https://github.com/torrentpier/torrentpier/pull/989) ([belomaxorka](https://github.com/belomaxorka)) -- Use announce messages even after using redundant cache for output [\#987](https://github.com/torrentpier/torrentpier/pull/987) ([kovalensky](https://github.com/kovalensky)) -- Fix currently not working peer icons [\#986](https://github.com/torrentpier/torrentpier/pull/986) ([kovalensky](https://github.com/kovalensky)) -- Variable collision fix [\#984](https://github.com/torrentpier/torrentpier/pull/984), [\#985](https://github.com/torrentpier/torrentpier/pull/985) ([kovalensky](https://github.com/kovalensky)) -- Fixed percentage calculation for SQL debug [\#980](https://github.com/torrentpier/torrentpier/pull/980) ([belomaxorka](https://github.com/belomaxorka)) -- Refactoring: Use isset() with multiple parameters [\#978](https://github.com/torrentpier/torrentpier/pull/978) ([belomaxorka](https://github.com/belomaxorka)) -- Check $tpl_vars['QUESTION'] in print_confirmation() [\#977](https://github.com/torrentpier/torrentpier/pull/977) ([belomaxorka](https://github.com/belomaxorka)) -- Peer client display support [\#968](https://github.com/torrentpier/torrentpier/pull/968) ([kovalensky](https://github.com/kovalensky)) -- Fixed undefined array key group_description [\#969](https://github.com/torrentpier/torrentpier/pull/969) ([belomaxorka](https://github.com/belomaxorka)) -- Added my name to the list of authors [\#963](https://github.com/torrentpier/torrentpier/pull/963) ([kovalensky](https://github.com/kovalensky)) -- Better way to prioritize peers [\#962](https://github.com/torrentpier/torrentpier/pull/962) ([kovalensky](https://github.com/kovalensky)) -- Prioritize returning leecher list for seeder announces [\#961](https://github.com/torrentpier/torrentpier/pull/961) ([kovalensky](https://github.com/kovalensky)) -- Generate .torrent file names based on topic titles [\#958](https://github.com/torrentpier/torrentpier/pull/958) ([kovalensky](https://github.com/kovalensky)) -- long2ip_extended() missing function [\#948](https://github.com/torrentpier/torrentpier/pull/948) ([kovalensky](https://github.com/kovalensky)) -- Use humn_size() for AVATAR_EXPLAIN [\#943](https://github.com/torrentpier/torrentpier/pull/943) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing template var in group.php [\#939](https://github.com/torrentpier/torrentpier/pull/939) ([belomaxorka](https://github.com/belomaxorka)) -- BEP-7 & BEP-24 & IPv6 functions [\#934](https://github.com/torrentpier/torrentpier/pull/934) ([kovalensky](https://github.com/kovalensky)) -- Prevent infinity user adding into group [\#937](https://github.com/torrentpier/torrentpier/pull/937) ([belomaxorka](https://github.com/belomaxorka)) -- Maked configurable email visibility for everybody [\#936](https://github.com/torrentpier/torrentpier/pull/936) ([belomaxorka](https://github.com/belomaxorka)) -- Respond with loopback if peer list is empty [\#933](https://github.com/torrentpier/torrentpier/pull/933) ([kovalensky](https://github.com/kovalensky)) -- Use \Arokettu\Bencode\ instead \SandFox\Bencode\ [\#932](https://github.com/torrentpier/torrentpier/pull/932) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for bmp images [\#931](https://github.com/torrentpier/torrentpier/pull/931) ([belomaxorka](https://github.com/belomaxorka)) -- ACP: Changed extensions sorting [\#930](https://github.com/torrentpier/torrentpier/pull/930) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing bmp extension in SQL dump [\#929](https://github.com/torrentpier/torrentpier/pull/929) ([belomaxorka](https://github.com/belomaxorka)) -- Use IMAGETYPE_* constants [\#928](https://github.com/torrentpier/torrentpier/pull/928) ([belomaxorka](https://github.com/belomaxorka)) -- Small refactoring in Upload class [\#927](https://github.com/torrentpier/torrentpier/pull/927) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for webp avatars [\#926](https://github.com/torrentpier/torrentpier/pull/926) ([belomaxorka](https://github.com/belomaxorka)) -- Added check up_allowed in Upload.php class [\#924](https://github.com/torrentpier/torrentpier/pull/924) ([belomaxorka](https://github.com/belomaxorka)) -- Added support for webp images πŸŒ† [\#919](https://github.com/torrentpier/torrentpier/pull/919) ([belomaxorka](https://github.com/belomaxorka)) -- Switched from md5 to a faster xxHash hash function [\#921](https://github.com/torrentpier/torrentpier/pull/921) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Added support 7z archives [\#923](https://github.com/torrentpier/torrentpier/pull/923) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing EXCLUDED_USERS in tr_stats.php [\#922](https://github.com/torrentpier/torrentpier/pull/922) ([belomaxorka](https://github.com/belomaxorka)) -- Announcer support for responding to stopped events [\#918](https://github.com/torrentpier/torrentpier/pull/918) ([kovalensky](https://github.com/kovalensky)) -- Added missing !defined('BB_ROOT') check [\#917](https://github.com/torrentpier/torrentpier/pull/917) ([belomaxorka](https://github.com/belomaxorka)) -- Support for IDN domains [\#909](https://github.com/torrentpier/torrentpier/pull/909) ([kovalensky](https://github.com/kovalensky)) -- Some cleanup [\#1003](https://github.com/torrentpier/torrentpier/pull/1003) ([belomaxorka](https://github.com/belomaxorka)) -- Code formatting [\#1026](https://github.com/torrentpier/torrentpier/pull/1026), [\#1030](https://github.com/torrentpier/torrentpier/pull/1030), [\#1044](https://github.com/torrentpier/torrentpier/pull/1044), [\#1056](https://github.com/torrentpier/torrentpier/pull/1056), [\#1059](https://github.com/torrentpier/torrentpier/pull/1059), [\#1062](https://github.com/torrentpier/torrentpier/pull/1062), [\#1063](https://github.com/torrentpier/torrentpier/pull/1063), [\#1065](https://github.com/torrentpier/torrentpier/pull/1065), [\#1071](https://github.com/torrentpier/torrentpier/pull/1071), [\#1076](https://github.com/torrentpier/torrentpier/pull/1076) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Minor code changes [\#967](https://github.com/torrentpier/torrentpier/pull/967), [\#970](https://github.com/torrentpier/torrentpier/pull/970) ([kovalensky](https://github.com/kovalensky)) -- Minor improvements [\#902](https://github.com/torrentpier/torrentpier/pull/902), [\#903](https://github.com/torrentpier/torrentpier/pull/903), [\#904](https://github.com/torrentpier/torrentpier/pull/904), [\#905](https://github.com/torrentpier/torrentpier/pull/905), [\#906](https://github.com/torrentpier/torrentpier/pull/906), [\#907](https://github.com/torrentpier/torrentpier/pull/907), [\#908](https://github.com/torrentpier/torrentpier/pull/908), [\#910](https://github.com/torrentpier/torrentpier/pull/910), [\#911](https://github.com/torrentpier/torrentpier/pull/911), [\#913](https://github.com/torrentpier/torrentpier/pull/913), [\#914](https://github.com/torrentpier/torrentpier/pull/914), [\#915](https://github.com/torrentpier/torrentpier/pull/915), [\#920](https://github.com/torrentpier/torrentpier/pull/920), [\#935](https://github.com/torrentpier/torrentpier/pull/935), [\#946](https://github.com/torrentpier/torrentpier/pull/946), [\#950](https://github.com/torrentpier/torrentpier/pull/950), [\#951](https://github.com/torrentpier/torrentpier/pull/951), [\#952](https://github.com/torrentpier/torrentpier/pull/952), [\#953](https://github.com/torrentpier/torrentpier/pull/953), [\#954](https://github.com/torrentpier/torrentpier/pull/954), [\#956](https://github.com/torrentpier/torrentpier/pull/956), [\#959](https://github.com/torrentpier/torrentpier/pull/959), [\#960](https://github.com/torrentpier/torrentpier/pull/960), [\#965](https://github.com/torrentpier/torrentpier/pull/965), [\#966](https://github.com/torrentpier/torrentpier/pull/966), [\#972](https://github.com/torrentpier/torrentpier/pull/972), [\#973](https://github.com/torrentpier/torrentpier/pull/973), [\#974](https://github.com/torrentpier/torrentpier/pull/974), [\#975](https://github.com/torrentpier/torrentpier/pull/975), [\#976](https://github.com/torrentpier/torrentpier/pull/976), [\#982](https://github.com/torrentpier/torrentpier/pull/982), [\#988](https://github.com/torrentpier/torrentpier/pull/988), [\#997](https://github.com/torrentpier/torrentpier/pull/997) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#912](https://github.com/torrentpier/torrentpier/pull/912), [\#916](https://github.com/torrentpier/torrentpier/pull/916), [\#925](https://github.com/torrentpier/torrentpier/pull/925), [\#947](https://github.com/torrentpier/torrentpier/pull/947), [\#957](https://github.com/torrentpier/torrentpier/pull/957), [\#971](https://github.com/torrentpier/torrentpier/pull/971), [\#979](https://github.com/torrentpier/torrentpier/pull/979), [\#995](https://github.com/torrentpier/torrentpier/pull/995), [\#1000](https://github.com/torrentpier/torrentpier/pull/1000), [\#1037](https://github.com/torrentpier/torrentpier/pull/1037), [\#1054](https://github.com/torrentpier/torrentpier/pull/1054), [\#1072](https://github.com/torrentpier/torrentpier/pull/1072) ([Exileum](https://github.com/Exileum)) -- Updated deps [\#964](https://github.com/torrentpier/torrentpier/pull/964), [\#983](https://github.com/torrentpier/torrentpier/pull/983), [\#1011](https://github.com/torrentpier/torrentpier/pull/1011), [\#1015](https://github.com/torrentpier/torrentpier/pull/1015), [\#1045](https://github.com/torrentpier/torrentpier/pull/1045) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-beta2](https://github.com/torrentpier/torrentpier/tree/v2.4.0-beta2) (2023-09-16) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-beta1...v2.4.0-beta2) - -**Merged pull requests:** - -- Tracker announce & scrape improvements πŸ₯³ [\#901](https://github.com/torrentpier/torrentpier/pull/901) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Fixed downloaded counter [\#894](https://github.com/torrentpier/torrentpier/pull/894) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Fixed null seeders & leechers in announcer [\#891](https://github.com/torrentpier/torrentpier/pull/891) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- BitTorrent v2 support enhancements πŸ₯³ [\#876](https://github.com/torrentpier/torrentpier/pull/876) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Added showing info_hash v2 in viewtopic.php [\#870](https://github.com/torrentpier/torrentpier/pull/870) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Added search by info_hash v2 🐯 [\#869](https://github.com/torrentpier/torrentpier/pull/869) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- BitTorrent v2 support 🐸 [\#866](https://github.com/torrentpier/torrentpier/pull/866) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Replace all double quotes with single quotes [\#888](https://github.com/torrentpier/torrentpier/pull/888) ([belomaxorka](https://github.com/belomaxorka)) -- Removed unused lang variables [\#885](https://github.com/torrentpier/torrentpier/pull/885) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed empty $row['pm_count'] [\#880](https://github.com/torrentpier/torrentpier/pull/880) ([belomaxorka](https://github.com/belomaxorka)) -- Created function get_banned_users() [\#878](https://github.com/torrentpier/torrentpier/pull/878) ([belomaxorka](https://github.com/belomaxorka)) -- Moved callseed to ajax actions [\#877](https://github.com/torrentpier/torrentpier/pull/877) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to remove topic templates [\#862](https://github.com/torrentpier/torrentpier/pull/862) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing translation in admin_ug_auth [\#861](https://github.com/torrentpier/torrentpier/pull/861) ([belomaxorka](https://github.com/belomaxorka)) -- Show renamed topic actions in log actions [\#860](https://github.com/torrentpier/torrentpier/pull/860) ([belomaxorka](https://github.com/belomaxorka)) -- Show set/unset downloaded actions in log actions [\#858](https://github.com/torrentpier/torrentpier/pull/858) ([belomaxorka](https://github.com/belomaxorka)) -- Show pin & unpin actions in log actions [\#857](https://github.com/torrentpier/torrentpier/pull/857) ([belomaxorka](https://github.com/belomaxorka)) -- Increase post_text & privmsgs_text limits [\#848](https://github.com/torrentpier/torrentpier/pull/848) ([belomaxorka](https://github.com/belomaxorka)) -- Added show password button [\#841](https://github.com/torrentpier/torrentpier/pull/841) ([belomaxorka](https://github.com/belomaxorka)) -- Passkey rework πŸ”« [\#839](https://github.com/torrentpier/torrentpier/pull/839) ([belomaxorka](https://github.com/belomaxorka)) -- Rename passkeyExists() -> getPasskey() [\#838](https://github.com/torrentpier/torrentpier/pull/838) ([belomaxorka](https://github.com/belomaxorka)) -- Added method passkeyExists() [\#837](https://github.com/torrentpier/torrentpier/pull/837) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored get_userdata() function [\#836](https://github.com/torrentpier/torrentpier/pull/836) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed $bb_cfg['pm_days_keep'] [\#834](https://github.com/torrentpier/torrentpier/pull/834) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#833](https://github.com/torrentpier/torrentpier/pull/833), [\#842](https://github.com/torrentpier/torrentpier/pull/842), [\#843](https://github.com/torrentpier/torrentpier/pull/843), [\#844](https://github.com/torrentpier/torrentpier/pull/844), [\#845](https://github.com/torrentpier/torrentpier/pull/845), [\#846](https://github.com/torrentpier/torrentpier/pull/846), [\#852](https://github.com/torrentpier/torrentpier/pull/852), [\#853](https://github.com/torrentpier/torrentpier/pull/853), [\#854](https://github.com/torrentpier/torrentpier/pull/854), [\#855](https://github.com/torrentpier/torrentpier/pull/855), [\#856](https://github.com/torrentpier/torrentpier/pull/856), [\#863](https://github.com/torrentpier/torrentpier/pull/863), [\#867](https://github.com/torrentpier/torrentpier/pull/867), [\#868](https://github.com/torrentpier/torrentpier/pull/868), [\#879](https://github.com/torrentpier/torrentpier/pull/879), [\#882](https://github.com/torrentpier/torrentpier/pull/882), [\#884](https://github.com/torrentpier/torrentpier/pull/884), [\#887](https://github.com/torrentpier/torrentpier/pull/887), [\#889](https://github.com/torrentpier/torrentpier/pull/889), [\#890](https://github.com/torrentpier/torrentpier/pull/890), [\#892](https://github.com/torrentpier/torrentpier/pull/892), [\#893](https://github.com/torrentpier/torrentpier/pull/893), [\#895](https://github.com/torrentpier/torrentpier/pull/895), [\#897](https://github.com/torrentpier/torrentpier/pull/897), [\#898](https://github.com/torrentpier/torrentpier/pull/898), [\#900](https://github.com/torrentpier/torrentpier/pull/900) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#840](https://github.com/torrentpier/torrentpier/pull/840), [\#850](https://github.com/torrentpier/torrentpier/pull/850), [\#859](https://github.com/torrentpier/torrentpier/pull/859), [\#871](https://github.com/torrentpier/torrentpier/pull/871), [\#881](https://github.com/torrentpier/torrentpier/pull/881), [\#886](https://github.com/torrentpier/torrentpier/pull/886) ([Exileum](https://github.com/Exileum), [belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#847](https://github.com/torrentpier/torrentpier/pull/847), [\#849](https://github.com/torrentpier/torrentpier/pull/849), [\#875](https://github.com/torrentpier/torrentpier/pull/875), [\#874](https://github.com/torrentpier/torrentpier/pull/874), [\#873](https://github.com/torrentpier/torrentpier/pull/873), [\#872](https://github.com/torrentpier/torrentpier/pull/872) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-beta1](https://github.com/torrentpier/torrentpier/tree/v2.4.0-beta1) (2023-07-18) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-alpha4...v2.4.0-beta1) - -**Merged pull requests:** - -- Fixed broken smilies replacing [\#832](https://github.com/torrentpier/torrentpier/pull/832) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed mailer exception exposing stack trace [\#831](https://github.com/torrentpier/torrentpier/pull/831) ([belomaxorka](https://github.com/belomaxorka), [Lange](https://torrentpier.com/members/lange.55/)) -- Maked max smilies in PM configurable [\#829](https://github.com/torrentpier/torrentpier/pull/829) ([belomaxorka](https://github.com/belomaxorka)) -- Fix RFC 1918 RegExp [\#828](https://github.com/torrentpier/torrentpier/pull/828) ([belomaxorka](https://github.com/belomaxorka), [MetalWarrior88](https://github.com/MetalWarrior88)) -- Fixed broken reset autologin [\#825](https://github.com/torrentpier/torrentpier/pull/825) ([belomaxorka](https://github.com/belomaxorka)) -- Improved debug πŸ› [\#822](https://github.com/torrentpier/torrentpier/pull/822) ([belomaxorka](https://github.com/belomaxorka)) -- Redirect to viewprofile.php if profile.php hasn't arguments [\#821](https://github.com/torrentpier/torrentpier/pull/821) ([belomaxorka](https://github.com/belomaxorka)) -- Show smilies in post for guests [\#817](https://github.com/torrentpier/torrentpier/pull/817) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to set MySQLi error reporting [\#813](https://github.com/torrentpier/torrentpier/pull/813) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to generate passkey after registration [\#810](https://github.com/torrentpier/torrentpier/pull/810) ([belomaxorka](https://github.com/belomaxorka)) -- Added search by torrent status [\#805](https://github.com/torrentpier/torrentpier/pull/805) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed pagination [\#800](https://github.com/torrentpier/torrentpier/pull/800) ([belomaxorka](https://github.com/belomaxorka)) -- Removed unused lang variables [\#802](https://github.com/torrentpier/torrentpier/pull/802) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#796](https://github.com/torrentpier/torrentpier/pull/796), [\#797](https://github.com/torrentpier/torrentpier/pull/797), [\#798](https://github.com/torrentpier/torrentpier/pull/798), [\#799](https://github.com/torrentpier/torrentpier/pull/799), [\#801](https://github.com/torrentpier/torrentpier/pull/801), [\#804](https://github.com/torrentpier/torrentpier/pull/804), [\#806](https://github.com/torrentpier/torrentpier/pull/806), [\#808](https://github.com/torrentpier/torrentpier/pull/808), [\#809](https://github.com/torrentpier/torrentpier/pull/809), [\#811](https://github.com/torrentpier/torrentpier/pull/811), [\#812](https://github.com/torrentpier/torrentpier/pull/812), [\#814](https://github.com/torrentpier/torrentpier/pull/814), [\#816](https://github.com/torrentpier/torrentpier/pull/816), [\#819](https://github.com/torrentpier/torrentpier/pull/819), [\#823](https://github.com/torrentpier/torrentpier/pull/823), [\#824](https://github.com/torrentpier/torrentpier/pull/824), [\#826](https://github.com/torrentpier/torrentpier/pull/826) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#803](https://github.com/torrentpier/torrentpier/pull/803), [\#807](https://github.com/torrentpier/torrentpier/pull/807) ([Exileum](https://github.com/Exileum)) -- Updated deps [\#818](https://github.com/torrentpier/torrentpier/pull/818), [\#830](https://github.com/torrentpier/torrentpier/pull/830) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-alpha4](https://github.com/torrentpier/torrentpier/tree/v2.4.0-alpha4) (2023-06-08) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-alpha3...v2.4.0-alpha4) - -**Merged pull requests:** - -- Maked max post length configurable [\#793](https://github.com/torrentpier/torrentpier/pull/793) ([belomaxorka](https://github.com/belomaxorka)) -- Used new Bencoder library πŸ”© [\#791](https://github.com/torrentpier/torrentpier/pull/791) ([belomaxorka](https://github.com/belomaxorka), [kovalensky](https://github.com/kovalensky)) -- Added some placeholders for input fields [\#789](https://github.com/torrentpier/torrentpier/pull/789) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed empty user search box [\#785](https://github.com/torrentpier/torrentpier/pull/785) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed null $u_data if user not found [\#783](https://github.com/torrentpier/torrentpier/pull/783) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing properties in User class [\#782](https://github.com/torrentpier/torrentpier/pull/782) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed some deprecations [\#777](https://github.com/torrentpier/torrentpier/pull/777) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: preg_match(): Passing null to parameter [\#776](https://github.com/torrentpier/torrentpier/pull/776) ([belomaxorka](https://github.com/belomaxorka)) -- Reformated JS [\#770](https://github.com/torrentpier/torrentpier/pull/770), [\#794](https://github.com/torrentpier/torrentpier/pull/794) ([belomaxorka](https://github.com/belomaxorka)) -- Implemented password_hash API πŸ₯³ [\#768](https://github.com/torrentpier/torrentpier/pull/768) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#763](https://github.com/torrentpier/torrentpier/pull/763) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#769](https://github.com/torrentpier/torrentpier/pull/769), [\#773](https://github.com/torrentpier/torrentpier/pull/773), [\#784](https://github.com/torrentpier/torrentpier/pull/784), [\#787](https://github.com/torrentpier/torrentpier/pull/787), [\#788](https://github.com/torrentpier/torrentpier/pull/788), [\#795](https://github.com/torrentpier/torrentpier/pull/795) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#786](https://github.com/torrentpier/torrentpier/pull/786) ([Exileum](https://github.com/Exileum)) - -## [v2.4.0-alpha3](https://github.com/torrentpier/torrentpier/tree/v2.4.0-alpha3) (2023-06-02) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-alpha2...v2.4.0-alpha3) - -**Merged pull requests:** - -- Maked jumpbox optional [\#727](https://github.com/torrentpier/torrentpier/pull/727) ([belomaxorka](https://github.com/belomaxorka)) -- Code Inspection: Ternary expression can be replaced with condition [\#728](https://github.com/torrentpier/torrentpier/pull/728) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: [Deprecated] number_format(): Passing null to parameter [\#729](https://github.com/torrentpier/torrentpier/pull/729) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced prn_r() function with dump() [\#730](https://github.com/torrentpier/torrentpier/pull/730) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced bb_exit() with native [\#731](https://github.com/torrentpier/torrentpier/pull/731) ([belomaxorka](https://github.com/belomaxorka)) -- Added exception if .env not found [\#734](https://github.com/torrentpier/torrentpier/pull/734) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken file_write() function [\#737](https://github.com/torrentpier/torrentpier/pull/737) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken $replace_content [\#738](https://github.com/torrentpier/torrentpier/pull/738) ([belomaxorka](https://github.com/belomaxorka)) -- Moved poll functions to Poll class [\#739](https://github.com/torrentpier/torrentpier/pull/739) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced bb_realpath() with native [\#740](https://github.com/torrentpier/torrentpier/pull/740) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed methods types in Admin/Cron.php [\#743](https://github.com/torrentpier/torrentpier/pull/743) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed empty $_SERVER['SERVER_PROTOCOL'] in cron [\#744](https://github.com/torrentpier/torrentpier/pull/744) ([belomaxorka](https://github.com/belomaxorka)) -- Moved $bb_cfg['show_board_start_date'] to admin panel [\#745](https://github.com/torrentpier/torrentpier/pull/745) ([belomaxorka](https://github.com/belomaxorka)) -- Added sup & sub tags in BBCode [\#746](https://github.com/torrentpier/torrentpier/pull/746) ([belomaxorka](https://github.com/belomaxorka)) -- Unified checkForm() JS [\#747](https://github.com/torrentpier/torrentpier/pull/747) ([belomaxorka](https://github.com/belomaxorka)) -- [TEMP] Removed Http class [\#748](https://github.com/torrentpier/torrentpier/pull/748) ([belomaxorka](https://github.com/belomaxorka)) -- Added reset button in posting editor [\#749](https://github.com/torrentpier/torrentpier/pull/749) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: Automatic conversion of false to array is deprecated [\#750](https://github.com/torrentpier/torrentpier/pull/750) ([belomaxorka](https://github.com/belomaxorka)) -- Reformated JS [\#753](https://github.com/torrentpier/torrentpier/pull/753), [\#754](https://github.com/torrentpier/torrentpier/pull/754) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#700](https://github.com/torrentpier/torrentpier/pull/700) ([Exileum](https://github.com/Exileum)) -- Minor improvements [\#732](https://github.com/torrentpier/torrentpier/pull/732), [\#735](https://github.com/torrentpier/torrentpier/pull/735), [\#741](https://github.com/torrentpier/torrentpier/pull/741), [\#742](https://github.com/torrentpier/torrentpier/pull/742), [\#751](https://github.com/torrentpier/torrentpier/pull/751), [\#752](https://github.com/torrentpier/torrentpier/pull/752), [\#755](https://github.com/torrentpier/torrentpier/pull/755), [\#756](https://github.com/torrentpier/torrentpier/pull/756), [\#757](https://github.com/torrentpier/torrentpier/pull/757), [\#761](https://github.com/torrentpier/torrentpier/pull/761) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#733](https://github.com/torrentpier/torrentpier/pull/733), [\#758](https://github.com/torrentpier/torrentpier/pull/758) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-alpha2](https://github.com/torrentpier/torrentpier/tree/v2.4.0-alpha2) (2023-05-28) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0-alpha1...v2.4.0-alpha2) - -**Merged pull requests:** - -- Show cut button in debug panel only if sql_log [\#696](https://github.com/torrentpier/torrentpier/pull/696) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed input types in some cases [\#697](https://github.com/torrentpier/torrentpier/pull/697) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored is_gold & gender_image functions [\#698](https://github.com/torrentpier/torrentpier/pull/698) ([belomaxorka](https://github.com/belomaxorka)) -- Added translations for debug panel [\#699](https://github.com/torrentpier/torrentpier/pull/699) ([belomaxorka](https://github.com/belomaxorka)) -- Use native __DIR__ for BB_PATH [\#702](https://github.com/torrentpier/torrentpier/pull/702) ([belomaxorka](https://github.com/belomaxorka)) -- Removed APP_NAME variable [\#708](https://github.com/torrentpier/torrentpier/pull/708) ([belomaxorka](https://github.com/belomaxorka)) -- Removed unused globals [\#709](https://github.com/torrentpier/torrentpier/pull/709) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed issue with DB_PORT not applying [\#710](https://github.com/torrentpier/torrentpier/pull/710) ([belomaxorka](https://github.com/belomaxorka)) -- Simplified IPHelper [\#712](https://github.com/torrentpier/torrentpier/pull/712) ([belomaxorka](https://github.com/belomaxorka)) -- Changed syntax for constants definition [\#714](https://github.com/torrentpier/torrentpier/pull/714) ([belomaxorka](https://github.com/belomaxorka)) -- Improvements for SEO [\#718](https://github.com/torrentpier/torrentpier/pull/718) ([belomaxorka](https://github.com/belomaxorka)) -- Added password required symbols check [\#713](https://github.com/torrentpier/torrentpier/pull/713) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: htmlspecialchars(): Passing null to parameter [\#719](https://github.com/torrentpier/torrentpier/pull/719) ([belomaxorka](https://github.com/belomaxorka)) -- Added 'samesite' option for setcookie() [\#720](https://github.com/torrentpier/torrentpier/pull/720) ([belomaxorka](https://github.com/belomaxorka)) -- Removed deprecated type="text/css" [\#721](https://github.com/torrentpier/torrentpier/pull/721) ([belomaxorka](https://github.com/belomaxorka)) -- Added some new meta tags [\#722](https://github.com/torrentpier/torrentpier/pull/722) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed: Required parameter $mode follows optional parameter $submit [\#724](https://github.com/torrentpier/torrentpier/pull/724) ([belomaxorka](https://github.com/belomaxorka)) -- Added show board start date on index page [\#725](https://github.com/torrentpier/torrentpier/pull/725) ([belomaxorka](https://github.com/belomaxorka)) -- Use define instead of tpl variable [\#726](https://github.com/torrentpier/torrentpier/pull/726) ([belomaxorka](https://github.com/belomaxorka)) -- Updated deps [\#704](https://github.com/torrentpier/torrentpier/pull/704), [\#705](https://github.com/torrentpier/torrentpier/pull/705) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements in admin templates [\#706](https://github.com/torrentpier/torrentpier/pull/706) ([belomaxorka](https://github.com/belomaxorka)) -- Minor improvements [\#707](https://github.com/torrentpier/torrentpier/pull/707), [\#711](https://github.com/torrentpier/torrentpier/pull/711), [\#715](https://github.com/torrentpier/torrentpier/pull/715), [\#716](https://github.com/torrentpier/torrentpier/pull/716), [\#717](https://github.com/torrentpier/torrentpier/pull/717), [\#723](https://github.com/torrentpier/torrentpier/pull/723) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.4.0-alpha1](https://github.com/torrentpier/torrentpier/tree/v2.4.0-alpha1) (2023-05-20) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.1...v2.4.0-alpha1) - -**Merged pull requests:** - -- Added ability to select email type in mass email [\#624](https://github.com/torrentpier/torrentpier/pull/624) ([belomaxorka](https://github.com/belomaxorka)) -- Added password method in validator [\#625](https://github.com/torrentpier/torrentpier/pull/625) ([belomaxorka](https://github.com/belomaxorka)) -- Show default avatar after delete, instead of hide [\#628](https://github.com/torrentpier/torrentpier/pull/628) ([belomaxorka](https://github.com/belomaxorka)) -- Switching to Symfony Mailer [\#629](https://github.com/torrentpier/torrentpier/pull/629) ([Exileum](https://github.com/Exileum)) -- Added missing comments into Env class [\#633](https://github.com/torrentpier/torrentpier/pull/633) ([belomaxorka](https://github.com/belomaxorka)) -- Apply fixes from StyleCI [\#634](https://github.com/torrentpier/torrentpier/pull/634), [\#635](https://github.com/torrentpier/torrentpier/pull/635) ([Exileum](https://github.com/Exileum)) -- Added missing comments Emailer [\#637](https://github.com/torrentpier/torrentpier/pull/637) ([belomaxorka](https://github.com/belomaxorka)) -- Various fixes after composer deps update [\#638](https://github.com/torrentpier/torrentpier/pull/638) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed undefined value() functions [\#640](https://github.com/torrentpier/torrentpier/pull/640) ([belomaxorka](https://github.com/belomaxorka)) -- Added IPHelper implementation [\#631](https://github.com/torrentpier/torrentpier/pull/631) ([belomaxorka](https://github.com/belomaxorka)) -- Fixing the .env load [\#643](https://github.com/torrentpier/torrentpier/pull/643) ([Exileum](https://github.com/Exileum)) -- Added Http class implementation [\#632](https://github.com/torrentpier/torrentpier/pull/632) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored Validate class [\#646](https://github.com/torrentpier/torrentpier/pull/646) ([belomaxorka](https://github.com/belomaxorka)) -- Added system check requirements and more [\#645](https://github.com/torrentpier/torrentpier/pull/645) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless email empty check in register.php [\#647](https://github.com/torrentpier/torrentpier/pull/647) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored Sitemap class [\#648](https://github.com/torrentpier/torrentpier/pull/648) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored Dev class [\#649](https://github.com/torrentpier/torrentpier/pull/649) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored Ajax class [\#650](https://github.com/torrentpier/torrentpier/pull/650) ([belomaxorka](https://github.com/belomaxorka)) -- Added SQLite3 installed check [Cache/Datastore] [\#652](https://github.com/torrentpier/torrentpier/pull/652) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing default statement in switch case [\#653](https://github.com/torrentpier/torrentpier/pull/653) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored Sessions class [\#656](https://github.com/torrentpier/torrentpier/pull/656) ([belomaxorka](https://github.com/belomaxorka)) -- Refactored CronHelper class [\#657](https://github.com/torrentpier/torrentpier/pull/657) ([belomaxorka](https://github.com/belomaxorka)) -- Minor edits to the localization [\#655](https://github.com/torrentpier/torrentpier/pull/655) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken pin first post [\#660](https://github.com/torrentpier/torrentpier/pull/660) ([belomaxorka](https://github.com/belomaxorka)) -- Reworked info.php [\#664](https://github.com/torrentpier/torrentpier/pull/664) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless copy actions [\#661](https://github.com/torrentpier/torrentpier/pull/661) ([belomaxorka](https://github.com/belomaxorka)) -- New implementation of IPHelper [\#665](https://github.com/torrentpier/torrentpier/pull/665) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken flood control [\#666](https://github.com/torrentpier/torrentpier/pull/666) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed empty $auth_key after gen passkey [\#670](https://github.com/torrentpier/torrentpier/pull/670) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken predicting birthday year [\#668](https://github.com/torrentpier/torrentpier/pull/668) ([belomaxorka](https://github.com/belomaxorka)) -- Prevent issue with broken deleting posts [\#673](https://github.com/torrentpier/torrentpier/pull/673) ([belomaxorka](https://github.com/belomaxorka)) -- Removed isAJAX check [So buggy] [\#675](https://github.com/torrentpier/torrentpier/pull/675) ([belomaxorka](https://github.com/belomaxorka)) -- Show correct info about password requirements [\#676](https://github.com/torrentpier/torrentpier/pull/676) ([belomaxorka](https://github.com/belomaxorka)) -- Updated sidebar links [\#678](https://github.com/torrentpier/torrentpier/pull/678) ([belomaxorka](https://github.com/belomaxorka)) -- Added theme exists check [\#679](https://github.com/torrentpier/torrentpier/pull/679) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken get gethostbyaddr [\#681](https://github.com/torrentpier/torrentpier/pull/681) ([belomaxorka](https://github.com/belomaxorka)) -- Cumulative update β˜• [\#685](https://github.com/torrentpier/torrentpier/pull/685) ([belomaxorka](https://github.com/belomaxorka)) -- Remove unused use statement [\#687](https://github.com/torrentpier/torrentpier/pull/687) ([belomaxorka](https://github.com/belomaxorka)) -- Prevent issue with empty $disallowed_id removing [\#692](https://github.com/torrentpier/torrentpier/pull/692) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed input types in some cases [\#693](https://github.com/torrentpier/torrentpier/pull/693) ([belomaxorka](https://github.com/belomaxorka)) -- [TEMP] Prevent issue with undefined lang variable [\#694](https://github.com/torrentpier/torrentpier/pull/694) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#626](https://github.com/torrentpier/torrentpier/pull/626), [\#695](https://github.com/torrentpier/torrentpier/pull/695) ([Exileum](https://github.com/Exileum)) -- Minor adjustments [\#644](https://github.com/torrentpier/torrentpier/pull/644) ([belomaxorka](https://github.com/belomaxorka)) -- Minor fixes [\#654](https://github.com/torrentpier/torrentpier/pull/654), [\#659](https://github.com/torrentpier/torrentpier/pull/659), [\#662](https://github.com/torrentpier/torrentpier/pull/662), [\#663](https://github.com/torrentpier/torrentpier/pull/663), [\#667](https://github.com/torrentpier/torrentpier/pull/667), [\#670](https://github.com/torrentpier/torrentpier/pull/670), [\#674](https://github.com/torrentpier/torrentpier/pull/674), [\#682](https://github.com/torrentpier/torrentpier/pull/682), [\#686](https://github.com/torrentpier/torrentpier/pull/686) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.1](https://github.com/torrentpier/torrentpier/tree/v2.3.1) (2023-03-18) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.1-rc1...v2.3.1) - -**Merged pull requests:** - -- Make activate key length configurable [\#590](https://github.com/torrentpier/torrentpier/pull/590) ([belomaxorka](https://github.com/belomaxorka)) -- Minor adjustments [\#593](https://github.com/torrentpier/torrentpier/pull/593), [\#607](https://github.com/torrentpier/torrentpier/pull/607), [\#610](https://github.com/torrentpier/torrentpier/pull/610) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed typo in src/Cache/File.php [\#596](https://github.com/torrentpier/torrentpier/pull/596) ([belomaxorka](https://github.com/belomaxorka)) -- Use APP_NAME instead lang variables [\#604](https://github.com/torrentpier/torrentpier/pull/604) ([belomaxorka](https://github.com/belomaxorka)) -- New Crowdin updates [\#577](https://github.com/torrentpier/torrentpier/pull/577), [\#605](https://github.com/torrentpier/torrentpier/pull/605), [\#616](https://github.com/torrentpier/torrentpier/pull/616) ([Exileum](https://github.com/Exileum)) -- Use translations instead of untranslatable strings [\#606](https://github.com/torrentpier/torrentpier/pull/606) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed undefined $subject in register.php [\#608](https://github.com/torrentpier/torrentpier/pull/608) ([belomaxorka](https://github.com/belomaxorka)) -- Removed length limits for search_id & autologin_id [\#609](https://github.com/torrentpier/torrentpier/pull/609) ([belomaxorka](https://github.com/belomaxorka)) -- Small refactoring for avatar.php [AJAX] [\#611](https://github.com/torrentpier/torrentpier/pull/611), [\#612](https://github.com/torrentpier/torrentpier/pull/612) ([belomaxorka](https://github.com/belomaxorka)) -- Added PM counter in title [\#613](https://github.com/torrentpier/torrentpier/pull/613) ([belomaxorka](https://github.com/belomaxorka)) -- Redesigned AJAX system styles [\#614](https://github.com/torrentpier/torrentpier/pull/614) ([belomaxorka](https://github.com/belomaxorka), [Exileum](https://github.com/Exileum)) -- Minor edits to the localization [\#615](https://github.com/torrentpier/torrentpier/pull/615) ([Exileum](https://github.com/Exileum)) -- New cron initialization and minor edits [\#619](https://github.com/torrentpier/torrentpier/pull/619) ([Exileum](https://github.com/Exileum)) -- Fixed broken avatar ajax action for users [\#618](https://github.com/torrentpier/torrentpier/pull/618) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to hide ajax loading alert [\#617](https://github.com/torrentpier/torrentpier/pull/617) ([belomaxorka](https://github.com/belomaxorka)) -- Added passkey check in get_bt_userdata [\#621](https://github.com/torrentpier/torrentpier/pull/621) ([belomaxorka](https://github.com/belomaxorka)) -- Miscellaneous static analysis improvements for php 7.1 [\#620](https://github.com/torrentpier/torrentpier/pull/620) ([Exileum](https://github.com/Exileum)) -- Fixed getting online info from cache [\#622](https://github.com/torrentpier/torrentpier/pull/622) ([belomaxorka](https://github.com/belomaxorka), [Exileum](https://github.com/Exileum)) -- Globally improved log system [\#623](https://github.com/torrentpier/torrentpier/pull/623) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.1-rc1](https://github.com/torrentpier/torrentpier/tree/v2.3.1-rc1) (2023-03-10) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.4-beta2...v2.3.1-rc1) - -**Merged pull requests:** - -- Minor adjustments in sql dumps [\#560](https://github.com/torrentpier/torrentpier/pull/560), [\#561](https://github.com/torrentpier/torrentpier/pull/561) ([belomaxorka](https://github.com/belomaxorka)) -- New BB_PATH implementation [\#562](https://github.com/torrentpier/torrentpier/pull/562) ([belomaxorka](https://github.com/belomaxorka)) -- Use constants instead of string literals [\#563](https://github.com/torrentpier/torrentpier/pull/563), [\#573](https://github.com/torrentpier/torrentpier/pull/573) ([belomaxorka](https://github.com/belomaxorka)) -- Hide feed button if feed file doesn't exist [\#564](https://github.com/torrentpier/torrentpier/pull/564) ([belomaxorka](https://github.com/belomaxorka)) -- Added some new fonts in bbcode editor [\#565](https://github.com/torrentpier/torrentpier/pull/565) ([belomaxorka](https://github.com/belomaxorka)) -- Added some new font sizes in bbcode editor [\#566](https://github.com/torrentpier/torrentpier/pull/566) ([belomaxorka](https://github.com/belomaxorka)) -- Added optional parameter in $valid_actions [AJAX] [\#567](https://github.com/torrentpier/torrentpier/pull/567) ([belomaxorka](https://github.com/belomaxorka)) -- Check if request is ajax [\#569](https://github.com/torrentpier/torrentpier/pull/569) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed code-style in some files [\#570](https://github.com/torrentpier/torrentpier/pull/570) ([belomaxorka](https://github.com/belomaxorka)) -- Minor adjustments [\#571](https://github.com/torrentpier/torrentpier/pull/571), [\#584](https://github.com/torrentpier/torrentpier/pull/584) ([belomaxorka](https://github.com/belomaxorka)) -- Added link to forum in admin_forumauth.tpl [\#574](https://github.com/torrentpier/torrentpier/pull/574) ([belomaxorka](https://github.com/belomaxorka)) -- Simplified make_rand_str function [\#575](https://github.com/torrentpier/torrentpier/pull/575) ([belomaxorka](https://github.com/belomaxorka)) -- Redesigned admin_ug_auth [\#576](https://github.com/torrentpier/torrentpier/pull/576) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken "user_viewonline" in admin panel [\#579](https://github.com/torrentpier/torrentpier/pull/579) ([belomaxorka](https://github.com/belomaxorka)) -- Make sitemap sending configurable [\#585](https://github.com/torrentpier/torrentpier/pull/585) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed get_avatar method [\#586](https://github.com/torrentpier/torrentpier/pull/586) ([belomaxorka](https://github.com/belomaxorka)) -- Added show avatar in memberlist [\#587](https://github.com/torrentpier/torrentpier/pull/587) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.0.4-beta2](https://github.com/torrentpier/torrentpier/tree/v2.3.0.4-beta2) (2023-03-04) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.4-beta...v2.3.0.4-beta2) - -**Merged pull requests:** - -- Updated treeview up to 1.4.2 [\#549](https://github.com/torrentpier/torrentpier/pull/549) ([belomaxorka](https://github.com/belomaxorka)) -- Removed ugly copyright in indexer [\#546](https://github.com/torrentpier/torrentpier/pull/546) ([belomaxorka](https://github.com/belomaxorka)) -- Added ability to print page [\#544](https://github.com/torrentpier/torrentpier/pull/544) ([belomaxorka](https://github.com/belomaxorka)) -- Removed deprecated SQL_CACHE [\#554](https://github.com/torrentpier/torrentpier/pull/554) ([belomaxorka](https://github.com/belomaxorka)) -- Added min required mysql / mariadb version [\#555](https://github.com/torrentpier/torrentpier/pull/555) ([belomaxorka](https://github.com/belomaxorka)) -- Added needed "ORDER BY" in sql query [\#557](https://github.com/torrentpier/torrentpier/pull/557) ([belomaxorka](https://github.com/belomaxorka)) -- Added missing sql query in changes.txt [\#558](https://github.com/torrentpier/torrentpier/pull/558) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.0.4-beta](https://github.com/torrentpier/torrentpier/tree/v2.3.0.4-beta) (2023-02-22) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.3...v2.3.0.4-beta) - -**Merged pull requests:** - -- docs: change official forum path [\#532](https://github.com/torrentpier/torrentpier/pull/532) ([Exileum](https://github.com/Exileum)) -- Fixed broken sql log selecting in debug-panel [\#533](https://github.com/torrentpier/torrentpier/pull/533) ([belomaxorka](https://github.com/belomaxorka)) -- New implementation of old browser detector [\#534](https://github.com/torrentpier/torrentpier/pull/534) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed SQLite caching issue [\#535](https://github.com/torrentpier/torrentpier/pull/535) ([belomaxorka](https://github.com/belomaxorka)) -- Extended email validation [\#536](https://github.com/torrentpier/torrentpier/pull/536) ([belomaxorka](https://github.com/belomaxorka)) -- Admin panel adjustments [\#538](https://github.com/torrentpier/torrentpier/pull/538) ([belomaxorka](https://github.com/belomaxorka)) -- Added user birthday icon in profile [\#539](https://github.com/torrentpier/torrentpier/pull/539) ([belomaxorka](https://github.com/belomaxorka)) -- Added forum description in viewforum page [\#540](https://github.com/torrentpier/torrentpier/pull/540) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken copy log from debug-panel [\#541](https://github.com/torrentpier/torrentpier/pull/541) ([belomaxorka](https://github.com/belomaxorka)) -- Added copy button in viewforum page [\#542](https://github.com/torrentpier/torrentpier/pull/542) ([belomaxorka](https://github.com/belomaxorka)) -- Added current topic url copy button in viewtopic [\#543](https://github.com/torrentpier/torrentpier/pull/543) ([belomaxorka](https://github.com/belomaxorka)) -- Added ``$bb_cfg['emailer']['enabled']`` check in admin_mass_email.php [\#545](https://github.com/torrentpier/torrentpier/pull/545) ([belomaxorka](https://github.com/belomaxorka)) -- Updated scrollTo up to 1.4.6 [\#547](https://github.com/torrentpier/torrentpier/pull/547) ([belomaxorka](https://github.com/belomaxorka)) -- Updated quicksearch up to Feb 21, 2018 commit [\#548](https://github.com/torrentpier/torrentpier/pull/548) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.0.3](https://github.com/torrentpier/torrentpier/tree/v2.3.0.3) (2023-02-18) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.2...v2.3.0.3) - -**Merged pull requests:** - -- Updated copyright year [\#525](https://github.com/torrentpier/torrentpier/pull/525) ([belomaxorka](https://github.com/belomaxorka)) -- Update README.md (Fixed incorrect logo path) [\#526](https://github.com/torrentpier/torrentpier/pull/526) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken getting avatars directory size [\#527](https://github.com/torrentpier/torrentpier/pull/527) ([belomaxorka](https://github.com/belomaxorka)) -- Added declensions for count of downloads [\#528](https://github.com/torrentpier/torrentpier/pull/528) ([belomaxorka](https://github.com/belomaxorka)) -- Use XS_TPL_PREFIX instead of 'tpl_' [\#529](https://github.com/torrentpier/torrentpier/pull/529) ([belomaxorka](https://github.com/belomaxorka)) -- Removed useless .htaccess files [\#530](https://github.com/torrentpier/torrentpier/pull/530) ([belomaxorka](https://github.com/belomaxorka)) -- Replaced "deny from all" with "Require all denied" [\#531](https://github.com/torrentpier/torrentpier/pull/531) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.0.2](https://github.com/torrentpier/torrentpier/tree/v2.3.0.2) (2023-01-23) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0.1...v2.3.0.2) - -**Merged pull requests:** - -- Fixed PHP 7.3: Deprecate FILTER_FLAG_SCHEME_REQUIRED and FILTER_FLAG_HOST_REQUIRED flags used with FILTER_VALIDATE_URL [\#507](https://github.com/torrentpier/torrentpier/pull/507) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken user search in admin_groups [\#508](https://github.com/torrentpier/torrentpier/pull/508) ([belomaxorka](https://github.com/belomaxorka)) -- Fix some bugs with MySQL strict mode [\#509](https://github.com/torrentpier/torrentpier/pull/509) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed and improvements for SQL [\#510](https://github.com/torrentpier/torrentpier/pull/510) ([belomaxorka](https://github.com/belomaxorka)) -- Added showing post number in viewtopic [\#511](https://github.com/torrentpier/torrentpier/pull/511) ([belomaxorka](https://github.com/belomaxorka)) -- Updated composer dependencies [\#512](https://github.com/torrentpier/torrentpier/pull/512) ([belomaxorka](https://github.com/belomaxorka)) -- Added symfony/polyfill [\#513](https://github.com/torrentpier/torrentpier/pull/513) ([belomaxorka](https://github.com/belomaxorka)) -- Updated jQuery up to 1.12.4 [\#514](https://github.com/torrentpier/torrentpier/pull/514) ([belomaxorka](https://github.com/belomaxorka)) -- Updated normalize css up to 8.0.1 [\#515](https://github.com/torrentpier/torrentpier/pull/515) ([belomaxorka](https://github.com/belomaxorka)) -- Misc code improvements [\#516](https://github.com/torrentpier/torrentpier/pull/516) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed broken file_write() function [\#517](https://github.com/torrentpier/torrentpier/pull/517) ([belomaxorka](https://github.com/belomaxorka)) -- Fixed array multi sorting [\#518](https://github.com/torrentpier/torrentpier/pull/518) ([belomaxorka](https://github.com/belomaxorka)) - -## [v2.3.0.1](https://github.com/torrentpier/torrentpier/tree/v2.3.0.1) (2018-06-27) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.3.0...v2.3.0.1) - -**Merged pull requests:** - -- Fix cron jobs fail without global config variable [\#471](https://github.com/torrentpier/torrentpier/pull/471) ([Exileum](https://github.com/Exileum)) -- Cleanup BBCode class [\#470](https://github.com/torrentpier/torrentpier/pull/470) ([Exileum](https://github.com/Exileum)) - -## [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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.2...v2.2.3) - -**Merged pull requests:** - -- Release 2.2.3 πŸ”₯ [\#443](https://github.com/torrentpier/torrentpier/pull/443) ([Exileum](https://github.com/Exileum)) -- Release preparation. Crowdin language pack update [\#442](https://github.com/torrentpier/torrentpier/pull/442) ([Exileum](https://github.com/Exileum)) -- Unique topic page title, undefined language variables fix [\#441](https://github.com/torrentpier/torrentpier/pull/441) ([Exileum](https://github.com/Exileum)) -- Remove matching users with default IP from profile list [\#440](https://github.com/torrentpier/torrentpier/pull/440) ([Exileum](https://github.com/Exileum)) -- Broken announcer fix, announcer debug removed [\#439](https://github.com/torrentpier/torrentpier/pull/439) ([Exileum](https://github.com/Exileum)) -- Fix broken ajax [\#436](https://github.com/torrentpier/torrentpier/pull/436) ([Exileum](https://github.com/Exileum)) -- Some deprecations, normalize.css, torrent file content sort fix [\#434](https://github.com/torrentpier/torrentpier/pull/434) ([Exileum](https://github.com/Exileum)) -- Incorrect log file rotation regex [\#432](https://github.com/torrentpier/torrentpier/pull/432) ([Exileum](https://github.com/Exileum)) -- Various bug fixes described on the forum [\#431](https://github.com/torrentpier/torrentpier/pull/431) ([Exileum](https://github.com/Exileum)) -- Fixes \#412 - bug with dynamic language variables [\#430](https://github.com/torrentpier/torrentpier/pull/430) ([Exileum](https://github.com/Exileum)) -- Update .htaccess for new Apache 2.4 syntax [\#429](https://github.com/torrentpier/torrentpier/pull/429) ([Exileum](https://github.com/Exileum)) -- Crowdin language pack update for new project domain name [\#415](https://github.com/torrentpier/torrentpier/pull/415) ([Exileum](https://github.com/Exileum)) -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.2.1...v2.2.2) - -**Merged pull requests:** - -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) - -## [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) - -**Merged pull requests:** - -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.5...v2.2.0) - -**Merged pull requests:** - -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([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)) -- 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)) -- 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)) -- 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)) -- 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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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)) -- 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)) -- \#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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([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)) -- 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)) -- 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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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)) -- 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) ([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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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) ([Exileum](https://github.com/Exileum)) -- 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)) -- 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)) -- 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)) -- 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) ([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)) -- 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) ([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)) -- 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)) -- \#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)) -- 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) ([Exileum](https://github.com/Exileum)) - -## [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) - -**Merged pull requests:** - -- 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)) -- 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) ([Exileum](https://github.com/Exileum)) - -## [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) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.2...v2.1.3) - -**Merged pull requests:** - -- ВСрсия 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.1...v2.1.2) - -**Merged pull requests:** - -- ВСрсия 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.1.0...v2.1.1) - -**Merged pull requests:** - -- ВСрсия 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599b...v2.1.0) - -**Merged pull requests:** - -- ВСрсия 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.599...v2.0.599b) - -**Merged pull requests:** - -- Develop [\#31](https://github.com/torrentpier/torrentpier/pull/31) ([Exileum](https://github.com/Exileum)) -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.598...v2.0.599) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.597...v2.0.598) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.596...v2.0.597) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.595...v2.0.596) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594b...v2.0.595) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.594...v2.0.594b) - -**Merged pull requests:** - -- Develop [\#17](https://github.com/torrentpier/torrentpier/pull/17) ([Exileum](https://github.com/Exileum)) -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593b...v2.0.594) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.593...v2.0.593b) - -## [v2.0.593](https://github.com/torrentpier/torrentpier/tree/v2.0.593) (2014-08-05) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.592...v2.0.593) - -**Merged pull requests:** - -- 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) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.591...v2.0.592) - -## [v2.0.591](https://github.com/torrentpier/torrentpier/tree/v2.0.591) (2014-07-13) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.590...v2.0.591) - -## [v2.0.590](https://github.com/torrentpier/torrentpier/tree/v2.0.590) (2014-06-21) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.589...v2.0.590) - -## [v2.0.589](https://github.com/torrentpier/torrentpier/tree/v2.0.589) (2014-06-19) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.588...v2.0.589) - -## [v2.0.588](https://github.com/torrentpier/torrentpier/tree/v2.0.588) (2014-06-17) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.587...v2.0.588) - -## [v2.0.587](https://github.com/torrentpier/torrentpier/tree/v2.0.587) (2014-06-15) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.586...v2.0.587) - -## [v2.0.586](https://github.com/torrentpier/torrentpier/tree/v2.0.586) (2014-06-13) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.585...v2.0.586) - -## [v2.0.585](https://github.com/torrentpier/torrentpier/tree/v2.0.585) (2014-05-14) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.584...v2.0.585) - -## [v2.0.584](https://github.com/torrentpier/torrentpier/tree/v2.0.584) (2014-03-07) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.583...v2.0.584) - -## [v2.0.583](https://github.com/torrentpier/torrentpier/tree/v2.0.583) (2014-02-10) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.581...v2.0.583) - -## [v2.0.581](https://github.com/torrentpier/torrentpier/tree/v2.0.581) (2014-02-03) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.572...v2.0.581) - -## [v2.0.572](https://github.com/torrentpier/torrentpier/tree/v2.0.572) (2014-01-28) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.564...v2.0.572) - -## [v2.0.564](https://github.com/torrentpier/torrentpier/tree/v2.0.564) (2014-01-20) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.560...v2.0.564) - -## [v2.0.560](https://github.com/torrentpier/torrentpier/tree/v2.0.560) (2014-01-17) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.556...v2.0.560) - -## [v2.0.556](https://github.com/torrentpier/torrentpier/tree/v2.0.556) (2014-01-12) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.552...v2.0.556) - -## [v2.0.552](https://github.com/torrentpier/torrentpier/tree/v2.0.552) (2013-09-05) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.506...v2.0.552) - -## [v2.0.506](https://github.com/torrentpier/torrentpier/tree/v2.0.506) (2013-06-23) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.500...v2.0.506) - -## [v2.0.500](https://github.com/torrentpier/torrentpier/tree/v2.0.500) (2013-05-14) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.491...v2.0.500) - -## [v2.0.491](https://github.com/torrentpier/torrentpier/tree/v2.0.491) (2013-01-12) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.477...v2.0.491) - -## [v2.0.477](https://github.com/torrentpier/torrentpier/tree/v2.0.477) (2012-11-14) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.463...v2.0.477) - -## [v2.0.463](https://github.com/torrentpier/torrentpier/tree/v2.0.463) (2012-10-16) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.456...v2.0.463) - -## [v2.0.456](https://github.com/torrentpier/torrentpier/tree/v2.0.456) (2012-09-07) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.400...v2.0.456) - -## [v2.0.400](https://github.com/torrentpier/torrentpier/tree/v2.0.400) (2012-04-13) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.300...v2.0.400) - -## [v2.0.300](https://github.com/torrentpier/torrentpier/tree/v2.0.300) (2011-10-14) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.261...v2.0.300) - -## [v2.0.261](https://github.com/torrentpier/torrentpier/tree/v2.0.261) (2011-08-28) -[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.0.0...v2.0.261) - -## [v2.0.0](https://github.com/torrentpier/torrentpier/tree/v2.0.0) (2011-08-08) - - -\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* diff --git a/README.md b/README.md index 8397b363b..1f58ebfb9 100644 --- a/README.md +++ b/README.md @@ -19,15 +19,15 @@ ## πŸ‚ About TorrentPier -TorrentPier β€” bull-powered BitTorrent Public/Private tracker engine, written in PHP. High speed, simple modifications, load-balanced -architecture. In addition, we have a very helpful +TorrentPier β€” bull-powered BitTorrent Public/Private tracker engine, written in PHP. High speed, simple modifications, load-balanced +architecture. In addition, we have a very helpful [official support forum](https://torrentpier.com), where it's possible to get support and download modifications for the engine. ## 🌈 Current status -TorrentPier is currently in active development. The goal is to remove all legacy code and rewrite the existing code to -modern specifications. If you want delve deep into the code, check our [issues](https://github.com/torrentpier/torrentpier/issues) -and go from there. The documentation will be translated to english in the near future, currently russian is the main language of it. +TorrentPier is currently in active development. The goal is to remove all legacy code and rewrite the existing code to +modern specifications. If you want to delve deep into the code, check our [issues](https://github.com/torrentpier/torrentpier/issues) +and go from there. The documentation will be translated to English in the near future, currently Russian is the main language. ## ✨ Features * Rich forum with browsing/moderation tools @@ -40,7 +40,7 @@ and go from there. The documentation will be translated to english in the near f * Bonus points * Polling system * PM/DM system -* Multilingual support (Russian and English is currently fully supported, with others in the future) +* Multilingual support (Russian and English are currently fully supported, with others in the future) * Atom/RSS feeds * ... and so MUCH MORE! @@ -56,7 +56,7 @@ and go from there. The documentation will be translated to english in the near f ## πŸ”§ Requirements * Apache / nginx ([example config](install/nginx.conf)) / caddy ([example config](install/Caddyfile)) -* MySQL 5.5.3 or above / MariaDB 10.0 or above / Percona +* MySQL 5.5.3 or above (including MySQL 8.0+) / MariaDB 10.0 or above / Percona * PHP: 8.1 / 8.2 / 8.3 / 8.4 * PHP Extensions: mbstring, gd, bcmath, intl, tidy (optional), xml, xmlwriter * Crontab (Recommended) @@ -100,14 +100,20 @@ Check out our [autoinstall](https://github.com/torrentpier/autoinstall) reposito ```shell composer install ``` -5. Create a database and import the dump located at `install/sql/mysql.sql` -6. Edit database configuration settings in the environment (`.env.example`), after, rename to `.env` +5. Edit database configuration settings in the environment (`.env.example`), after, rename to `.env` +6. Create a database and run migrations to set up the schema + ```shell + php vendor/bin/phinx migrate --configuration=phinx.php + ``` 7. Provide write permissions to the specified folders: * `data/avatars`, `data/uploads`, `data/uploads/thumbs` * `internal_data/atom`, `internal_data/cache`, `internal_data/log`, `internal_data/triggers` * `sitemap` 8. Voila! ✨ +> [!TIP] +> You can automate steps 4-7 by running `php install.php` instead, which will guide you through the setup process interactively. + > [!IMPORTANT] > The specific settings depend on the server you are using, but in general we recommend chmod **0755** for folders, and chmod **0644** for the files in them. @@ -124,13 +130,13 @@ If you discover a security vulnerability within TorrentPier, please follow our [ ## πŸ“Œ Our recommendations -* *It's recommended to run `cron.php`.* - For significant tracker speed increase it ay be required to replace the built-in cron.php in operating system daemon. +* *It's recommended to run `cron.php`.* - For significant tracker speed increase it may be required to replace the built-in cron.php with an operating system daemon. * *Local configuration copy.* - You can override the settings using the local configuration file `library/config.local.php`. ## πŸ’š Contributing / Contributors -Please read our [contributing policy](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) for details, and the process for -submitting pull requests to us. But we are always ready to renew your pull-request for compliance with +Please read our [contributing policy](CONTRIBUTING.md) and [code of conduct](CODE_OF_CONDUCT.md) for details, and the process for +submitting pull requests to us. But we are always ready to review your pull-request for compliance with these requirements. Just send it! @@ -141,7 +147,7 @@ Made with [contrib.rocks](https://contrib.rocks). ## πŸ’ž Sponsoring -Support this project by becoming a sponsor or a backer. +Support this project by becoming a sponsor or a backer. [![OpenCollective sponsors](https://opencollective.com/torrentpier/sponsors/badge.svg)](https://opencollective.com/torrentpier) [![OpenCollective backers](https://opencollective.com/torrentpier/backers/badge.svg)](https://opencollective.com/torrentpier) @@ -164,7 +170,7 @@ Support this project by becoming a sponsor or a backer. ## πŸ“¦ Versioning -We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/torrentpier/torrentpier/tags). +We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/torrentpier/torrentpier/tags). ## πŸ“– License diff --git a/UPGRADE_GUIDE.md b/UPGRADE_GUIDE.md index 40d7baf62..7faaaf72e 100644 --- a/UPGRADE_GUIDE.md +++ b/UPGRADE_GUIDE.md @@ -4,6 +4,7 @@ This guide helps you upgrade your TorrentPier installation to the latest version ## πŸ“– Table of Contents +- [Database Migration System](#database-migration-system) - [Database Layer Migration](#database-layer-migration) - [Unified Cache System Migration](#unified-cache-system-migration) - [Configuration System Migration](#configuration-system-migration) @@ -14,6 +15,357 @@ This guide helps you upgrade your TorrentPier installation to the latest version - [Breaking Changes](#breaking-changes) - [Best Practices](#best-practices) +## πŸ—„οΈ Database Migration System + +TorrentPier now includes a modern database migration system using **Phinx** (from CakePHP), replacing the legacy direct SQL import approach. This provides version-controlled database schema management with rollback capabilities. + +### Key Benefits + +- **Version Control**: Database schema changes are tracked in code +- **Environment Consistency**: Same database structure across development, staging, and production +- **Safe Rollbacks**: Ability to safely revert schema changes +- **Team Collaboration**: No more merge conflicts on database changes +- **Automated Deployments**: Database updates as part of deployment process + +### Migration Architecture + +#### Engine Strategy +- **InnoDB**: Used for all tables for maximum data integrity and reliability +- **ACID Compliance**: Full transaction support and crash recovery for all data +- **Row-Level Locking**: Better concurrency for high-traffic operations + +#### Directory Structure +``` +/migrations/ + β”œβ”€β”€ 20250619000001_initial_schema.php # Complete database schema + β”œβ”€β”€ 20250619000002_seed_initial_data.php # Essential data seeding + └── future_migrations... # Your custom migrations +/phinx.php # Migration configuration +``` + +### For New Installations + +New installations automatically use migrations instead of the legacy SQL dump: + +```bash +# Fresh installation now uses migrations +php install.php +``` + +The installer will: +1. Set up environment configuration +2. Create the database +3. Run all migrations automatically +4. Seed initial data (admin user, configuration, etc.) + +### For Existing Installations + +Existing installations continue to work without changes. The migration system is designed for new installations and development workflows. + +**Important**: Existing installations should **not** attempt to migrate to the new system without proper backup and testing procedures. + +### Developer Workflow + +#### Creating Migrations +```bash +# Create a new migration +php vendor/bin/phinx create AddNewFeatureTable + +# Edit the generated migration file +# /migrations/YYYYMMDDHHMMSS_add_new_feature_table.php +``` + +#### Running Migrations +```bash +# Run all pending migrations +php vendor/bin/phinx migrate + +# Check migration status +php vendor/bin/phinx status + +# Rollback last migration +php vendor/bin/phinx rollback +``` + +#### Migration Template +```php +table('bb_new_feature', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci' + ]); + + $table->addColumn('name', 'string', ['limit' => 100]) + ->addColumn('created_at', 'timestamp', ['default' => 'CURRENT_TIMESTAMP']) + ->addIndex('name') + ->create(); + } + + // Optional: explicit up/down methods for complex operations + public function up() + { + // Complex data migration logic + } + + public function down() + { + // Rollback logic + } +} +``` + +#### Engine Guidelines +```php +// Use InnoDB for all tables for maximum reliability +$table = $this->table('bb_user_posts', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci' +]); + +// All tracker tables also use InnoDB for data integrity +$table = $this->table('bb_bt_peer_stats', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci' +]); + +// Buffer tables use InnoDB for consistency and reliability +public function up() { + $this->execute('DROP TABLE IF EXISTS buf_temp_data'); + // Recreate with new structure using InnoDB +} +``` + +### Admin Panel Integration + +The admin panel includes a read-only migration status page at `/admin/admin_migrations.php`: + +- **Current migration version** +- **Applied migrations history** +- **Pending migrations list** +- **Database statistics** +- **Clear instructions for CLI operations** + +**Important**: The admin panel is **read-only** for security. All migration operations must be performed via CLI. + +### Complex Migration Handling + +For complex data transformations, create external scripts: + +```php +// migrations/YYYYMMDDHHMMSS_complex_data_migration.php +class ComplexDataMigration extends AbstractMigration +{ + public function up() + { + $this->output->writeln('Running complex data migration...'); + + // Call external script for complex operations + $result = shell_exec('php ' . __DIR__ . '/../scripts/migrate_torrent_data.php'); + $this->output->writeln($result); + + if (strpos($result, 'ERROR') !== false) { + throw new Exception('Complex migration failed'); + } + } +} +``` + +### Best Practices + +#### Migration Development +```bash +# 1. Create migration +php vendor/bin/phinx create MyFeature + +# 2. Edit migration file +# 3. Test locally +php vendor/bin/phinx migrate -e development + +# 4. Test rollback +php vendor/bin/phinx rollback -e development + +# 5. Commit to version control +git add migrations/ +git commit -m "Add MyFeature migration" +``` + +#### Production Deployment +```bash +# Always backup database first +mysqldump tracker_db > backup_$(date +%Y%m%d_%H%M%S).sql + +# Run migrations +php vendor/bin/phinx migrate -e production + +# Verify application functionality +# Monitor error logs +``` + +#### Team Collaboration +- **Never modify existing migrations** that have been deployed +- **Always create new migrations** for schema changes +- **Test migrations on production-like data** before deployment +- **Coordinate with team** before major schema changes + +### Configuration + +The migration system uses your existing `.env` configuration: + +```php +// phinx.php automatically reads from .env +'production' => [ + 'adapter' => 'mysql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => (int) env('DB_PORT', 3306), + 'name' => env('DB_DATABASE'), + 'user' => env('DB_USERNAME'), + 'pass' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci' +] +``` + +### Troubleshooting + +#### Common Issues +```bash +# Migration table doesn't exist +php vendor/bin/phinx init # Re-run if needed + +# Migration fails mid-way +php vendor/bin/phinx rollback # Rollback to previous state + +# Check what would be applied +php vendor/bin/phinx status # See pending migrations +``` + +#### Migration Recovery +```bash +# If migration fails, check status first +php vendor/bin/phinx status + +# Rollback to known good state +php vendor/bin/phinx rollback -t 20250619000002 + +# Fix the migration code and re-run +php vendor/bin/phinx migrate +``` + +### Legacy SQL Import Removal + +The legacy `install/sql/mysql.sql` approach has been replaced by migrations: + +- βœ… **New installations**: Use migrations automatically +- βœ… **Development workflow**: Create migrations for all schema changes +- βœ… **Version control**: All schema changes tracked in Git +- ❌ **Direct SQL imports**: No longer used for new installations + +### Security Considerations + +- **CLI-only execution**: Migrations run via command line only +- **Read-only admin interface**: Web interface shows status only +- **Backup requirements**: Always backup before production migrations +- **Access control**: Restrict migration command access to authorized personnel + +### Migration Setup for Existing Installations + +If you have an **existing TorrentPier installation** and want to adopt the migration system, you need to mark the initial migrations as already applied to avoid recreating your existing database schema. + +#### Detection: Do You Need This? + +You need migration setup if: +- βœ… You have an existing TorrentPier installation with data +- βœ… Your database already has tables like `bb_users`, `bb_forums`, etc. +- βœ… The admin migration panel shows "Migration System: βœ— Not Initialized" + +#### Step-by-Step Setup Process + +**1. Backup Your Database** +```bash +mysqldump -u username -p database_name > backup_$(date +%Y%m%d_%H%M%S).sql +``` + +**2. Initialize Migration Table** +```bash +# This creates the bb_migrations table without running any migrations +php vendor/bin/phinx init +``` + +**3. Mark Initial Migrations as Applied (Fake Run)** +```bash +# Mark the schema migration as applied without running it +php vendor/bin/phinx migrate --fake --target=20250619000001 + +# Mark the data seeding migration as applied without running it +php vendor/bin/phinx migrate --fake --target=20250619000002 +``` + +**4. Verify Setup** +```bash +# Check migration status +php vendor/bin/phinx status +``` + +You should see both initial migrations marked as "up" (applied). + +#### Alternative: Manual SQL Method + +If you prefer manual control, you can directly insert migration records: + +```sql +-- Create migration table (if phinx init didn't work) +CREATE TABLE IF NOT EXISTS bb_migrations ( + version bigint(20) NOT NULL, + migration_name varchar(100) DEFAULT NULL, + start_time timestamp NULL DEFAULT NULL, + end_time timestamp NULL DEFAULT NULL, + breakpoint tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (version) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +-- Mark initial migrations as applied +INSERT INTO bb_migrations (version, migration_name, start_time, end_time, breakpoint) +VALUES +('20250619000001', 'InitialSchema', NOW(), NOW(), 0), +('20250619000002', 'SeedInitialData', NOW(), NOW(), 0); +``` + +#### Post-Setup Workflow + +After setup, your existing installation will work exactly like a fresh installation: + +```bash +# Create new migrations +php vendor/bin/phinx create AddNewFeature + +# Run new migrations +php vendor/bin/phinx migrate + +# Check status +php vendor/bin/phinx status +``` + +#### Troubleshooting + +**Migration table already exists:** +- Check if you've already set up migrations: `php vendor/bin/phinx status` +- If it shows errors, you may need to recreate: `DROP TABLE bb_migrations;` then restart + +**"Nothing to migrate" message:** +- This is normal after fake runs - it means setup was successful +- New migrations will appear when you create them + +**Admin panel shows "Needs Setup":** +- Follow the setup process above +- Refresh the admin panel after completion + ## πŸ—„οΈ Database Layer Migration TorrentPier has completely replaced its legacy database layer (SqlDb/Dbs) with a modern implementation using Nette Database while maintaining 100% backward compatibility. diff --git a/_cleanup.php b/_cleanup.php index 928bc6cd9..e1ed59a4a 100644 --- a/_cleanup.php +++ b/_cleanup.php @@ -13,7 +13,7 @@ if (!defined('BB_ROOT')) { } // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { exit; } @@ -34,12 +34,14 @@ $items = [ '_release.php', 'CHANGELOG.md', 'cliff.toml', + 'CLAUDE.md', 'CODE_OF_CONDUCT.md', 'CONTRIBUTING.md', 'crowdin.yml', 'HISTORY.md', 'README.md', - 'SECURITY.md' + 'SECURITY.md', + 'UPGRADE_GUIDE.md' ]; foreach ($items as $item) { diff --git a/_release.php b/_release.php index a09f3c718..1514275fe 100644 --- a/_release.php +++ b/_release.php @@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR); define('BB_PATH', BB_ROOT); // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { die('Please run php ' . basename(__FILE__) . ' in CLI mode'); } @@ -114,7 +114,7 @@ if ($bytesWritten === 0) { out("\n- Config file has been updated!", 'success'); // Update CHANGELOG.md -runProcess('npx git-cliff v2.4.5-rc.2.. --config cliff.toml --tag "' . $version . '" > CHANGELOG.md'); +runProcess('npx git-cliff v2.4.6-alpha.4.. --config cliff.toml --tag "' . $version . '" > CHANGELOG.md'); // Git add & commit runProcess('git add -A && git commit -m "release: ' . escapeshellarg($version) . (!empty($versionEmoji) ? (' ' . $versionEmoji) : '') . '"'); diff --git a/admin/admin_migrations.php b/admin/admin_migrations.php new file mode 100644 index 000000000..e416d81fb --- /dev/null +++ b/admin/admin_migrations.php @@ -0,0 +1,79 @@ +getMigrationStatus(); +$schemaInfo = $migrationStatus->getSchemaInfo(); + +// Template variables +$template->assign_vars([ + 'PAGE_TITLE' => __('MIGRATIONS_STATUS'), + 'CURRENT_TIME' => date('Y-m-d H:i:s'), + + // Migration status individual fields + 'MIGRATION_TABLE_EXISTS' => $status['table_exists'], + 'MIGRATION_CURRENT_VERSION' => $status['current_version'], + 'MIGRATION_APPLIED_COUNT' => count($status['applied_migrations']), + 'MIGRATION_PENDING_COUNT' => count($status['pending_migrations']), + + // Setup status fields + 'SETUP_REQUIRES_SETUP' => $status['requires_setup'] ?? false, + 'SETUP_TYPE' => $status['setup_status']['type'] ?? __('UNKNOWN'), + 'SETUP_MESSAGE' => $status['setup_status']['message'] ?? '', + 'SETUP_ACTION_REQUIRED' => $status['setup_status']['action_required'] ?? false, + 'SETUP_INSTRUCTIONS' => $status['setup_status']['instructions'] ?? '', + + // Schema info individual fields + 'SCHEMA_DATABASE_NAME' => $schemaInfo['database_name'], + 'SCHEMA_TABLE_COUNT' => $schemaInfo['table_count'], + 'SCHEMA_SIZE_MB' => $schemaInfo['size_mb'], +]); + +// Assign migration data for template +if (!empty($status['applied_migrations'])) { + foreach ($status['applied_migrations'] as $i => $migration) { + $template->assign_block_vars('applied_migrations', [ + 'VERSION' => $migration['version'], + 'NAME' => $migration['migration_name'] ?? __('UNKNOWN'), + 'START_TIME' => $migration['start_time'] ?? __('UNKNOWN'), + 'END_TIME' => $migration['end_time'] ?? __('UNKNOWN'), + 'ROW_CLASS' => ($i % 2) ? 'row1' : 'row2' + ]); + } +} + +if (!empty($status['pending_migrations'])) { + foreach ($status['pending_migrations'] as $i => $migration) { + $template->assign_block_vars('pending_migrations', [ + 'VERSION' => $migration['version'], + 'NAME' => $migration['name'], + 'FILENAME' => $migration['filename'], + 'ROW_CLASS' => ($i % 2) ? 'row1' : 'row2' + ]); + } +} + +// Output template using standard admin pattern +print_page('admin_migrations.tpl', 'admin'); diff --git a/composer.json b/composer.json index c2d6c4a12..45235d9ba 100644 --- a/composer.json +++ b/composer.json @@ -68,6 +68,7 @@ "nette/caching": "^3.3", "nette/database": "^3.2", "php-curl-class/php-curl-class": "^12.0.0", + "robmorgan/phinx": "^0.16.9", "samdark/sitemap": "2.4.1", "symfony/event-dispatcher": "^6.4", "symfony/filesystem": "^6.4", diff --git a/composer.lock b/composer.lock index 1b5dd1b48..741d655b9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "61d990417a4943d9986cef7fc3c0f382", + "content-hash": "1c6ed0e1507a53ce5784c929c38e84cf", "packages": [ { "name": "arokettu/bencode", @@ -544,6 +544,330 @@ }, "time": "2025-03-06T12:03:07+00:00" }, + { + "name": "cakephp/chronos", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/cakephp/chronos.git", + "reference": "786d69e1ee4b735765cbdb5521b9603e9b98d650" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/chronos/zipball/786d69e1ee4b735765cbdb5521b9603e9b98d650", + "reference": "786d69e1ee4b735765cbdb5521b9603e9b98d650", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/clock": "^1.0" + }, + "provide": { + "psr/clock-implementation": "1.0" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^5.0", + "phpunit/phpunit": "^10.1.0 || ^11.1.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cake\\Chronos\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + }, + { + "name": "The CakePHP Team", + "homepage": "https://cakephp.org" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "https://cakephp.org", + "keywords": [ + "date", + "datetime", + "time" + ], + "support": { + "issues": "https://github.com/cakephp/chronos/issues", + "source": "https://github.com/cakephp/chronos" + }, + "time": "2024-07-18T03:18:04+00:00" + }, + { + "name": "cakephp/core", + "version": "5.2.4", + "source": { + "type": "git", + "url": "https://github.com/cakephp/core.git", + "reference": "a0a92ee7fbb7b7555dbf4ea7ff3fd4e779693da6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/core/zipball/a0a92ee7fbb7b7555dbf4ea7ff3fd4e779693da6", + "reference": "a0a92ee7fbb7b7555dbf4ea7ff3fd4e779693da6", + "shasum": "" + }, + "require": { + "cakephp/utility": "5.2.*@dev", + "league/container": "^4.2", + "php": ">=8.1", + "psr/container": "^1.1 || ^2.0" + }, + "provide": { + "psr/container-implementation": "^2.0" + }, + "suggest": { + "cakephp/cache": "To use Configure::store() and restore().", + "cakephp/event": "To use PluginApplicationInterface or plugin applications.", + "league/container": "To use Container and ServiceProvider classes" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-5.x": "5.2.x-dev" + } + }, + "autoload": { + "files": [ + "functions.php" + ], + "psr-4": { + "Cake\\Core\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/core/graphs/contributors" + } + ], + "description": "CakePHP Framework Core classes", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "core", + "framework" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/core" + }, + "time": "2025-04-19T12:34:03+00:00" + }, + { + "name": "cakephp/database", + "version": "5.2.4", + "source": { + "type": "git", + "url": "https://github.com/cakephp/database.git", + "reference": "8c4eaecf6612274b445172b680dc47a2dad681a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/database/zipball/8c4eaecf6612274b445172b680dc47a2dad681a9", + "reference": "8c4eaecf6612274b445172b680dc47a2dad681a9", + "shasum": "" + }, + "require": { + "cakephp/chronos": "^3.1", + "cakephp/core": "5.2.*@dev", + "cakephp/datasource": "5.2.*@dev", + "php": ">=8.1", + "psr/log": "^3.0" + }, + "require-dev": { + "cakephp/i18n": "5.2.*@dev", + "cakephp/log": "5.2.*@dev" + }, + "suggest": { + "cakephp/i18n": "If you are using locale-aware datetime formats.", + "cakephp/log": "If you want to use query logging without providing a logger yourself." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-5.x": "5.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cake\\Database\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/database/graphs/contributors" + } + ], + "description": "Flexible and powerful Database abstraction library with a familiar PDO-like API", + "homepage": "https://cakephp.org", + "keywords": [ + "abstraction", + "cakephp", + "database", + "database abstraction", + "pdo" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/database" + }, + "time": "2025-05-09T15:08:51+00:00" + }, + { + "name": "cakephp/datasource", + "version": "5.2.4", + "source": { + "type": "git", + "url": "https://github.com/cakephp/datasource.git", + "reference": "f7dc4292bec0ec746db3200a5b18bb371d50dab3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/datasource/zipball/f7dc4292bec0ec746db3200a5b18bb371d50dab3", + "reference": "f7dc4292bec0ec746db3200a5b18bb371d50dab3", + "shasum": "" + }, + "require": { + "cakephp/core": "5.2.*@dev", + "php": ">=8.1", + "psr/simple-cache": "^2.0 || ^3.0" + }, + "require-dev": { + "cakephp/cache": "5.2.*@dev", + "cakephp/collection": "5.2.*@dev", + "cakephp/utility": "5.2.*@dev" + }, + "suggest": { + "cakephp/cache": "If you decide to use Query caching.", + "cakephp/collection": "If you decide to use ResultSetInterface.", + "cakephp/utility": "If you decide to use EntityTrait." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-5.x": "5.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Cake\\Datasource\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/datasource/graphs/contributors" + } + ], + "description": "Provides connection managing and traits for Entities and Queries that can be reused for different datastores", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "connection management", + "datasource", + "entity", + "query" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/datasource" + }, + "time": "2025-04-26T23:00:26+00:00" + }, + { + "name": "cakephp/utility", + "version": "5.2.4", + "source": { + "type": "git", + "url": "https://github.com/cakephp/utility.git", + "reference": "76dcd5c20e46aaf5bfdf9ad51e9f5313abffe104" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/utility/zipball/76dcd5c20e46aaf5bfdf9ad51e9f5313abffe104", + "reference": "76dcd5c20e46aaf5bfdf9ad51e9f5313abffe104", + "shasum": "" + }, + "require": { + "cakephp/core": "5.2.*@dev", + "php": ">=8.1" + }, + "suggest": { + "ext-intl": "To use Text::transliterate() or Text::slug()", + "lib-ICU": "To use Text::transliterate() or Text::slug()" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-5.x": "5.2.x-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Cake\\Utility\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/utility/graphs/contributors" + } + ], + "description": "CakePHP Utility classes such as Inflector, String, Hash, and Security", + "homepage": "https://cakephp.org", + "keywords": [ + "cakephp", + "hash", + "inflector", + "security", + "string", + "utility" + ], + "support": { + "forum": "https://stackoverflow.com/tags/cakephp", + "irc": "irc://irc.freenode.org/cakephp", + "issues": "https://github.com/cakephp/cakephp/issues", + "source": "https://github.com/cakephp/utility" + }, + "time": "2025-04-19T12:34:03+00:00" + }, { "name": "claviska/simpleimage", "version": "4.2.1", @@ -1618,6 +1942,88 @@ }, "time": "2022-09-24T15:57:16+00:00" }, + { + "name": "league/container", + "version": "4.2.5", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/container.git", + "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/container/zipball/d3cebb0ff4685ff61c749e54b27db49319e2ec00", + "reference": "d3cebb0ff4685ff61c749e54b27db49319e2ec00", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "psr/container": "^1.1 || ^2.0" + }, + "provide": { + "psr/container-implementation": "^1.0" + }, + "replace": { + "orno/di": "~2.0" + }, + "require-dev": { + "nette/php-generator": "^3.4", + "nikic/php-parser": "^4.10", + "phpstan/phpstan": "^0.12.47", + "phpunit/phpunit": "^8.5.17", + "roave/security-advisories": "dev-latest", + "scrutinizer/ocular": "^1.8", + "squizlabs/php_codesniffer": "^3.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev", + "dev-3.x": "3.x-dev", + "dev-4.x": "4.x-dev", + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Container\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Phil Bennett", + "email": "mail@philbennett.co.uk", + "role": "Developer" + } + ], + "description": "A fast and intuitive dependency injection container.", + "homepage": "https://github.com/thephpleague/container", + "keywords": [ + "container", + "dependency", + "di", + "injection", + "league", + "provider", + "service" + ], + "support": { + "issues": "https://github.com/thephpleague/container/issues", + "source": "https://github.com/thephpleague/container/tree/4.2.5" + }, + "funding": [ + { + "url": "https://github.com/philipobenito", + "type": "github" + } + ], + "time": "2025-05-20T12:55:37+00:00" + }, { "name": "league/flysystem", "version": "3.29.1", @@ -2559,6 +2965,54 @@ }, "time": "2021-02-03T23:26:27+00:00" }, + { + "name": "psr/clock", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/clock.git", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Clock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for reading the clock.", + "homepage": "https://github.com/php-fig/clock", + "keywords": [ + "clock", + "now", + "psr", + "psr-20", + "time" + ], + "support": { + "issues": "https://github.com/php-fig/clock/issues", + "source": "https://github.com/php-fig/clock/tree/1.0.0" + }, + "time": "2022-11-25T14:36:26+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -2967,6 +3421,93 @@ }, "time": "2019-03-08T08:55:37+00:00" }, + { + "name": "robmorgan/phinx", + "version": "0.16.9", + "source": { + "type": "git", + "url": "https://github.com/cakephp/phinx.git", + "reference": "524ebdeb0e1838a845d752a3418726b38cd1e654" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cakephp/phinx/zipball/524ebdeb0e1838a845d752a3418726b38cd1e654", + "reference": "524ebdeb0e1838a845d752a3418726b38cd1e654", + "shasum": "" + }, + "require": { + "cakephp/database": "^5.0.2", + "composer-runtime-api": "^2.0", + "php-64bit": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/config": "^4.0|^5.0|^6.0|^7.0", + "symfony/console": "^6.0|^7.0" + }, + "require-dev": { + "cakephp/cakephp-codesniffer": "^5.0", + "cakephp/i18n": "^5.0", + "ext-json": "*", + "ext-pdo": "*", + "phpunit/phpunit": "^9.5.19", + "symfony/yaml": "^4.0|^5.0|^6.0|^7.0" + }, + "suggest": { + "ext-json": "Install if using JSON configuration format", + "ext-pdo": "PDO extension is needed", + "symfony/yaml": "Install if using YAML configuration format" + }, + "bin": [ + "bin/phinx" + ], + "type": "library", + "autoload": { + "psr-4": { + "Phinx\\": "src/Phinx/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Morgan", + "email": "robbym@gmail.com", + "homepage": "https://robmorgan.id.au", + "role": "Lead Developer" + }, + { + "name": "Woody Gilk", + "email": "woody.gilk@gmail.com", + "homepage": "https://shadowhand.me", + "role": "Developer" + }, + { + "name": "Richard Quadling", + "email": "rquadling@gmail.com", + "role": "Developer" + }, + { + "name": "CakePHP Community", + "homepage": "https://github.com/cakephp/phinx/graphs/contributors", + "role": "Developer" + } + ], + "description": "Phinx makes it ridiculously easy to manage the database migrations for your PHP app.", + "homepage": "https://phinx.org", + "keywords": [ + "database", + "database migrations", + "db", + "migrations", + "phinx" + ], + "support": { + "issues": "https://github.com/cakephp/phinx/issues", + "source": "https://github.com/cakephp/phinx/tree/0.16.9" + }, + "time": "2025-05-25T16:07:44+00:00" + }, { "name": "samdark/sitemap", "version": "2.4.1", @@ -3026,6 +3567,175 @@ ], "time": "2023-11-01T08:41:34+00:00" }, + { + "name": "symfony/config", + "version": "v7.0.8", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "f8a8fb0c2d0a188a00a2dd5af8a4eb070641ec60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/f8a8fb0c2d0a188a00a2dd5af8a4eb070641ec60", + "reference": "f8a8fb0c2d0a188a00a2dd5af8a4eb070641ec60", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^6.4|^7.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<6.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/finder": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v7.0.8" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-05-31T14:55:39+00:00" + }, + { + "name": "symfony/console", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/66c1440edf6f339fd82ed6c7caa76cb006211b44", + "reference": "66c1440edf6f339fd82ed6c7caa76cb006211b44", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^7.2" + }, + "conflict": { + "symfony/dependency-injection": "<6.4", + "symfony/dotenv": "<6.4", + "symfony/event-dispatcher": "<6.4", + "symfony/lock": "<6.4", + "symfony/process": "<6.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^6.4|^7.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/event-dispatcher": "^6.4|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0", + "symfony/var-dumper": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-05-24T10:34:04+00:00" + }, { "name": "symfony/deprecation-contracts", "version": "v3.6.0", @@ -3744,6 +4454,93 @@ ], "time": "2025-04-25T09:37:31+00:00" }, + { + "name": "symfony/string", + "version": "v7.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f3570b8c61ca887a9e2938e85cb6458515d2b125", + "reference": "f3570b8c61ca887a9e2938e85cb6458515d2b125", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/emoji": "^7.1", + "symfony/error-handler": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/intl": "^6.4|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v7.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-04-20T20:19:01+00:00" + }, { "name": "vlucas/phpdotenv", "version": "v5.6.2", diff --git a/install.php b/install.php index 327c0fb5d..6ed06273c 100644 --- a/install.php +++ b/install.php @@ -11,7 +11,7 @@ define('BB_ROOT', __DIR__ . DIRECTORY_SEPARATOR); define('BB_PATH', BB_ROOT); // Check CLI mode -if (php_sapi_name() !== 'cli') { +if (PHP_SAPI != 'cli') { die('Please run php ' . basename(__FILE__) . ' in CLI mode'); } @@ -24,7 +24,7 @@ require INC_DIR . '/functions_cli.php'; /** * System requirements */ -define('CHECK_REQUIREMENTS', [ +const CHECK_REQUIREMENTS = [ 'php_min_version' => '8.1.0', 'ext_list' => [ 'json', @@ -39,7 +39,7 @@ define('CHECK_REQUIREMENTS', [ 'zip', 'gd' ], -]); +]; // Welcoming message out("--- TorrentPier Installer ---\n", 'info'); @@ -265,35 +265,26 @@ if (!empty($DB_HOST) && !empty($DB_DATABASE) && !empty($DB_USERNAME)) { } $conn->select_db($DB_DATABASE); - // Checking SQL dump - $dumpPath = BB_ROOT . 'install/sql/mysql.sql'; - if (is_file($dumpPath) && is_readable($dumpPath)) { - out('- SQL dump file found and readable!', 'success'); - } else { - out('- SQL dump file not found / not readable', 'error'); + // Close database connection - migrations will handle their own connections + $conn->close(); + + // Run database migrations + out('- Setting up database using migrations...', 'info'); + + // Check if phinx.php exists + if (!is_file(BB_ROOT . 'phinx.php')) { + out('- Migration configuration (phinx.php) not found', 'error'); exit; } - // Inserting SQL dump - out('- Start importing SQL dump...', 'info'); - $tempLine = ''; - foreach (file($dumpPath) as $line) { - if (str_starts_with($line, '--') || $line == '') { - continue; - } - - $tempLine .= $line; - if (str_ends_with(trim($line), ';')) { - if (!$conn->query($tempLine)) { - out("- Error performing query: $tempLine", 'error'); - exit; - } - $tempLine = ''; - } + // Run migrations + $migrationResult = runProcess('php vendor/bin/phinx migrate --configuration=' . BB_ROOT . 'phinx.php'); + if ($migrationResult !== 0) { + out('- Database migration failed', 'error'); + exit; } - $conn->close(); - out("- Importing SQL dump completed!\n", 'success'); + out("- Database setup completed!\n", 'success'); // Autofill host in robots.txt $robots_txt_file = BB_ROOT . 'robots.txt'; diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql deleted file mode 100644 index 23ed26841..000000000 --- a/install/sql/mysql.sql +++ /dev/null @@ -1,1553 +0,0 @@ -SET SQL_MODE = ""; - --- ---------------------------- --- Table structure for `bb_attachments` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attachments`; -CREATE TABLE IF NOT EXISTS `bb_attachments` -( - `attach_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id_1` MEDIUMINT(8) NOT NULL DEFAULT '0', - PRIMARY KEY (`attach_id`, `post_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_attachments --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_attachments_config` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attachments_config`; -CREATE TABLE IF NOT EXISTS `bb_attachments_config` -( - `config_name` VARCHAR(155) NOT NULL DEFAULT '', - `config_value` VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY (`config_name`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_attachments_config --- ---------------------------- -INSERT INTO `bb_attachments_config` -VALUES ('upload_dir', 'data/uploads'), - ('upload_img', 'styles/images/icon_clip.gif'), - ('topic_icon', 'styles/images/icon_clip.gif'), - ('display_order', '0'), - ('max_filesize', '262144'), - ('attachment_quota', '52428800'), - ('max_filesize_pm', '262144'), - ('max_attachments', '1'), - ('max_attachments_pm', '1'), - ('disable_mod', '0'), - ('allow_pm_attach', '1'), - ('default_upload_quota', '0'), - ('default_pm_quota', '0'), - ('img_display_inlined', '1'), - ('img_max_width', '2000'), - ('img_max_height', '2000'), - ('img_link_width', '600'), - ('img_link_height', '400'), - ('img_create_thumbnail', '1'), - ('img_min_thumb_filesize', '12000'); - --- ---------------------------- --- Table structure for `bb_attachments_desc` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attachments_desc`; -CREATE TABLE IF NOT EXISTS `bb_attachments_desc` -( - `attach_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `physical_filename` VARCHAR(255) NOT NULL DEFAULT '', - `real_filename` VARCHAR(255) NOT NULL DEFAULT '', - `download_count` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `comment` VARCHAR(255) NOT NULL DEFAULT '', - `extension` VARCHAR(100) NOT NULL DEFAULT '', - `mimetype` VARCHAR(100) NOT NULL DEFAULT '', - `filesize` INT(20) NOT NULL DEFAULT '0', - `filetime` INT(11) NOT NULL DEFAULT '0', - `thumbnail` TINYINT(1) NOT NULL DEFAULT '0', - `tracker_status` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`attach_id`), - KEY `filetime` (`filetime`), - KEY `filesize` (`filesize`), - KEY `physical_filename` (`physical_filename`(10)) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_attachments_desc --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_attach_quota` --- ---------------------------- -DROP TABLE IF EXISTS `bb_attach_quota`; -CREATE TABLE IF NOT EXISTS `bb_attach_quota` -( - `user_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `group_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `quota_type` SMALLINT(2) NOT NULL DEFAULT '0', - `quota_limit_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - KEY `quota_type` (`quota_type`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_attach_quota --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_auth_access` --- ---------------------------- -DROP TABLE IF EXISTS `bb_auth_access`; -CREATE TABLE IF NOT EXISTS `bb_auth_access` -( - `group_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `forum_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `forum_perm` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`group_id`, `forum_id`), - KEY `forum_id` (`forum_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_auth_access --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_auth_access_snap` --- ---------------------------- -DROP TABLE IF EXISTS `bb_auth_access_snap`; -CREATE TABLE IF NOT EXISTS `bb_auth_access_snap` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `forum_id` SMALLINT(6) NOT NULL DEFAULT '0', - `forum_perm` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`, `forum_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_auth_access_snap --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_banlist` --- ---------------------------- -DROP TABLE IF EXISTS `bb_banlist`; -CREATE TABLE IF NOT EXISTS `bb_banlist` -( - `ban_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `ban_userid` MEDIUMINT(8) NOT NULL DEFAULT '0', - `ban_reason` VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY (`ban_id`, `ban_userid`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_banlist --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_dlstatus` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_dlstatus`; -CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_status` TINYINT(1) NOT NULL DEFAULT '0', - `last_modified_dlstatus` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`user_id`, `topic_id`), - KEY `topic_id` (`topic_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_dlstatus --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_dlstatus_snap` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_dlstatus_snap`; -CREATE TABLE IF NOT EXISTS `bb_bt_dlstatus_snap` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `dl_status` TINYINT(4) NOT NULL DEFAULT '0', - `users_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - KEY `topic_id` (`topic_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_dlstatus_snap --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_last_torstat` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_last_torstat`; -CREATE TABLE IF NOT EXISTS `bb_bt_last_torstat` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `dl_status` TINYINT(1) NOT NULL DEFAULT '0', - `up_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `down_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `release_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `bonus_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `speed_up` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `speed_down` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) USING BTREE -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_last_torstat --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_last_userstat` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_last_userstat`; -CREATE TABLE IF NOT EXISTS `bb_bt_last_userstat` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `up_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `down_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `release_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `bonus_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `speed_up` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `speed_down` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_last_userstat --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_torhelp` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_torhelp`; -CREATE TABLE IF NOT EXISTS `bb_bt_torhelp` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `topic_id_csv` TEXT NOT NULL, - PRIMARY KEY (`user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_torhelp --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_torrents` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_torrents`; -CREATE TABLE IF NOT EXISTS `bb_bt_torrents` -( - `info_hash` VARBINARY(20) NOT NULL DEFAULT '', - `info_hash_v2` VARBINARY(32) NOT NULL DEFAULT '', - `post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `poster_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `forum_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `attach_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `size` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `reg_time` INT(11) NOT NULL DEFAULT '0', - `call_seed_time` INT(11) NOT NULL DEFAULT '0', - `complete_count` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `seeder_last_seen` INT(11) NOT NULL DEFAULT '0', - `tor_status` TINYINT(4) NOT NULL DEFAULT '0', - `checked_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `checked_time` INT(11) NOT NULL DEFAULT '0', - `tor_type` TINYINT(1) NOT NULL DEFAULT '0', - `speed_up` INT(11) NOT NULL DEFAULT '0', - `speed_down` INT(11) NOT NULL DEFAULT '0', - `last_seeder_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`), - UNIQUE KEY `post_id` (`post_id`), - UNIQUE KEY `topic_id` (`topic_id`), - UNIQUE KEY `attach_id` (`attach_id`), - KEY `reg_time` (`reg_time`), - KEY `forum_id` (`forum_id`), - KEY `poster_id` (`poster_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_torrents --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_torstat` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_torstat`; -CREATE TABLE IF NOT EXISTS `bb_bt_torstat` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `last_modified_torstat` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `completed` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_torstat --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_tor_dl_stat` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_tor_dl_stat`; -CREATE TABLE IF NOT EXISTS `bb_bt_tor_dl_stat` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `attach_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `t_up_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `t_down_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `t_bonus_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_tor_dl_stat --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_tracker` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_tracker`; -CREATE TABLE IF NOT EXISTS `bb_bt_tracker` -( - `peer_hash` VARCHAR(32) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `peer_id` VARCHAR(20) NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `ip` VARCHAR(42) DEFAULT NULL, - `ipv6` VARCHAR(42) DEFAULT NULL, - `port` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `seeder` TINYINT(1) NOT NULL DEFAULT '0', - `releaser` TINYINT(1) NOT NULL DEFAULT '0', - `tor_type` TINYINT(1) NOT NULL DEFAULT '0', - `uploaded` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `downloaded` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `remain` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `speed_up` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `speed_down` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `up_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `down_add` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `update_time` INT(11) NOT NULL DEFAULT '0', - `complete_percent` BIGINT(20) NOT NULL DEFAULT '0', - `complete` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`peer_hash`), - KEY `topic_id` (`topic_id`), - KEY `user_id` (`user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_tracker --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_tracker_snap` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_tracker_snap`; -CREATE TABLE IF NOT EXISTS `bb_bt_tracker_snap` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `seeders` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `leechers` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `speed_up` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `speed_down` INT(11) UNSIGNED NOT NULL DEFAULT '0', - `completed` INT(10) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_tracker_snap --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_bt_users` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_users`; -CREATE TABLE IF NOT EXISTS `bb_bt_users` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `auth_key` CHAR(20) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `u_up_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `u_down_total` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `u_up_release` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `u_up_bonus` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `up_today` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `down_today` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `up_release_today` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `up_bonus_today` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `points_today` FLOAT(16, 2) UNSIGNED NOT NULL DEFAULT '0.00', - `up_yesterday` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `down_yesterday` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `up_release_yesterday` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `up_bonus_yesterday` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - `points_yesterday` FLOAT(16, 2) UNSIGNED NOT NULL DEFAULT '0.00', - `ratio_nulled` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`), - UNIQUE KEY `auth_key` (`auth_key`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_users --- ---------------------------- -INSERT INTO `bb_bt_users` (user_id, auth_key) -VALUES ('-1', SUBSTRING(MD5(RAND()), 1, 20)), - ('-746', SUBSTRING(MD5(RAND()), 1, 20)), - ('2', SUBSTRING(MD5(RAND()), 1, 20)); - --- ---------------------------- --- Table structure for `bb_bt_user_settings` --- ---------------------------- -DROP TABLE IF EXISTS `bb_bt_user_settings`; -CREATE TABLE IF NOT EXISTS `bb_bt_user_settings` -( - `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `tor_search_set` TEXT NOT NULL, - `last_modified` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_bt_user_settings --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_categories` --- ---------------------------- -DROP TABLE IF EXISTS `bb_categories`; -CREATE TABLE IF NOT EXISTS `bb_categories` -( - `cat_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `cat_title` VARCHAR(100) NOT NULL DEFAULT '', - `cat_order` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`cat_id`), - KEY `cat_order` (`cat_order`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_categories --- ---------------------------- -INSERT INTO `bb_categories` -VALUES ('1', 'Your first category', '10'); - --- ---------------------------- --- Table structure for `bb_config` --- ---------------------------- -DROP TABLE IF EXISTS `bb_config`; -CREATE TABLE IF NOT EXISTS `bb_config` -( - `config_name` VARCHAR(155) NOT NULL DEFAULT '', - `config_value` TEXT NOT NULL, - PRIMARY KEY (`config_name`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_config --- ---------------------------- -INSERT INTO `bb_config` -VALUES ('allow_autologin', '1'), - ('allow_bbcode', '1'), - ('allow_namechange', '0'), - ('allow_sig', '1'), - ('allow_smilies', '1'), - ('board_disable', '0'), - ('board_startdate', UNIX_TIMESTAMP()), - ('board_timezone', '0'), - ('bonus_upload', ''), - ('bonus_upload_price', ''), - ('birthday_enabled', '1'), - ('birthday_max_age', '99'), - ('birthday_min_age', '10'), - ('birthday_check_day', '7'), - ('bt_add_auth_key', '1'), - ('bt_allow_spmode_change', '1'), - ('bt_announce_url', 'https://localhost/bt/announce.php'), - ('bt_disable_dht', '0'), - ('bt_check_announce_url', '0'), - ('bt_del_addit_ann_urls', '1'), - ('bt_dl_list_only_1st_page', '1'), - ('bt_dl_list_only_count', '1'), - ('bt_newtopic_auto_reg', '1'), - ('bt_replace_ann_url', '1'), - ('bt_search_bool_mode', '1'), - ('bt_set_dltype_on_tor_reg', '1'), - ('bt_show_dl_but_cancel', '1'), - ('bt_show_dl_but_compl', '1'), - ('bt_show_dl_but_down', '0'), - ('bt_show_dl_but_will', '1'), - ('bt_show_dl_list', '0'), - ('bt_show_dl_list_buttons', '1'), - ('bt_show_dl_stat_on_index', '1'), - ('bt_show_ip_only_moder', '1'), - ('bt_show_peers', '1'), - ('bt_show_peers_mode', '1'), - ('bt_show_port_only_moder', '1'), - ('bt_tor_browse_only_reg', '0'), - ('bt_unset_dltype_on_tor_unreg', '1'), - ('cron_last_check', '0'), - ('default_dateformat', 'Y-m-d H:i'), - ('default_lang', 'en'), - ('flood_interval', '15'), - ('hot_threshold', '300'), - ('login_reset_time', '30'), - ('max_autologin_time', '10'), - ('max_login_attempts', '5'), - ('max_poll_options', '6'), - ('max_sig_chars', '255'), - ('posts_per_page', '15'), - ('prune_enable', '1'), - ('record_online_date', UNIX_TIMESTAMP()), - ('record_online_users', '0'), - ('seed_bonus_enabled', '1'), - ('seed_bonus_release', ''), - ('seed_bonus_points', ''), - ('seed_bonus_tor_size', '0'), - ('seed_bonus_user_regdate', '0'), - ('site_desc', 'Bull-powered BitTorrent tracker engine'), - ('sitemap_time', ''), - ('sitename', 'TorrentPier'), - ('smilies_path', 'styles/images/smiles'), - ('static_sitemap', ''), - ('topics_per_page', '50'), - ('xs_use_cache', '1'), - ('cron_check_interval', '180'), - ('magnet_links_enabled', '1'), - ('magnet_links_for_guests', '0'), - ('gender', '1'), - ('callseed', '0'), - ('tor_stats', '1'), - ('show_latest_news', '1'), - ('max_news_title', '50'), - ('latest_news_count', '5'), - ('latest_news_forum_id', '1'), - ('show_network_news', '1'), - ('max_net_title', '50'), - ('network_news_count', '5'), - ('network_news_forum_id', '2'), - ('whois_info', 'https://whatismyipaddress.com/ip/'), - ('show_mod_index', '0'), - ('premod', '0'), - ('tor_comment', '1'), - ('terms', ''), - ('show_board_start_index', '1'); - --- ---------------------------- --- Table structure for `bb_cron` --- ---------------------------- -DROP TABLE IF EXISTS `bb_cron`; -CREATE TABLE IF NOT EXISTS `bb_cron` -( - `cron_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `cron_active` TINYINT(4) NOT NULL DEFAULT '1', - `cron_title` CHAR(120) NOT NULL DEFAULT '', - `cron_script` CHAR(120) NOT NULL DEFAULT '', - `schedule` ENUM ('hourly', 'daily', 'weekly', 'monthly', 'interval') NOT NULL DEFAULT 'daily', - `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_order` TINYINT(4) UNSIGNED NOT NULL DEFAULT '0', - `last_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00', - `next_run` DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00', - `run_interval` TIME DEFAULT NULL DEFAULT '0', - `log_enabled` TINYINT(1) NOT NULL DEFAULT '0', - `log_file` CHAR(120) NOT NULL DEFAULT '', - `log_sql_queries` TINYINT(4) NOT NULL DEFAULT '0', - `disable_board` TINYINT(1) NOT NULL DEFAULT '0', - `run_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`cron_id`), - UNIQUE KEY `title` (`cron_title`), - UNIQUE KEY `script` (`cron_script`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_cron --- ---------------------------- -INSERT INTO `bb_cron` (`cron_active`, `cron_title`, `cron_script`, `schedule`, `run_day`, `run_time`, `run_order`, - `last_run`, `next_run`, `run_interval`, `log_enabled`, `log_file`, `log_sql_queries`, - `disable_board`, `run_counter`) -VALUES ('1', 'Attach maintenance', 'attach_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '0', '', '0', - '1', '0'), - ('1', 'Board maintenance', 'board_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '0', '', '0', '1', - '0'), - ('1', 'Prune forums', 'prune_forums.php', 'daily', '', '05:00:00', '50', '', '', '', '0', '', '0', '1', '0'), - ('1', 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', '', '05:00:00', '60', '', '', '', '0', '', - '0', - '1', '0'), - ('1', 'Logs cleanup', 'clean_log.php', 'daily', '', '05:00:00', '70', '', '', '', '0', '', '0', '1', '0'), - ('1', 'PM cleanup', 'clean_pm.php', 'daily', '', '05:00:00', '70', '', '', '', '0', '', '0', '1', '0'), - ('1', 'Tracker maintenance', 'tr_maintenance.php', 'daily', '', '05:00:00', '90', '', '', '', '0', '', '0', '1', - '0'), - ('1', 'Clean dlstat', 'clean_dlstat.php', 'daily', '', '05:00:00', '100', '', '', '', '0', '', '0', '1', '0'), - ('1', 'Prune inactive users', 'prune_inactive_users.php', 'daily', '', '05:00:00', '110', '', '', '', '0', '', - '0', '1', '0'), - ('1', 'Sessions cleanup', 'sessions_cleanup.php', 'interval', '', '', '255', '', '', '00:03:00', '0', '', '0', - '0', '0'), - ('1', 'DS update cat_forums', 'ds_update_cat_forums.php', 'interval', '', '', '255', '', '', '00:05:00', '0', '', - '0', '0', '0'), - ('1', 'DS update stats', 'ds_update_stats.php', 'interval', '', '', '255', '', '', '00:10:00', '0', '', '0', '0', - '0'), - ('1', 'Flash topic view', 'flash_topic_view.php', 'interval', '', '', '255', '', '', '00:10:00', '0', '', '0', - '0', '0'), - ('1', 'Clean search results', 'clean_search_results.php', 'interval', '', '', '255', '', '', '00:10:00', '0', '', - '0', '0', '0'), - ('1', 'Tracker cleanup and dlstat', 'tr_cleanup_and_dlstat.php', 'interval', '', '', '20', '', '', '00:15:00', - '0', '', '0', '0', '0'), - ('1', 'Accrual seedbonus', 'tr_seed_bonus.php', 'interval', '', '', '25', '', '', '00:10:00', '0', '', '0', '0', - '0'), - ('1', 'Make tracker snapshot', 'tr_make_snapshot.php', 'interval', '', '', '10', '', '', '00:10:00', '0', '', - '0', - '0', '0'), - ('1', 'Seeder last seen', 'tr_update_seeder_last_seen.php', 'interval', '', '', '255', '', '', '01:00:00', '0', - '', '0', '0', '0'), - ('1', 'Tracker dl-complete count', 'tr_complete_count.php', 'interval', '', '', '255', '', '', '06:00:00', '0', - '', '0', '0', '0'), - ('1', 'Sitemap update', 'sitemap.php', 'daily', '', '06:00:00', '30', '', '', '', '0', '', '0', '0', '0'), - ('1', 'Update forums atom', 'update_forums_atom.php', 'interval', '', '', '255', '', '', '00:15:00', '0', '', - '0', - '0', '0'), - ('1', 'Demo mode', 'demo_mode.php', 'daily', '', '05:00:00', '255', '', '', '', '1', 'demo_mode_cron', '1', '1', - '0'); - --- ---------------------------- --- Table structure for `bb_disallow` --- ---------------------------- -DROP TABLE IF EXISTS `bb_disallow`; -CREATE TABLE IF NOT EXISTS `bb_disallow` -( - `disallow_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `disallow_username` VARCHAR(25) NOT NULL DEFAULT '', - PRIMARY KEY (`disallow_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_disallow --- ---------------------------- -INSERT INTO `bb_disallow` (`disallow_id`, `disallow_username`) -VALUES ('1', 'torrentpier*'), - ('2', 'tracker*'), - ('3', 'forum*'), - ('4', 'torrent*'), - ('5', 'admin*'); - --- ---------------------------- --- Table structure for `bb_extensions` --- ---------------------------- -DROP TABLE IF EXISTS `bb_extensions`; -CREATE TABLE IF NOT EXISTS `bb_extensions` -( - `ext_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `group_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `extension` VARCHAR(100) NOT NULL DEFAULT '', - `comment` VARCHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`ext_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_extensions --- ---------------------------- -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) -VALUES ('1', 'gif', ''), - ('1', 'png', ''), - ('1', 'jpeg', ''), - ('1', 'jpg', ''), - ('1', 'webp', ''), - ('1', 'avif', ''), - ('1', 'bmp', ''), - ('2', 'gtar', ''), - ('2', 'gz', ''), - ('2', 'tar', ''), - ('2', 'zip', ''), - ('2', 'rar', ''), - ('2', 'ace', ''), - ('2', '7z', ''), - ('3', 'txt', ''), - ('3', 'c', ''), - ('3', 'h', ''), - ('3', 'cpp', ''), - ('3', 'hpp', ''), - ('3', 'diz', ''), - ('3', 'm3u', ''), - ('4', 'xls', ''), - ('4', 'doc', ''), - ('4', 'dot', ''), - ('4', 'pdf', ''), - ('4', 'ai', ''), - ('4', 'ps', ''), - ('4', 'ppt', ''), - ('5', 'rm', ''), - ('6', 'torrent', ''); - --- ---------------------------- --- Table structure for `bb_extension_groups` --- ---------------------------- -DROP TABLE IF EXISTS `bb_extension_groups`; -CREATE TABLE IF NOT EXISTS `bb_extension_groups` -( - `group_id` MEDIUMINT(8) NOT NULL AUTO_INCREMENT, - `group_name` VARCHAR(20) NOT NULL DEFAULT '', - `cat_id` TINYINT(2) NOT NULL DEFAULT '0', - `allow_group` TINYINT(1) NOT NULL DEFAULT '0', - `download_mode` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', - `upload_icon` VARCHAR(100) NOT NULL DEFAULT '', - `max_filesize` INT(20) NOT NULL DEFAULT '0', - `forum_permissions` TEXT NOT NULL, - PRIMARY KEY (`group_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_extension_groups --- ---------------------------- -INSERT INTO `bb_extension_groups` (`group_name`, `cat_id`, `allow_group`, `download_mode`, `upload_icon`, - `max_filesize`, `forum_permissions`) -VALUES ('Images', '1', '1', '1', '', '262144', ''), - ('Archives', '0', '1', '1', '', '262144', ''), - ('Plain text', '0', '1', '1', '', '262144', ''), - ('Documents', '0', '1', '1', '', '262144', ''), - ('Real media', '0', '0', '2', '', '262144', ''), - ('Torrent', '0', '1', '1', '', '262144', ''); - --- ---------------------------- --- Table structure for `bb_forums` --- ---------------------------- -DROP TABLE IF EXISTS `bb_forums`; -CREATE TABLE IF NOT EXISTS `bb_forums` -( - `forum_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `cat_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `forum_name` VARCHAR(150) NOT NULL DEFAULT '', - `forum_desc` TEXT NOT NULL, - `forum_status` TINYINT(4) NOT NULL DEFAULT '0', - `forum_order` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '1', - `forum_posts` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `forum_topics` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `forum_last_post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `forum_tpl_id` SMALLINT(6) NOT NULL DEFAULT '0', - `prune_days` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `auth_view` TINYINT(2) NOT NULL DEFAULT '0', - `auth_read` TINYINT(2) NOT NULL DEFAULT '0', - `auth_post` TINYINT(2) NOT NULL DEFAULT '0', - `auth_reply` TINYINT(2) NOT NULL DEFAULT '0', - `auth_edit` TINYINT(2) NOT NULL DEFAULT '0', - `auth_delete` TINYINT(2) NOT NULL DEFAULT '0', - `auth_sticky` TINYINT(2) NOT NULL DEFAULT '0', - `auth_announce` TINYINT(2) NOT NULL DEFAULT '0', - `auth_vote` TINYINT(2) NOT NULL DEFAULT '0', - `auth_pollcreate` TINYINT(2) NOT NULL DEFAULT '0', - `auth_attachments` TINYINT(2) NOT NULL DEFAULT '0', - `auth_download` TINYINT(2) NOT NULL DEFAULT '0', - `allow_reg_tracker` TINYINT(1) NOT NULL DEFAULT '0', - `allow_porno_topic` TINYINT(1) NOT NULL DEFAULT '0', - `self_moderated` TINYINT(1) NOT NULL DEFAULT '0', - `forum_parent` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `show_on_index` TINYINT(1) NOT NULL DEFAULT '1', - `forum_display_sort` TINYINT(1) NOT NULL DEFAULT '0', - `forum_display_order` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`forum_id`), - KEY `forums_order` (`forum_order`), - KEY `cat_id` (`cat_id`), - KEY `forum_last_post_id` (`forum_last_post_id`), - KEY `forum_parent` (`forum_parent`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_forums --- ---------------------------- -INSERT INTO `bb_forums` -VALUES ('1', '1', 'Your first forum', 'Description of the forum.', '0', '10', '1', '1', '1', '0', '0', '0', '0', - '1', - '1', '1', '1', - '3', '3', '1', - '1', '1', '1', - '0', '0', '0', '0', '1', '0', '0'); - --- ---------------------------- --- Table structure for `bb_groups` --- ---------------------------- -DROP TABLE IF EXISTS `bb_groups`; -CREATE TABLE IF NOT EXISTS `bb_groups` -( - `group_id` MEDIUMINT(8) NOT NULL AUTO_INCREMENT, - `avatar_ext_id` INT(15) NOT NULL DEFAULT '0', - `group_time` INT(11) NOT NULL DEFAULT '0', - `mod_time` INT(11) NOT NULL DEFAULT '0', - `group_type` TINYINT(4) NOT NULL DEFAULT '1', - `release_group` TINYINT(4) NOT NULL DEFAULT '0', - `group_name` VARCHAR(40) NOT NULL DEFAULT '', - `group_description` TEXT NOT NULL DEFAULT '', - `group_signature` TEXT NOT NULL DEFAULT '', - `group_moderator` MEDIUMINT(8) NOT NULL DEFAULT '0', - `group_single_user` TINYINT(1) NOT NULL DEFAULT '1', - PRIMARY KEY (`group_id`), - KEY `group_single_user` (`group_single_user`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_groups --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_log` --- ---------------------------- -DROP TABLE IF EXISTS `bb_log`; -CREATE TABLE IF NOT EXISTS `bb_log` -( - `log_type_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `log_user_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `log_user_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `log_forum_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `log_forum_id_new` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `log_topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `log_topic_id_new` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `log_topic_title` VARCHAR(250) NOT NULL DEFAULT '', - `log_topic_title_new` VARCHAR(250) NOT NULL DEFAULT '', - `log_time` INT(11) NOT NULL DEFAULT '0', - `log_msg` TEXT NOT NULL, - KEY `log_time` (`log_time`), - FULLTEXT KEY `log_topic_title` (`log_topic_title`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_log --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_poll_users` --- ---------------------------- -DROP TABLE IF EXISTS `bb_poll_users`; -CREATE TABLE IF NOT EXISTS `bb_poll_users` -( - `topic_id` INT(10) UNSIGNED NOT NULL, - `user_id` MEDIUMINT(8) NOT NULL, - `vote_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `vote_dt` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_poll_users --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_poll_votes` --- ---------------------------- -DROP TABLE IF EXISTS `bb_poll_votes`; -CREATE TABLE IF NOT EXISTS `bb_poll_votes` -( - `topic_id` INT(10) UNSIGNED NOT NULL, - `vote_id` TINYINT(4) UNSIGNED NOT NULL, - `vote_text` VARCHAR(255) NOT NULL, - `vote_result` MEDIUMINT(8) UNSIGNED NOT NULL, - PRIMARY KEY (`topic_id`, `vote_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_poll_votes --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_posts` --- ---------------------------- -DROP TABLE IF EXISTS `bb_posts`; -CREATE TABLE IF NOT EXISTS `bb_posts` -( - `post_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `forum_id` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `poster_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `post_time` INT(11) NOT NULL DEFAULT '0', - `poster_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `poster_rg_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `attach_rg_sig` TINYINT(4) NOT NULL DEFAULT '0', - `post_username` VARCHAR(25) NOT NULL DEFAULT '', - `post_edit_time` INT(11) NOT NULL DEFAULT '0', - `post_edit_count` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `post_attachment` TINYINT(1) NOT NULL DEFAULT '0', - `user_post` TINYINT(1) NOT NULL DEFAULT '1', - `mc_comment` TEXT NOT NULL DEFAULT '', - `mc_type` TINYINT(1) NOT NULL DEFAULT '0', - `mc_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - PRIMARY KEY (`post_id`), - KEY `topic_id` (`topic_id`), - KEY `poster_id` (`poster_id`), - KEY `post_time` (`post_time`), - KEY `forum_id_post_time` (`forum_id`, `post_time`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_posts --- ---------------------------- -INSERT INTO `bb_posts` -VALUES ('1', '1', '1', '2', UNIX_TIMESTAMP(), '0', '0', '0', '', '0', '0', '0', '1', '', '0', '0'); - --- ---------------------------- --- Table structure for `bb_posts_html` --- ---------------------------- -DROP TABLE IF EXISTS `bb_posts_html`; -CREATE TABLE IF NOT EXISTS `bb_posts_html` -( - `post_id` MEDIUMINT(9) NOT NULL DEFAULT '0', - `post_html_time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `post_html` MEDIUMTEXT NOT NULL DEFAULT '', - PRIMARY KEY (`post_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_posts_html --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_posts_search` --- ---------------------------- -DROP TABLE IF EXISTS `bb_posts_search`; -CREATE TABLE IF NOT EXISTS `bb_posts_search` -( - `post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `search_words` TEXT NOT NULL, - PRIMARY KEY (`post_id`), - FULLTEXT KEY `search_words` (`search_words`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_posts_search --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_posts_text` --- ---------------------------- -DROP TABLE IF EXISTS `bb_posts_text`; -CREATE TABLE IF NOT EXISTS `bb_posts_text` -( - `post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `post_text` MEDIUMTEXT NOT NULL, - PRIMARY KEY (`post_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_posts_text --- ---------------------------- -INSERT INTO `bb_posts_text` -VALUES ('1', - 'Thank you for installing the new β€” TorrentPier Cattle!\n\nWhat to do next? First of all configure your site in the administration panel (link in the bottom).\n\nChange main options: site description, number of messages per topic, time zone, language by default, seed-bonus options, birthdays etc... Create a couple of forums, delete or change this one. Change settings of categories to allow registration of torrents, change announcer url. If you will have questions or want additional modifications of the engine, [url=https://torrentpier.com/]visit our forum[/url] (you can use english, we will try to help in any case).\n\nIf you want to help with the translations: [url=https://crowdin.com/project/torrentpier]Crowdin[/url].\n\nOur GitHub organization: [url=https://github.com/torrentpier]https://github.com/torrentpier[/url].\nOur SourceForge repository: [url=https://sourceforge.net/projects/torrentpier-engine]https://sourceforge.net/projects/torrentpier-engine[/url].\nOur demo website: [url=https://torrentpier.duckdns.org]https://torrentpier.duckdns.org[/url].\n\nWe are sure that you will be able to create the best tracker available!\nGood luck! πŸ˜‰'); - --- ---------------------------- --- Table structure for `bb_privmsgs` --- ---------------------------- -DROP TABLE IF EXISTS `bb_privmsgs`; -CREATE TABLE IF NOT EXISTS `bb_privmsgs` -( - `privmsgs_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `privmsgs_type` TINYINT(4) NOT NULL DEFAULT '0', - `privmsgs_subject` VARCHAR(255) NOT NULL DEFAULT '', - `privmsgs_from_userid` MEDIUMINT(8) NOT NULL DEFAULT '0', - `privmsgs_to_userid` MEDIUMINT(8) NOT NULL DEFAULT '0', - `privmsgs_date` INT(11) NOT NULL DEFAULT '0', - `privmsgs_ip` VARCHAR(42) NOT NULL DEFAULT '0', - PRIMARY KEY (`privmsgs_id`), - KEY `privmsgs_from_userid` (`privmsgs_from_userid`), - KEY `privmsgs_to_userid` (`privmsgs_to_userid`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_privmsgs --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_privmsgs_text` --- ---------------------------- -DROP TABLE IF EXISTS `bb_privmsgs_text`; -CREATE TABLE IF NOT EXISTS `bb_privmsgs_text` -( - `privmsgs_text_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `privmsgs_text` MEDIUMTEXT NOT NULL, - PRIMARY KEY (`privmsgs_text_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_privmsgs_text --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_quota_limits` --- ---------------------------- -DROP TABLE IF EXISTS `bb_quota_limits`; -CREATE TABLE IF NOT EXISTS `bb_quota_limits` -( - `quota_limit_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `quota_desc` VARCHAR(20) NOT NULL DEFAULT '', - `quota_limit` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`quota_limit_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_quota_limits --- ---------------------------- -INSERT INTO `bb_quota_limits` (`quota_desc`, `quota_limit`) -VALUES ('Low', '262144'), - ('Medium', '10485760'), - ('High', '15728640'); - --- ---------------------------- --- Table structure for `bb_ranks` --- ---------------------------- -DROP TABLE IF EXISTS `bb_ranks`; -CREATE TABLE IF NOT EXISTS `bb_ranks` -( - `rank_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `rank_title` VARCHAR(50) NOT NULL DEFAULT '', - `rank_image` VARCHAR(255) NOT NULL DEFAULT '', - `rank_style` VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY (`rank_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_ranks --- ---------------------------- -INSERT INTO `bb_ranks` (`rank_title`, `rank_image`, `rank_style`) -VALUES ('Administrator', 'styles/images/ranks/admin.png', 'colorAdmin'); - --- ---------------------------- --- Table structure for `bb_search_rebuild` --- ---------------------------- -DROP TABLE IF EXISTS `bb_search_rebuild`; -CREATE TABLE IF NOT EXISTS `bb_search_rebuild` -( - `rebuild_session_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `start_post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `end_post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `start_time` INT(11) NOT NULL DEFAULT '0', - `end_time` INT(11) NOT NULL DEFAULT '0', - `last_cycle_time` INT(11) NOT NULL DEFAULT '0', - `session_time` INT(11) NOT NULL DEFAULT '0', - `session_posts` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `session_cycles` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `search_size` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `rebuild_session_status` TINYINT(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`rebuild_session_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_search_rebuild --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_search_results` --- ---------------------------- -DROP TABLE IF EXISTS `bb_search_results`; -CREATE TABLE IF NOT EXISTS `bb_search_results` -( - `session_id` CHAR(255) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `search_type` TINYINT(4) NOT NULL DEFAULT '0', - `search_id` VARCHAR(255) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `search_time` INT(11) NOT NULL DEFAULT '0', - `search_settings` TEXT NOT NULL, - `search_array` TEXT NOT NULL, - PRIMARY KEY (`session_id`, `search_type`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_search_results --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_sessions` --- ---------------------------- -DROP TABLE IF EXISTS `bb_sessions`; -CREATE TABLE IF NOT EXISTS `bb_sessions` -( - `session_id` CHAR(255) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `session_user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `session_start` INT(11) NOT NULL DEFAULT '0', - `session_time` INT(11) NOT NULL DEFAULT '0', - `session_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `session_logged_in` TINYINT(1) NOT NULL DEFAULT '0', - `session_admin` TINYINT(2) NOT NULL DEFAULT '0', - PRIMARY KEY (`session_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_sessions --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_smilies` --- ---------------------------- -DROP TABLE IF EXISTS `bb_smilies`; -CREATE TABLE IF NOT EXISTS `bb_smilies` -( - `smilies_id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, - `code` VARCHAR(50) NOT NULL DEFAULT '', - `smile_url` VARCHAR(100) NOT NULL DEFAULT '', - `emoticon` VARCHAR(75) NOT NULL DEFAULT '', - PRIMARY KEY (`smilies_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_smilies --- ---------------------------- -INSERT INTO `bb_smilies` (`code`, `smile_url`, `emoticon`) -VALUES (':aa:', 'aa.gif', 'aa'), - (':ab:', 'ab.gif', 'ab'), - (':ac:', 'ac.gif', 'ac'), - (':ae:', 'ae.gif', 'ae'), - (':af:', 'af.gif', 'af'), - (':ag:', 'ag.gif', 'ag'), - (':ah:', 'ah.gif', 'ah'), - (':ai:', 'ai.gif', 'ai'), - (':aj:', 'aj.gif', 'aj'), - (':ak:', 'ak.gif', 'ak'), - (':al:', 'al.gif', 'al'), - (':am:', 'am.gif', 'am'), - (':an:', 'an.gif', 'an'), - (':ao:', 'ao.gif', 'ao'), - (':ap:', 'ap.gif', 'ap'), - (':aq:', 'aq.gif', 'aq'), - (':ar:', 'ar.gif', 'ar'), - (':as:', 'as.gif', 'as'), - (':at:', 'at.gif', 'at'), - (':au:', 'au.gif', 'au'), - (':av:', 'av.gif', 'av'), - (':aw:', 'aw.gif', 'aw'), - (':ax:', 'ax.gif', 'ax'), - (':ay:', 'ay.gif', 'ay'), - (':az:', 'az.gif', 'az'), - (':ba:', 'ba.gif', 'ba'), - (':bb:', 'bb.gif', 'bb'), - (':bc:', 'bc.gif', 'bc'), - (':bd:', 'bd.gif', 'bd'), - (':be:', 'be.gif', 'be'), - (':bf:', 'bf.gif', 'bf'), - (':bg:', 'bg.gif', 'bg'), - (':bh:', 'bh.gif', 'bh'), - (':bi:', 'bi.gif', 'bi'), - (':bj:', 'bj.gif', 'bj'), - (':bk:', 'bk.gif', 'bk'), - (':bl:', 'bl.gif', 'bl'), - (':bm:', 'bm.gif', 'bm'), - (':bn:', 'bn.gif', 'bn'), - (':bo:', 'bo.gif', 'bo'), - (':bp:', 'bp.gif', 'bp'), - (':bq:', 'bq.gif', 'bq'), - (':br:', 'br.gif', 'br'), - (':bs:', 'bs.gif', 'bs'), - (':bt:', 'bt.gif', 'bt'), - (':bu:', 'bu.gif', 'bu'), - (':bv:', 'bv.gif', 'bv'), - (':bw:', 'bw.gif', 'bw'), - (':bx:', 'bx.gif', 'bx'), - (':by:', 'by.gif', 'by'), - (':bz:', 'bz.gif', 'bz'), - (':ca:', 'ca.gif', 'ca'), - (':cb:', 'cb.gif', 'cb'), - (':cc:', 'cc.gif', 'cc'), - (':cd:', 'cd.gif', 'cd'); - --- ---------------------------- --- Table structure for `bb_topics` --- ---------------------------- -DROP TABLE IF EXISTS `bb_topics`; -CREATE TABLE IF NOT EXISTS `bb_topics` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `forum_id` SMALLINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_title` VARCHAR(250) NOT NULL DEFAULT '', - `topic_poster` MEDIUMINT(8) NOT NULL DEFAULT '0', - `topic_time` INT(11) NOT NULL DEFAULT '0', - `topic_views` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_replies` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_status` TINYINT(3) NOT NULL DEFAULT '0', - `topic_vote` TINYINT(1) NOT NULL DEFAULT '0', - `topic_type` TINYINT(3) NOT NULL DEFAULT '0', - `topic_first_post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_last_post_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_moved_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_attachment` TINYINT(1) NOT NULL DEFAULT '0', - `topic_dl_type` TINYINT(1) NOT NULL DEFAULT '0', - `topic_last_post_time` INT(11) NOT NULL DEFAULT '0', - `topic_show_first_post` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - `topic_allow_robots` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`), - KEY `forum_id` (`forum_id`), - KEY `topic_last_post_id` (`topic_last_post_id`), - KEY `topic_last_post_time` (`topic_last_post_time`), - FULLTEXT KEY `topic_title` (`topic_title`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_topics --- ---------------------------- -INSERT INTO `bb_topics` -VALUES ('1', '1', 'Welcome to TorrentPier Cattle', '2', UNIX_TIMESTAMP(), '0', '0', '0', '0', '0', '1', '1', - '0', - '0', - '0', UNIX_TIMESTAMP(), '0', '1'); - --- ---------------------------- --- Table structure for `bb_topics_watch` --- ---------------------------- -DROP TABLE IF EXISTS `bb_topics_watch`; -CREATE TABLE IF NOT EXISTS `bb_topics_watch` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `notify_status` TINYINT(1) NOT NULL DEFAULT '0', - KEY `topic_id` (`topic_id`), - KEY `user_id` (`user_id`), - KEY `notify_status` (`notify_status`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_topics_watch --- ---------------------------- -INSERT INTO `bb_topics_watch` -VALUES ('1', '2', '1'); - --- ---------------------------- --- Table structure for `bb_topic_tpl` --- ---------------------------- -DROP TABLE IF EXISTS `bb_topic_tpl`; -CREATE TABLE IF NOT EXISTS `bb_topic_tpl` -( - `tpl_id` SMALLINT(6) NOT NULL AUTO_INCREMENT, - `tpl_name` VARCHAR(60) NOT NULL DEFAULT '', - `tpl_src_form` TEXT NOT NULL, - `tpl_src_title` TEXT NOT NULL, - `tpl_src_msg` TEXT NOT NULL, - `tpl_comment` TEXT NOT NULL, - `tpl_rules_post_id` INT(10) UNSIGNED NOT NULL DEFAULT '0', - `tpl_last_edit_tm` INT(11) NOT NULL DEFAULT '0', - `tpl_last_edit_by` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`tpl_id`), - UNIQUE KEY `tpl_name` (`tpl_name`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_topic_tpl --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_users` --- ---------------------------- -DROP TABLE IF EXISTS `bb_users`; -CREATE TABLE IF NOT EXISTS `bb_users` -( - `user_id` MEDIUMINT(8) NOT NULL AUTO_INCREMENT, - `user_active` TINYINT(1) NOT NULL DEFAULT '1', - `username` VARCHAR(255) NOT NULL DEFAULT '', - `user_password` VARCHAR(255) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `user_session_time` INT(11) NOT NULL DEFAULT '0', - `user_lastvisit` INT(11) NOT NULL DEFAULT '0', - `user_last_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `user_regdate` INT(11) NOT NULL DEFAULT '0', - `user_reg_ip` VARCHAR(42) NOT NULL DEFAULT '0', - `user_level` TINYINT(4) NOT NULL DEFAULT '0', - `user_posts` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_timezone` DECIMAL(5, 2) NOT NULL DEFAULT '0.00', - `user_lang` VARCHAR(255) NOT NULL DEFAULT 'en', - `user_new_privmsg` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `user_unread_privmsg` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', - `user_last_privmsg` INT(11) NOT NULL DEFAULT '0', - `user_opt` INT(11) NOT NULL DEFAULT '0', - `user_rank` INT(11) NOT NULL DEFAULT '0', - `avatar_ext_id` TINYINT(4) NOT NULL DEFAULT '0', - `user_gender` TINYINT(1) NOT NULL DEFAULT '0', - `user_birthday` DATE NOT NULL DEFAULT '1900-01-01', - `user_email` VARCHAR(255) NOT NULL DEFAULT '', - `user_skype` VARCHAR(32) NOT NULL DEFAULT '', - `user_twitter` VARCHAR(15) NOT NULL DEFAULT '', - `user_icq` VARCHAR(15) NOT NULL DEFAULT '', - `user_website` VARCHAR(100) NOT NULL DEFAULT '', - `user_from` VARCHAR(100) NOT NULL DEFAULT '', - `user_sig` TEXT NOT NULL DEFAULT '', - `user_occ` VARCHAR(100) NOT NULL DEFAULT '', - `user_interests` VARCHAR(255) NOT NULL DEFAULT '', - `user_actkey` VARCHAR(255) NOT NULL DEFAULT '', - `user_newpasswd` VARCHAR(255) NOT NULL DEFAULT '', - `autologin_id` VARCHAR(255) - CHARACTER SET utf8 - COLLATE utf8_bin NOT NULL DEFAULT '', - `user_newest_pm_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `user_points` FLOAT(16, 2) NOT NULL DEFAULT '0.00', - `tpl_name` VARCHAR(255) NOT NULL DEFAULT 'default', - PRIMARY KEY (`user_id`), - KEY `username` (`username`(10)), - KEY `user_email` (`user_email`(10)), - KEY `user_level` (`user_level`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_users --- ---------------------------- -INSERT INTO `bb_users` -VALUES ('-1', '0', 'Guest', '$2y$10$sfZSmqPio8mxxFQLRRXaFuVMkFKZARRz/RzqddfYByN3M53.CEe.O', '0', '0', - '0', UNIX_TIMESTAMP(), '0', '0', '0', '', - 'en', '0', - '0', '0', - '0', '0', - '0', '0', - '1900-01-01', - '', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'), - ('-746', '0', 'bot', '$2y$10$sfZSmqPio8mxxFQLRRXaFuVMkFKZARRz/RzqddfYByN3M53.CEe.O', '0', '0', - '0', UNIX_TIMESTAMP(), '0', '0', '0', '', - 'en', '0', - '0', '0', - '144', '0', - '0', '0', - '1900-01-01', - 'bot@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'), - ('2', '1', 'admin', '$2y$10$QeekUGqdfMO0yp7AT7la8OhgbiNBoJ627BO38MdS1h5kY7oX6UUKu', '0', '0', - '0', UNIX_TIMESTAMP(), '0', '1', '1', '', 'en', - '0', - '0', '0', - '304', '1', - '0', '0', - '1900-01-01', - 'admin@torrentpier.com', '', '', '', '', '', '', '', '', '', '', '', '0', '0.00', 'default'); - --- ---------------------------- --- Table structure for `bb_user_group` --- ---------------------------- -DROP TABLE IF EXISTS `bb_user_group`; -CREATE TABLE IF NOT EXISTS `bb_user_group` -( - `group_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `user_pending` TINYINT(1) NOT NULL DEFAULT '0', - `user_time` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`group_id`, `user_id`), - KEY `user_id` (`user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_user_group --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_words` --- ---------------------------- -DROP TABLE IF EXISTS `bb_words`; -CREATE TABLE IF NOT EXISTS `bb_words` -( - `word_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `word` CHAR(100) NOT NULL DEFAULT '', - `replacement` CHAR(100) NOT NULL DEFAULT '', - PRIMARY KEY (`word_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_words --- ---------------------------- - --- ---------------------------- --- Table structure for `buf_last_seeder` --- ---------------------------- -DROP TABLE IF EXISTS `buf_last_seeder`; -CREATE TABLE IF NOT EXISTS `buf_last_seeder` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `seeder_last_seen` INT(11) NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of buf_last_seeder --- ---------------------------- - --- ---------------------------- --- Table structure for `bb_thx` --- ---------------------------- -DROP TABLE IF EXISTS `bb_thx`; -CREATE TABLE IF NOT EXISTS `bb_thx` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `time` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of bb_thx --- ---------------------------- - --- ---------------------------- --- Table structure for `buf_topic_view` --- ---------------------------- -DROP TABLE IF EXISTS `buf_topic_view`; -CREATE TABLE IF NOT EXISTS `buf_topic_view` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `topic_views` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - --- ---------------------------- --- Records of buf_topic_view --- ---------------------------- diff --git a/install/upgrade/legacy-changes.txt b/install/upgrade/legacy-changes.txt deleted file mode 100644 index 942ed2075..000000000 --- a/install/upgrade/legacy-changes.txt +++ /dev/null @@ -1,157 +0,0 @@ -// Changes from v2.2.0 to 2.4.5 - -// 2.2.0 -UPDATE `bb_config` SET `config_value` = 'http://whatismyipaddress.com/ip/' WHERE `config_name` = 'whois_info'; -DELETE FROM `bb_smilies` WHERE `code` = ':ad:'; -INSERT INTO `bb_smilies` (`code`, `smile_url`, `emoticon`) VALUES (':сd:', 'сd.gif', 'сd'); -DROP TABLE IF EXISTS `bb_ads`; -DELETE FROM `bb_config` WHERE `config_name` = 'active_ads'; -ALTER TABLE `bb_log` DROP COLUMN `log_username`; -DELETE FROM `bb_config` WHERE `config_name` = 'new_tpls'; -UPDATE `bb_posts` SET `poster_ip` = '0'; -ALTER TABLE `bb_posts` CHANGE `poster_ip` `poster_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_bt_tracker` SET `ip` = '0'; -ALTER TABLE `bb_bt_tracker` CHANGE `ip` `ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_users` SET `user_last_ip` = '0'; -ALTER TABLE `bb_users` CHANGE `user_last_ip` `user_last_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_users` SET `user_reg_ip` = '0'; -ALTER TABLE `bb_users` CHANGE `user_reg_ip` `user_reg_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_log` SET `log_user_ip` = '0'; -ALTER TABLE `bb_log` CHANGE `log_user_ip` `log_user_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_poll_users` SET `vote_ip` = '0'; -ALTER TABLE `bb_poll_users` CHANGE `vote_ip` `vote_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_privmsgs` SET `privmsgs_ip` = '0'; -ALTER TABLE `bb_privmsgs` CHANGE `privmsgs_ip` `privmsgs_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_sessions` SET `session_ip` = '0'; -ALTER TABLE `bb_sessions` CHANGE `session_ip` `session_ip` varchar(42) NOT NULL DEFAULT '0'; -UPDATE `bb_banlist` SET `ban_ip` = '0'; -ALTER TABLE `bb_banlist` CHANGE `ban_ip` `ban_ip` varchar(42) NOT NULL DEFAULT '0'; - -// 2.2.2 -ALTER TABLE `bb_ranks` DROP `rank_min`; -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 ''; - -// 2.3.0.2 -ALTER TABLE `bb_users` CHANGE `user_sig` `user_sig` TEXT NOT NULL DEFAULT ''; -ALTER TABLE `bb_groups` CHANGE `group_signature` `group_signature` TEXT NOT NULL DEFAULT ''; -ALTER TABLE `bb_groups` CHANGE `group_description` `group_description` TEXT NOT NULL DEFAULT ''; -UPDATE `bb_smilies` SET `code` = ':cd:', `smile_url` = 'cd.gif', `emoticon` = 'cd' WHERE `code` = ':сd:' AND `smile_url` = 'сd.gif' AND `emoticon` = 'сd'; - -// 2.3.1 -ALTER TABLE `bb_search_results` CHANGE `search_id` `search_id` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `autologin_id` `autologin_id` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; -DELETE FROM `bb_config` WHERE `config_name` = 'cron_enabled'; - -// 2.4.0-alpha1 -ALTER TABLE `bb_search_results` CHANGE `session_id` `session_id` CHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; -ALTER TABLE `bb_sessions` CHANGE `session_id` `session_id` CHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `username` `username` VARCHAR(255) NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `user_password` `user_password` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `user_actkey` `user_actkey` VARCHAR(255) NOT NULL DEFAULT ''; -ALTER TABLE `bb_users` CHANGE `user_newpasswd` `user_newpasswd` VARCHAR(255) NOT NULL DEFAULT ''; - -// 2.4.0-alpha3 -INSERT INTO bb_config VALUES ('show_board_start_index', '1'); - -// 2.4.0-beta2 -INSERT INTO `bb_cron` (`cron_active`, `cron_title`, `cron_script`, `schedule`, `run_day`, `run_time`, `run_order`, - `last_run`, `next_run`, `run_interval`, `log_enabled`, `log_file`, `log_sql_queries`, - `disable_board`, `run_counter`) VALUES ('1', 'PM cleanup', 'clean_pm.php', 'daily', '', '05:00:00', '70', '', '', '', '1', '', '0', '1', '0'); -ALTER TABLE `bb_posts_text` CHANGE `post_text` `post_text` MEDIUMTEXT NOT NULL; -ALTER TABLE `bb_privmsgs_text` CHANGE `privmsgs_text` `privmsgs_text` MEDIUMTEXT NOT NULL; -ALTER TABLE `bb_bt_torrents` ADD COLUMN `info_hash_v2` VARBINARY(32) NOT NULL DEFAULT ''; -ALTER TABLE `bb_bt_tracker_snap` ADD COLUMN `completed` INT(10) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker` CHANGE `complete` `complete` TINYINT(1) NOT NULL DEFAULT '0'; - -// 2.4.0-beta3 -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('1', 'webp', ''); -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('2', '7z', ''); -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('1', 'bmp', ''); -ALTER TABLE `bb_bt_tracker` CHANGE `speed_up` `speed_up` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker` CHANGE `speed_down` `speed_down` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker_snap` CHANGE `speed_up` `speed_up` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker_snap` CHANGE `speed_down` `speed_down` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_torrents` ADD COLUMN `last_seeder_id` MEDIUMINT(8) NOT NULL DEFAULT '0'; -ALTER TABLE `buf_last_seeder` ADD COLUMN `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0'; -ALTER TABLE `bb_bt_tracker` CHANGE `ip` `ip` VARCHAR(42) DEFAULT NULL; -ALTER TABLE `bb_bt_tracker` CHANGE `ipv6` `ipv6` VARCHAR(42) DEFAULT NULL; -ALTER TABLE `bb_bt_users` CHANGE `auth_key` `auth_key` CHAR(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; - -// 2.4.0-beta4 -DELETE FROM `bb_extensions` WHERE `extension` = 'tif'; -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('4', 'tif', ''); -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('4', 'tiff', ''); -DELETE FROM `bb_extensions` WHERE `extension` = 'tga'; -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('4', 'tga', ''); - -// 2.4.0-rc1 -ALTER TABLE `bb_bt_tracker` DROP COLUMN `client`; -DROP TABLE IF EXISTS `bb_thx`; -CREATE TABLE IF NOT EXISTS `bb_thx` -( - `topic_id` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', - `user_id` MEDIUMINT(8) NOT NULL DEFAULT '0', - `time` INT(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`topic_id`, `user_id`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - -// 2.4.0 -UPDATE `bb_attachments_config` SET `config_value` = 'data/uploads' WHERE `config_name` = 'upload_dir'; -UPDATE `bb_attachments_config` SET `config_value` = '12000' WHERE `config_name` = 'img_min_thumb_filesize'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'attach_version'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'img_min_thumb_filesize'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'img_imagick'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'use_gd2'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'wma_autoplay'; -DELETE FROM `bb_attachments_config` WHERE config_name = 'flash_autoplay'; -DELETE FROM `bb_extensions` WHERE extension = 'tif'; -DELETE FROM `bb_extensions` WHERE extension = 'tiff'; -DELETE FROM `bb_extensions` WHERE extension = 'tga'; -DROP TABLE IF EXISTS `bb_banlist`; -CREATE TABLE IF NOT EXISTS `bb_banlist` -( - `ban_id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, - `ban_userid` MEDIUMINT(8) NOT NULL DEFAULT '0', - `ban_reason` VARCHAR(255) NOT NULL DEFAULT '', - PRIMARY KEY (`ban_id`, `ban_userid`) -) - ENGINE = MyISAM - DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_unicode_ci; - -// 2.4.1 -UPDATE `bb_config` SET `config_value` = '' WHERE `config_name` = 'bt_announce_url'; - -// 2.4.2 -INSERT INTO `bb_cron` (`cron_active`, `cron_title`, `cron_script`, `schedule`, `run_day`, `run_time`, `run_order`, - `last_run`, `next_run`, `run_interval`, `log_enabled`, `log_file`, `log_sql_queries`, - `disable_board`, `run_counter`) VALUES ('1', 'Demo mode', 'demo_mode.php', 'daily', '', '05:00:00', '255', '', '', '', '1', 'demo_mode_cron', '1', '1', '0'); - -// 2.4.3 -UPDATE `bb_config` SET `config_value` = 'https://localhost/bt/announce.php' WHERE `config_name` = 'bt_announce_url'; - -// 2.4.4 -ALTER TABLE `bb_poll_users` CHANGE `user_id` `user_id` MEDIUMINT(8) NOT NULL; -ALTER TABLE `bb_bt_users` ADD COLUMN `ratio_nulled` TINYINT(1) NOT NULL DEFAULT '0'; -DELETE FROM `bb_cron` WHERE `cron_script` = 'cache_gc.php'; -UPDATE `bb_cron` SET `run_interval` = '00:10:00' WHERE `cron_script` = 'tr_seed_bonus.php'; - -// 2.4.5-rc.1 -INSERT INTO `bb_extensions` (`group_id`, `extension`, `comment`) VALUES ('1', 'avif', ''), ('3', 'm3u', ''); -ALTER TABLE `bb_topics` ADD COLUMN `topic_allow_robots` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0'; - -// 2.4.5-rc.2 -INSERT INTO `bb_config` VALUES ('magnet_links_for_guests', '0'); -INSERT INTO `bb_config` VALUES ('tp_instance_hash', ''); - -// 2.4.5-rc.5 -DELETE FROM `bb_config` WHERE `config_name` = 'tp_instance_hash'; diff --git a/library/defines.php b/library/defines.php index df8813a64..5ca49bdf2 100644 --- a/library/defines.php +++ b/library/defines.php @@ -83,6 +83,9 @@ define('CRON_RUNNING', TRIGGERS_DIR . '/cron_running'); define('GZIP_OUTPUT_ALLOWED', extension_loaded('zlib') && !ini_get('zlib.output_compression')); define('UA_GZIP_SUPPORTED', isset($_SERVER['HTTP_ACCEPT_ENCODING']) && str_contains($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')); +// Migrations table +define('BB_MIGRATIONS', 'bb_migrations'); + // Tracker shared constants define('BB_BT_TORRENTS', 'bb_bt_torrents'); define('BB_BT_TRACKER', 'bb_bt_tracker'); diff --git a/library/includes/cron/cron_run.php b/library/includes/cron/cron_run.php index debeb7859..4b30dd61c 100644 --- a/library/includes/cron/cron_run.php +++ b/library/includes/cron/cron_run.php @@ -13,11 +13,10 @@ if (!defined('BB_ROOT')) { define('IN_CRON', true); -// Set SESSION vars +// Set SESSION vars (optimized for InnoDB) DB()->query(" SET SESSION - myisam_sort_buffer_size = 16*1024*1024 - , bulk_insert_buffer_size = 8*1024*1024 + bulk_insert_buffer_size = 8*1024*1024 , join_buffer_size = 4*1024*1024 , read_buffer_size = 4*1024*1024 , read_rnd_buffer_size = 8*1024*1024 @@ -29,8 +28,7 @@ DB()->query(" // Restore vars at shutdown DB()->add_shutdown_query(" SET SESSION - myisam_sort_buffer_size = DEFAULT - , bulk_insert_buffer_size = DEFAULT + bulk_insert_buffer_size = DEFAULT , join_buffer_size = DEFAULT , read_buffer_size = DEFAULT , read_rnd_buffer_size = DEFAULT diff --git a/library/includes/cron/jobs/attach_maintenance.php b/library/includes/cron/jobs/attach_maintenance.php index 84987405e..aa5ee6101 100644 --- a/library/includes/cron/jobs/attach_maintenance.php +++ b/library/includes/cron/jobs/attach_maintenance.php @@ -28,7 +28,7 @@ DB()->query(" CREATE TEMPORARY TABLE $tmp_attach_tbl ( physical_filename VARCHAR(255) NOT NULL default '', KEY physical_filename (physical_filename(20)) - ) ENGINE = MyISAM DEFAULT CHARSET = utf8 + ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 "); DB()->add_shutdown_query("DROP TEMPORARY TABLE IF EXISTS $tmp_attach_tbl"); diff --git a/library/includes/cron/jobs/demo_mode.php b/library/includes/cron/jobs/demo_mode.php deleted file mode 100644 index ec02cc498..000000000 --- a/library/includes/cron/jobs/demo_mode.php +++ /dev/null @@ -1,44 +0,0 @@ -clean(); -foreach (config()->get('cache.engines') as $cache_name => $cache_val) { - CACHE($cache_name)->rm(); -} - -// Drop tables & Insert sql dump -$temp_line = ''; -foreach (file($dump_path) as $line) { - if (str_starts_with($line, '--') || $line == '') { - continue; - } - - $temp_line .= $line; - if (str_ends_with(trim($line), ';')) { - if (!DB()->query($temp_line)) { - $cron_runtime_log[] = date('Y-m-d H:i:s') . " -- Error performing query: " . $temp_line . " | " . DB()->sql_error()['message']; - } - $temp_line = ''; - } -} diff --git a/library/includes/functions_cli.php b/library/includes/functions_cli.php index d2adb0188..90c415e0f 100644 --- a/library/includes/functions_cli.php +++ b/library/includes/functions_cli.php @@ -86,9 +86,9 @@ function out(string $str, string $type = ''): void * * @param string $cmd * @param string|null $input - * @return void + * @return int */ -function runProcess(string $cmd, ?string $input = null): void +function runProcess(string $cmd, ?string $input = null): int { $descriptorSpec = [ 0 => ['pipe', 'r'], @@ -100,7 +100,7 @@ function runProcess(string $cmd, ?string $input = null): void if (!is_resource($process)) { out('- Could not start subprocess', 'error'); - return; + return -1; } // Write input if provided @@ -124,7 +124,7 @@ function runProcess(string $cmd, ?string $input = null): void fclose($pipes[1]); fclose($pipes[2]); - proc_close($process); + return proc_close($process); } /** diff --git a/library/language/source/main.php b/library/language/source/main.php index 80059d74b..5228ede0b 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -1946,6 +1946,31 @@ $lang['TRACKER_CONFIG'] = 'Tracker settings'; $lang['RELEASE_TEMPLATES'] = 'Release Templates'; $lang['ACTIONS_LOG'] = 'Report on action'; +// Migrations +$lang['MIGRATIONS_STATUS'] = 'Database Migration Status'; +$lang['MIGRATIONS_DATABASE_NAME'] = 'Database Name'; +$lang['MIGRATIONS_DATABASE_TOTAL'] = 'Total Tables'; +$lang['MIGRATIONS_DATABASE_SIZE'] = 'Database Size'; +$lang['MIGRATIONS_DATABASE_INFO'] = 'Database Information'; +$lang['MIGRATIONS_SYSTEM'] = 'Migration System'; +$lang['MIGRATIONS_NEEDS_SETUP'] = 'Needs Setup'; +$lang['MIGRATIONS_ACTIVE'] = 'Active'; +$lang['MIGRATIONS_NOT_INITIALIZED'] = 'Not Initialized'; +$lang['MIGRATIONS_UP_TO_DATE'] = 'All up to date'; +$lang['MIGRATIONS_PENDING_COUNT'] = 'pending'; +$lang['MIGRATIONS_APPLIED'] = 'Applied Migrations'; +$lang['MIGRATIONS_PENDING'] = 'Pending Migrations'; +$lang['MIGRATIONS_VERSION'] = 'Version'; +$lang['MIGRATIONS_NAME'] = 'Migration Name'; +$lang['MIGRATIONS_APPLIED_AT'] = 'Applied At'; +$lang['MIGRATIONS_COMPLETED_AT'] = 'Completed At'; +$lang['MIGRATIONS_CURRENT_VERSION'] = 'Current Version'; +$lang['MIGRATIONS_NOT_APPLIED'] = 'No migrations applied'; +$lang['MIGRATIONS_INSTRUCTIONS'] = 'Instructions'; +$lang['MIGRATIONS_SETUP_STATUS'] = 'Setup Status'; +$lang['MIGRATIONS_SETUP_GUIDE'] = 'See setup guide below'; +$lang['MIGRATIONS_ACTION_REQUIRED'] = 'Action Required'; + // Index $lang['MAIN_INDEX'] = 'Forum Index'; $lang['FORUM_STATS'] = 'Forum Statistics'; diff --git a/migrations/20250619000001_initial_schema.php b/migrations/20250619000001_initial_schema.php new file mode 100644 index 000000000..cd36bb326 --- /dev/null +++ b/migrations/20250619000001_initial_schema.php @@ -0,0 +1,1017 @@ +execute("SET SQL_MODE = ''"); + + // Core forum tables - InnoDB for data integrity + $this->createForumTables(); + + // BitTorrent tracker tables - InnoDB for reliability + $this->createTrackerTables(); + + // Configuration and system tables - InnoDB + $this->createSystemTables(); + + // Attachment system - InnoDB + $this->createAttachmentTables(); + + // User management - InnoDB + $this->createUserTables(); + + // Cache and temporary tables - InnoDB + $this->createCacheTables(); + } + + private function createForumTables() + { + // bb_categories + $table = $this->table('bb_categories', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'cat_id' + ]); + $table->addColumn('cat_id', 'integer', ['limit' => 65535, 'signed' => false, 'identity' => true]) // SMALLINT UNSIGNED + ->addColumn('cat_title', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('cat_order', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addIndex('cat_order') + ->create(); + + // bb_forums + $table = $this->table('bb_forums', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'forum_id' + ]); + $table->addColumn('forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'identity' => true]) // SMALLINT UNSIGNED + ->addColumn('cat_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('forum_name', 'string', ['limit' => 150, 'default' => '', 'null' => false]) + ->addColumn('forum_desc', 'text', ['null' => false]) + ->addColumn('forum_status', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT(4) + ->addColumn('forum_order', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 1, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('forum_posts', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('forum_topics', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('forum_last_post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('forum_tpl_id', 'integer', ['limit' => 65535, 'default' => 0, 'null' => false]) // SMALLINT(6) + ->addColumn('prune_days', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('auth_view', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_read', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_post', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_reply', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_edit', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_delete', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_sticky', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_announce', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_vote', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_pollcreate', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_attachments', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('auth_download', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('allow_reg_tracker', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('allow_porno_topic', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('self_moderated', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('forum_parent', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('show_on_index', 'boolean', ['default' => true, 'null' => false]) + ->addColumn('forum_display_sort', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('forum_display_order', 'boolean', ['default' => false, 'null' => false]) + ->addIndex(['forum_order'], ['name' => 'forums_order']) + ->addIndex('cat_id') + ->addIndex('forum_last_post_id') + ->addIndex('forum_parent') + ->create(); + + // bb_topics + $table = $this->table('bb_topics', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'topic_id' + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED (forum_id in original is SMALLINT(8)) + ->addColumn('topic_title', 'string', ['limit' => 250, 'default' => '', 'null' => false]) + ->addColumn('topic_poster', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('topic_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('topic_views', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_replies', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_status', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('topic_vote', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('topic_type', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('topic_first_post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_last_post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_moved_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_attachment', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('topic_dl_type', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('topic_last_post_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('topic_show_first_post', 'integer', ['limit' => 255, 'signed' => false, 'default' => 0, 'null' => false]) // TINYINT(1) UNSIGNED + ->addColumn('topic_allow_robots', 'integer', ['limit' => 255, 'signed' => false, 'default' => 0, 'null' => false]) // TINYINT(1) UNSIGNED + ->addIndex('forum_id') + ->addIndex('topic_last_post_id') + ->addIndex('topic_last_post_time') + ->create(); + + // Add fulltext index for topic titles + $this->execute('ALTER TABLE bb_topics ADD FULLTEXT KEY topic_title (topic_title)'); + + // bb_posts + $table = $this->table('bb_posts', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'post_id' + ]); + $table->addColumn('post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('poster_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('post_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('poster_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('poster_rg_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('attach_rg_sig', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('post_username', 'string', ['limit' => 25, 'default' => '', 'null' => false]) + ->addColumn('post_edit_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('post_edit_count', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('post_attachment', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('user_post', 'boolean', ['default' => true, 'null' => false]) + ->addColumn('mc_comment', 'text', ['default' => '', 'null' => false]) + ->addColumn('mc_type', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('mc_user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addIndex('topic_id') + ->addIndex('poster_id') + ->addIndex('post_time') + ->addIndex(['forum_id', 'post_time'], ['name' => 'forum_id_post_time']) + ->create(); + + // bb_posts_text + $table = $this->table('bb_posts_text', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'post_id' + ]); + $table->addColumn('post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('post_text', 'text', ['limit' => 16777215, 'null' => false]) // MEDIUMTEXT + ->create(); + } + + private function createTrackerTables() + { + // bb_bt_torrents - Core torrent registry (InnoDB for reliability) + $table = $this->table('bb_bt_torrents', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'topic_id' + ]); + $table->addColumn('info_hash', 'varbinary', ['limit' => 20, 'default' => '', 'null' => false]) + ->addColumn('info_hash_v2', 'varbinary', ['limit' => 32, 'default' => '', 'null' => false]) + ->addColumn('post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('poster_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('attach_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('size', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('reg_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('call_seed_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('complete_count', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('seeder_last_seen', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('tor_status', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('checked_user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('checked_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('tor_type', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('speed_up', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('speed_down', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('last_seeder_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addIndex('post_id', ['unique' => true]) + ->addIndex('topic_id', ['unique' => true]) + ->addIndex('attach_id', ['unique' => true]) + ->addIndex('reg_time') + ->addIndex('forum_id') + ->addIndex('poster_id') + ->create(); + + // bb_bt_tracker - Active peer tracking (InnoDB for reliability) + $table = $this->table('bb_bt_tracker', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'peer_hash' + ]); + $table->addColumn('peer_hash', 'string', ['limit' => 32, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('peer_id', 'string', ['limit' => 20, 'default' => '0', 'null' => false]) + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('ip', 'string', ['limit' => 42, 'null' => true]) + ->addColumn('ipv6', 'string', ['limit' => 42, 'null' => true]) + ->addColumn('port', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('seeder', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('releaser', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('tor_type', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('uploaded', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('downloaded', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('remain', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('speed_up', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('speed_down', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('up_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('down_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('update_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('complete_percent', 'biginteger', ['default' => 0, 'null' => false]) + ->addColumn('complete', 'boolean', ['default' => false, 'null' => false]) + ->addIndex('topic_id') + ->addIndex('user_id') + ->create(); + + // bb_bt_users - User tracker statistics + $table = $this->table('bb_bt_users', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'user_id' + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('auth_key', 'char', ['limit' => 20, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('u_up_total', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('u_down_total', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('u_up_release', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('u_up_bonus', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('up_today', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('down_today', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('up_release_today', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('up_bonus_today', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('points_today', 'float', ['precision' => 16, 'scale' => 2, 'signed' => false, 'default' => 0.00, 'null' => false]) + ->addColumn('up_yesterday', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('down_yesterday', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('up_release_yesterday', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('up_bonus_yesterday', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('points_yesterday', 'float', ['precision' => 16, 'scale' => 2, 'signed' => false, 'default' => 0.00, 'null' => false]) + ->addColumn('ratio_nulled', 'boolean', ['default' => false, 'null' => false]) + ->addIndex('auth_key', ['unique' => true]) + ->create(); + + // Snapshot tables + $this->createSnapshotTables(); + } + + private function createSnapshotTables() + { + // bb_bt_tracker_snap - Tracker snapshot + $table = $this->table('bb_bt_tracker_snap', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'topic_id' + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('seeders', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('leechers', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('speed_up', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('speed_down', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('completed', 'integer', ['default' => 0, 'null' => false]) // INT(10) - using default Phinx INT + ->create(); + + // bb_bt_dlstatus_snap - Download status snapshot + $table = $this->table('bb_bt_dlstatus_snap', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('dl_status', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('users_count', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addIndex('topic_id') + ->create(); + + // buf_topic_view - Topic view buffer + $table = $this->table('buf_topic_view', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'topic_id' + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('topic_views', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->create(); + + // buf_last_seeder - Last seeder buffer + $table = $this->table('buf_last_seeder', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'topic_id' + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('seeder_last_seen', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->create(); + } + + private function createSystemTables() + { + // bb_config - Main configuration + $table = $this->table('bb_config', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'config_name' + ]); + $table->addColumn('config_name', 'string', ['limit' => 155, 'default' => '', 'null' => false]) + ->addColumn('config_value', 'text', ['null' => false]) + ->create(); + + // bb_cron - Scheduled tasks + $table = $this->table('bb_cron', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'cron_id' + ]); + $table->addColumn('cron_id', 'integer', ['limit' => 65535, 'signed' => false, 'identity' => true]) // SMALLINT UNSIGNED + ->addColumn('cron_active', 'integer', ['limit' => 255, 'default' => 1, 'null' => false]) // TINYINT + ->addColumn('cron_title', 'char', ['limit' => 120, 'default' => '', 'null' => false]) + ->addColumn('cron_script', 'char', ['limit' => 120, 'default' => '', 'null' => false]) + ->addColumn('schedule', 'enum', ['values' => ['hourly', 'daily', 'weekly', 'monthly', 'interval'], 'default' => 'daily', 'null' => false]) + ->addColumn('run_day', 'enum', ['values' => array_map('strval', range(1, 28)), 'null' => true]) + ->addColumn('run_time', 'time', ['default' => '04:00:00']) + ->addColumn('run_order', 'integer', ['limit' => 255, 'signed' => false, 'default' => 0, 'null' => false]) // TINYINT UNSIGNED + ->addColumn('last_run', 'datetime', ['default' => '1900-01-01 00:00:00', 'null' => false]) + ->addColumn('next_run', 'datetime', ['default' => '1900-01-01 00:00:00', 'null' => false]) + ->addColumn('run_interval', 'time', ['null' => true, 'default' => '00:00:00']) + ->addColumn('log_enabled', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('log_file', 'char', ['limit' => 120, 'default' => '', 'null' => false]) + ->addColumn('log_sql_queries', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('disable_board', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('run_counter', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addIndex('cron_title', ['unique' => true, 'name' => 'title']) + ->addIndex('cron_script', ['unique' => true, 'name' => 'script']) + ->create(); + + // bb_sessions - User sessions + $table = $this->table('bb_sessions', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'session_id' + ]); + $table->addColumn('session_id', 'char', ['limit' => 255, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('session_user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('session_start', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('session_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('session_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('session_logged_in', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('session_admin', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->create(); + } + + private function createAttachmentTables() + { + // bb_attachments + $table = $this->table('bb_attachments', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['attach_id', 'post_id'] + ]); + $table->addColumn('attach_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id_1', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->create(); + + // bb_attachments_desc + $table = $this->table('bb_attachments_desc', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'attach_id' + ]); + $table->addColumn('attach_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('physical_filename', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('real_filename', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('download_count', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('comment', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('extension', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('mimetype', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('filesize', 'integer', ['limit' => 20, 'default' => 0, 'null' => false]) + ->addColumn('filetime', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('thumbnail', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('tracker_status', 'boolean', ['default' => false, 'null' => false]) + ->addIndex('filetime') + ->addIndex('filesize') + ->addIndex(['physical_filename'], ['name' => 'physical_filename', 'limit' => ['physical_filename' => 10]]) + ->create(); + + // bb_extensions + $table = $this->table('bb_extensions', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'ext_id' + ]); + $table->addColumn('ext_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('group_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('extension', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('comment', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->create(); + + // bb_extension_groups + $table = $this->table('bb_extension_groups', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'group_id' + ]); + $table->addColumn('group_id', 'integer', ['limit' => 16777215, 'identity' => true]) // MEDIUMINT + ->addColumn('group_name', 'string', ['limit' => 20, 'default' => '', 'null' => false]) + ->addColumn('cat_id', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('allow_group', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('download_mode', 'integer', ['limit' => 255, 'signed' => false, 'default' => 1, 'null' => false]) // TINYINT UNSIGNED + ->addColumn('upload_icon', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('max_filesize', 'integer', ['limit' => 20, 'default' => 0, 'null' => false]) + ->addColumn('forum_permissions', 'text', ['null' => false]) + ->create(); + } + + private function createUserTables() + { + // bb_users + $table = $this->table('bb_users', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'user_id' + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'identity' => true]) // MEDIUMINT + ->addColumn('user_active', 'boolean', ['default' => true, 'null' => false]) + ->addColumn('username', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('user_password', 'string', ['limit' => 255, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('user_session_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_lastvisit', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_last_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('user_regdate', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_reg_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('user_level', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('user_posts', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_timezone', 'decimal', ['precision' => 5, 'scale' => 2, 'default' => 0.00, 'null' => false]) + ->addColumn('user_lang', 'string', ['limit' => 255, 'default' => 'en', 'null' => false]) + ->addColumn('user_new_privmsg', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('user_unread_privmsg', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('user_last_privmsg', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_opt', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('user_rank', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('avatar_ext_id', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT(4) + ->addColumn('user_gender', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('user_birthday', 'date', ['default' => '1900-01-01', 'null' => false]) + ->addColumn('user_email', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('user_skype', 'string', ['limit' => 32, 'default' => '', 'null' => false]) + ->addColumn('user_twitter', 'string', ['limit' => 15, 'default' => '', 'null' => false]) + ->addColumn('user_icq', 'string', ['limit' => 15, 'default' => '', 'null' => false]) + ->addColumn('user_website', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('user_from', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('user_sig', 'text', ['default' => '', 'null' => false]) + ->addColumn('user_occ', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('user_interests', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('user_actkey', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('user_newpasswd', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('autologin_id', 'string', ['limit' => 255, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('user_newest_pm_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('user_points', 'float', ['precision' => 16, 'scale' => 2, 'default' => 0.00, 'null' => false]) + ->addColumn('tpl_name', 'string', ['limit' => 255, 'default' => 'default', 'null' => false]) + ->addIndex(['username'], ['name' => 'username', 'limit' => ['username' => 10]]) + ->addIndex(['user_email'], ['name' => 'user_email', 'limit' => ['user_email' => 10]]) + ->addIndex('user_level') + ->create(); + + // bb_groups + $table = $this->table('bb_groups', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'group_id' + ]); + $table->addColumn('group_id', 'integer', ['limit' => 16777215, 'identity' => true]) // MEDIUMINT + ->addColumn('avatar_ext_id', 'integer', ['default' => 0, 'null' => false]) // INT(15) - using default Phinx INT + ->addColumn('group_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('mod_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('group_type', 'integer', ['limit' => 255, 'default' => 1, 'null' => false]) // TINYINT + ->addColumn('release_group', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('group_name', 'string', ['limit' => 40, 'default' => '', 'null' => false]) + ->addColumn('group_description', 'text', ['default' => '', 'null' => false]) + ->addColumn('group_signature', 'text', ['default' => '', 'null' => false]) + ->addColumn('group_moderator', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('group_single_user', 'boolean', ['default' => true, 'null' => false]) + ->addIndex('group_single_user') + ->create(); + + // bb_user_group + $table = $this->table('bb_user_group', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['group_id', 'user_id'] + ]); + $table->addColumn('group_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('user_pending', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('user_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addIndex('user_id') + ->create(); + + // bb_ranks + $table = $this->table('bb_ranks', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'rank_id' + ]); + $table->addColumn('rank_id', 'integer', ['limit' => 65535, 'signed' => false, 'identity' => true]) // SMALLINT UNSIGNED + ->addColumn('rank_title', 'string', ['limit' => 50, 'default' => '', 'null' => false]) + ->addColumn('rank_image', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('rank_style', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->create(); + } + + private function createCacheTables() + { + // Additional tracker-related tables + $tables = [ + 'bb_bt_dlstatus', + 'bb_bt_torstat', + 'bb_bt_tor_dl_stat', + 'bb_bt_last_torstat', + 'bb_bt_last_userstat', + 'bb_bt_torhelp', + 'bb_bt_user_settings' + ]; + + // Create these tables with InnoDB engine + $this->createRemainingTrackerTables(); + + // Create remaining system tables + $this->createRemainingSystemTables(); + } + + private function createRemainingTrackerTables() + { + // bb_bt_dlstatus - Download status tracking + $table = $this->table('bb_bt_dlstatus', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['user_id', 'topic_id'] + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_status', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('last_modified_dlstatus', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'null' => false]) + ->addIndex('topic_id') + ->create(); + + // bb_bt_torstat - Torrent statistics per user + $table = $this->table('bb_bt_torstat', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'user_id'] + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('last_modified_torstat', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'null' => false]) + ->addColumn('completed', 'boolean', ['default' => false, 'null' => false]) + ->create(); + + // bb_bt_tor_dl_stat - Torrent download statistics + $table = $this->table('bb_bt_tor_dl_stat', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'user_id'] + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('attach_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('t_up_total', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('t_down_total', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('t_bonus_total', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->create(); + + // bb_bt_last_torstat - Last torrent statistics + $table = $this->table('bb_bt_last_torstat', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'user_id'] + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('dl_status', 'boolean', ['default' => false, 'null' => false]) + ->addColumn('up_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('down_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('release_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('bonus_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('speed_up', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('speed_down', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->create(); + + // bb_bt_last_userstat - Last user statistics + $table = $this->table('bb_bt_last_userstat', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'user_id' + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('up_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('down_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('release_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('bonus_add', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('speed_up', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->addColumn('speed_down', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->create(); + + // bb_bt_torhelp - Torrent help system + $table = $this->table('bb_bt_torhelp', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'user_id' + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('topic_id_csv', 'text', ['null' => false]) + ->create(); + + // bb_bt_user_settings - User tracker preferences + $table = $this->table('bb_bt_user_settings', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'user_id' + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('tor_search_set', 'text', ['null' => false]) + ->addColumn('last_modified', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->create(); + + // bb_thx - Thanks/voting system + $table = $this->table('bb_thx', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'user_id'] + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->create(); + } + + private function createRemainingSystemTables() + { + // Additional system tables + $this->createMessagingTables(); + $this->createSearchTables(); + $this->createMiscTables(); + } + + private function createMessagingTables() + { + // bb_privmsgs - Private messages + $table = $this->table('bb_privmsgs', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'privmsgs_id' + ]); + $table->addColumn('privmsgs_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('privmsgs_type', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('privmsgs_subject', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->addColumn('privmsgs_from_userid', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('privmsgs_to_userid', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('privmsgs_date', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('privmsgs_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addIndex('privmsgs_from_userid') + ->addIndex('privmsgs_to_userid') + ->create(); + + // bb_privmsgs_text - Private message content + $table = $this->table('bb_privmsgs_text', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'privmsgs_text_id' + ]); + $table->addColumn('privmsgs_text_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('privmsgs_text', 'text', ['limit' => 16777215, 'null' => false]) // MEDIUMTEXT + ->create(); + } + + private function createSearchTables() + { + // bb_posts_search - Search index for posts + $table = $this->table('bb_posts_search', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'post_id' + ]); + $table->addColumn('post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('search_words', 'text', ['null' => false]) + ->create(); + + // Add fulltext index + $this->execute('ALTER TABLE bb_posts_search ADD FULLTEXT KEY search_words (search_words)'); + + // bb_posts_html - Cached HTML posts + $table = $this->table('bb_posts_html', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'post_id' + ]); + $table->addColumn('post_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('post_html_time', 'timestamp', ['default' => 'CURRENT_TIMESTAMP', 'update' => 'CURRENT_TIMESTAMP', 'null' => false]) + ->addColumn('post_html', 'text', ['limit' => 16777215, 'default' => '', 'null' => false]) // MEDIUMTEXT + ->create(); + + // bb_search_results - Search result cache + $table = $this->table('bb_search_results', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['session_id', 'search_type'] + ]); + $table->addColumn('session_id', 'char', ['limit' => 255, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('search_type', 'integer', ['limit' => 255, 'default' => 0, 'null' => false]) // TINYINT + ->addColumn('search_id', 'string', ['limit' => 255, 'collation' => 'utf8_bin', 'default' => '', 'null' => false]) + ->addColumn('search_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('search_settings', 'text', ['null' => false]) + ->addColumn('search_array', 'text', ['null' => false]) + ->create(); + + // bb_search_rebuild - Search rebuild status + $table = $this->table('bb_search_rebuild', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'rebuild_session_id' + ]); + $table->addColumn('rebuild_session_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('start_post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('end_post_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('start_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('end_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('last_cycle_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('session_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('session_posts', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('session_cycles', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('search_size', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('rebuild_session_status', 'boolean', ['default' => false, 'null' => false]) + ->create(); + } + + private function createMiscTables() + { + // bb_smilies - Emoticons + $table = $this->table('bb_smilies', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'smilies_id' + ]); + $table->addColumn('smilies_id', 'integer', ['limit' => 65535, 'signed' => false, 'identity' => true]) // SMALLINT UNSIGNED + ->addColumn('code', 'string', ['limit' => 50, 'default' => '', 'null' => false]) + ->addColumn('smile_url', 'string', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('emoticon', 'string', ['limit' => 75, 'default' => '', 'null' => false]) + ->create(); + + // bb_words - Word censoring + $table = $this->table('bb_words', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'word_id' + ]); + $table->addColumn('word_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('word', 'char', ['limit' => 100, 'default' => '', 'null' => false]) + ->addColumn('replacement', 'char', ['limit' => 100, 'default' => '', 'null' => false]) + ->create(); + + // bb_banlist - User bans + $table = $this->table('bb_banlist', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['ban_id', 'ban_userid'] + ]); + $table->addColumn('ban_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('ban_userid', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('ban_reason', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->create(); + + // bb_disallow - Disallowed usernames + $table = $this->table('bb_disallow', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'disallow_id' + ]); + $table->addColumn('disallow_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('disallow_username', 'string', ['limit' => 25, 'default' => '', 'null' => false]) + ->create(); + + // Additional utility tables + $this->createUtilityTables(); + } + + private function createUtilityTables() + { + // bb_log - Action logging + $table = $this->table('bb_log', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false + ]); + $table->addColumn('log_type_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('log_user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('log_user_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('log_forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('log_forum_id_new', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('log_topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('log_topic_id_new', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('log_topic_title', 'string', ['limit' => 250, 'default' => '', 'null' => false]) + ->addColumn('log_topic_title_new', 'string', ['limit' => 250, 'default' => '', 'null' => false]) + ->addColumn('log_time', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('log_msg', 'text', ['null' => false]) + ->addIndex('log_time') + ->create(); + + // Add fulltext index + $this->execute('ALTER TABLE bb_log ADD FULLTEXT KEY log_topic_title (log_topic_title)'); + + // bb_poll_votes - Poll voting + $table = $this->table('bb_poll_votes', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'vote_id'] + ]); + $table->addColumn('topic_id', 'integer', ['signed' => false, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('vote_id', 'integer', ['limit' => 255, 'signed' => false, 'null' => false]) // TINYINT UNSIGNED + ->addColumn('vote_text', 'string', ['limit' => 255, 'null' => false]) + ->addColumn('vote_result', 'integer', ['limit' => 16777215, 'signed' => false, 'null' => false]) // MEDIUMINT UNSIGNED + ->create(); + + // bb_poll_users - Poll participation + $table = $this->table('bb_poll_users', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['topic_id', 'user_id'] + ]); + $table->addColumn('topic_id', 'integer', ['signed' => false, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'null' => false]) // MEDIUMINT + ->addColumn('vote_ip', 'string', ['limit' => 42, 'default' => '0', 'null' => false]) + ->addColumn('vote_dt', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->create(); + + // bb_topics_watch - Topic watching + $table = $this->table('bb_topics_watch', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false + ]); + $table->addColumn('topic_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('notify_status', 'boolean', ['default' => false, 'null' => false]) + ->addIndex('topic_id') + ->addIndex('user_id') + ->addIndex('notify_status') + ->create(); + + // bb_topic_tpl - Topic templates + $table = $this->table('bb_topic_tpl', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'tpl_id' + ]); + $table->addColumn('tpl_id', 'integer', ['limit' => 65535, 'identity' => true]) // SMALLINT(6) + ->addColumn('tpl_name', 'string', ['limit' => 60, 'default' => '', 'null' => false]) + ->addColumn('tpl_src_form', 'text', ['null' => false]) + ->addColumn('tpl_src_title', 'text', ['null' => false]) + ->addColumn('tpl_src_msg', 'text', ['null' => false]) + ->addColumn('tpl_comment', 'text', ['null' => false]) + ->addColumn('tpl_rules_post_id', 'integer', ['signed' => false, 'default' => 0, 'null' => false]) // INT UNSIGNED (using default Phinx INT) + ->addColumn('tpl_last_edit_tm', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addColumn('tpl_last_edit_by', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addIndex('tpl_name', ['unique' => true]) + ->create(); + + // Remaining attachment tables + $this->createRemainingAttachmentTables(); + + // Auth tables + $this->createAuthTables(); + } + + private function createRemainingAttachmentTables() + { + // bb_attachments_config + $table = $this->table('bb_attachments_config', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'config_name' + ]); + $table->addColumn('config_name', 'string', ['limit' => 155, 'default' => '', 'null' => false]) + ->addColumn('config_value', 'string', ['limit' => 255, 'default' => '', 'null' => false]) + ->create(); + + // bb_attach_quota + $table = $this->table('bb_attach_quota', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('group_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addColumn('quota_type', 'integer', ['limit' => 65535, 'default' => 0, 'null' => false]) // SMALLINT + ->addColumn('quota_limit_id', 'integer', ['limit' => 16777215, 'signed' => false, 'default' => 0, 'null' => false]) // MEDIUMINT UNSIGNED + ->addIndex('quota_type') + ->create(); + + // bb_quota_limits + $table = $this->table('bb_quota_limits', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => 'quota_limit_id' + ]); + $table->addColumn('quota_limit_id', 'integer', ['limit' => 16777215, 'signed' => false, 'identity' => true]) // MEDIUMINT UNSIGNED + ->addColumn('quota_desc', 'string', ['limit' => 20, 'default' => '', 'null' => false]) + ->addColumn('quota_limit', 'biginteger', ['signed' => false, 'default' => 0, 'null' => false]) + ->create(); + } + + private function createAuthTables() + { + // bb_auth_access + $table = $this->table('bb_auth_access', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['group_id', 'forum_id'] + ]); + $table->addColumn('group_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT + ->addColumn('forum_id', 'integer', ['limit' => 65535, 'signed' => false, 'default' => 0, 'null' => false]) // SMALLINT UNSIGNED + ->addColumn('forum_perm', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->addIndex('forum_id') + ->create(); + + // bb_auth_access_snap + $table = $this->table('bb_auth_access_snap', [ + 'engine' => 'InnoDB', + 'collation' => 'utf8mb4_unicode_ci', + 'id' => false, + 'primary_key' => ['user_id', 'forum_id'] + ]); + $table->addColumn('user_id', 'integer', ['limit' => 16777215, 'default' => 0, 'null' => false]) // MEDIUMINT(9) + ->addColumn('forum_id', 'integer', ['limit' => 65535, 'default' => 0, 'null' => false]) // SMALLINT(6) + ->addColumn('forum_perm', 'integer', ['default' => 0, 'null' => false]) // INT(11) - using default Phinx INT + ->create(); + } + + public function down() + { + // Drop all tables in reverse dependency order + $this->execute('SET FOREIGN_KEY_CHECKS = 0'); + + $tables = [ + 'bb_auth_access_snap', 'bb_auth_access', 'bb_quota_limits', 'bb_attach_quota', + 'bb_attachments_config', 'bb_topic_tpl', 'bb_topics_watch', 'bb_poll_users', + 'bb_poll_votes', 'bb_log', 'bb_disallow', 'bb_banlist', 'bb_words', + 'bb_smilies', 'bb_search_rebuild', 'bb_search_results', 'bb_posts_html', + 'bb_posts_search', 'bb_privmsgs_text', 'bb_privmsgs', 'bb_bt_user_settings', + 'bb_bt_torhelp', 'bb_bt_last_userstat', 'bb_bt_last_torstat', 'bb_bt_tor_dl_stat', + 'bb_bt_torstat', 'bb_bt_dlstatus', 'bb_thx', 'buf_last_seeder', 'buf_topic_view', + 'bb_bt_dlstatus_snap', 'bb_bt_tracker_snap', 'bb_bt_users', 'bb_bt_tracker', + 'bb_bt_torrents', 'bb_sessions', 'bb_cron', 'bb_config', 'bb_ranks', 'bb_user_group', + 'bb_groups', 'bb_users', 'bb_extension_groups', 'bb_extensions', 'bb_attachments_desc', + 'bb_attachments', 'bb_posts_text', 'bb_posts', 'bb_topics', 'bb_forums', 'bb_categories' + ]; + + foreach ($tables as $table) { + $this->table($table)->drop()->save(); + } + + $this->execute('SET FOREIGN_KEY_CHECKS = 1'); + } +} diff --git a/migrations/20250619000002_seed_initial_data.php b/migrations/20250619000002_seed_initial_data.php new file mode 100644 index 000000000..2c3b948bc --- /dev/null +++ b/migrations/20250619000002_seed_initial_data.php @@ -0,0 +1,968 @@ +seedCategories(); + $this->seedForums(); + $this->seedUsers(); + $this->seedBtUsers(); + $this->seedConfiguration(); + $this->seedCronJobs(); + $this->seedExtensions(); + $this->seedSmilies(); + $this->seedRanks(); + $this->seedQuotaLimits(); + $this->seedDisallowedUsernames(); + $this->seedAttachmentConfig(); + $this->seedTopicsAndPosts(); + $this->seedTopicWatch(); + } + + private function seedCategories() + { + $this->table('bb_categories')->insert([ + [ + 'cat_id' => 1, + 'cat_title' => 'Your first category', + 'cat_order' => 10 + ] + ])->saveData(); + } + + private function seedForums() + { + $this->table('bb_forums')->insert([ + [ + 'forum_id' => 1, + 'cat_id' => 1, + 'forum_name' => 'Your first forum', + 'forum_desc' => 'Description of the forum.', + 'forum_status' => 0, + 'forum_order' => 10, + 'forum_posts' => 1, + 'forum_topics' => 1, + 'forum_last_post_id' => 1, + 'forum_tpl_id' => 0, + 'prune_days' => 0, + 'auth_view' => 0, + 'auth_read' => 0, + 'auth_post' => 1, + 'auth_reply' => 1, + 'auth_edit' => 1, + 'auth_delete' => 1, + 'auth_sticky' => 3, + 'auth_announce' => 3, + 'auth_vote' => 1, + 'auth_pollcreate' => 1, + 'auth_attachments' => 1, + 'auth_download' => 1, + 'allow_reg_tracker' => 0, + 'allow_porno_topic' => 0, + 'self_moderated' => 0, + 'forum_parent' => 0, + 'show_on_index' => 1, + 'forum_display_sort' => 0, + 'forum_display_order' => 0 + ] + ])->saveData(); + } + + private function seedUsers() + { + $this->table('bb_users')->insert([ + [ + 'user_id' => -1, + 'user_active' => 0, + 'username' => 'Guest', + 'user_password' => '$2y$10$sfZSmqPio8mxxFQLRRXaFuVMkFKZARRz/RzqddfYByN3M53.CEe.O', + 'user_session_time' => 0, + 'user_lastvisit' => 0, + 'user_last_ip' => '0', + 'user_regdate' => time(), + 'user_reg_ip' => '0', + 'user_level' => 0, + 'user_posts' => 0, + 'user_timezone' => 0.00, + 'user_lang' => 'en', + 'user_new_privmsg' => 0, + 'user_unread_privmsg' => 0, + 'user_last_privmsg' => 0, + 'user_opt' => 0, + 'user_rank' => 0, + 'avatar_ext_id' => 0, + 'user_gender' => 0, + 'user_birthday' => '1900-01-01', + 'user_email' => '', + 'user_skype' => '', + 'user_twitter' => '', + 'user_icq' => '', + 'user_website' => '', + 'user_from' => '', + 'user_sig' => '', + 'user_occ' => '', + 'user_interests' => '', + 'user_actkey' => '', + 'user_newpasswd' => '', + 'autologin_id' => '', + 'user_newest_pm_id' => 0, + 'user_points' => 0.00, + 'tpl_name' => 'default' + ], + [ + 'user_id' => -746, + 'user_active' => 0, + 'username' => 'bot', + 'user_password' => '$2y$10$sfZSmqPio8mxxFQLRRXaFuVMkFKZARRz/RzqddfYByN3M53.CEe.O', + 'user_session_time' => 0, + 'user_lastvisit' => 0, + 'user_last_ip' => '0', + 'user_regdate' => time(), + 'user_reg_ip' => '0', + 'user_level' => 0, + 'user_posts' => 0, + 'user_timezone' => 0.00, + 'user_lang' => 'en', + 'user_new_privmsg' => 0, + 'user_unread_privmsg' => 0, + 'user_last_privmsg' => 0, + 'user_opt' => 144, + 'user_rank' => 0, + 'avatar_ext_id' => 0, + 'user_gender' => 0, + 'user_birthday' => '1900-01-01', + 'user_email' => 'bot@torrentpier.com', + 'user_skype' => '', + 'user_twitter' => '', + 'user_icq' => '', + 'user_website' => '', + 'user_from' => '', + 'user_sig' => '', + 'user_occ' => '', + 'user_interests' => '', + 'user_actkey' => '', + 'user_newpasswd' => '', + 'autologin_id' => '', + 'user_newest_pm_id' => 0, + 'user_points' => 0.00, + 'tpl_name' => 'default' + ], + [ + 'user_id' => 2, + 'user_active' => 1, + 'username' => 'admin', + 'user_password' => '$2y$10$QeekUGqdfMO0yp7AT7la8OhgbiNBoJ627BO38MdS1h5kY7oX6UUKu', + 'user_session_time' => 0, + 'user_lastvisit' => 0, + 'user_last_ip' => '0', + 'user_regdate' => time(), + 'user_reg_ip' => '0', + 'user_level' => 1, + 'user_posts' => 1, + 'user_timezone' => 0.00, + 'user_lang' => 'en', + 'user_new_privmsg' => 0, + 'user_unread_privmsg' => 0, + 'user_last_privmsg' => 0, + 'user_opt' => 304, + 'user_rank' => 1, + 'avatar_ext_id' => 0, + 'user_gender' => 0, + 'user_birthday' => '1900-01-01', + 'user_email' => 'admin@torrentpier.com', + 'user_skype' => '', + 'user_twitter' => '', + 'user_icq' => '', + 'user_website' => '', + 'user_from' => '', + 'user_sig' => '', + 'user_occ' => '', + 'user_interests' => '', + 'user_actkey' => '', + 'user_newpasswd' => '', + 'autologin_id' => '', + 'user_newest_pm_id' => 0, + 'user_points' => 0.00, + 'tpl_name' => 'default' + ] + ])->saveData(); + } + + private function seedBtUsers() + { + $this->table('bb_bt_users')->insert([ + [ + 'user_id' => -1, + 'auth_key' => substr(md5(rand()), 0, 20) + ], + [ + 'user_id' => -746, + 'auth_key' => substr(md5(rand()), 0, 20) + ], + [ + 'user_id' => 2, + 'auth_key' => substr(md5(rand()), 0, 20) + ] + ])->saveData(); + } + + private function seedConfiguration() + { + $currentTime = time(); + + $configs = [ + ['config_name' => 'allow_autologin', 'config_value' => '1'], + ['config_name' => 'allow_bbcode', 'config_value' => '1'], + ['config_name' => 'allow_namechange', 'config_value' => '0'], + ['config_name' => 'allow_sig', 'config_value' => '1'], + ['config_name' => 'allow_smilies', 'config_value' => '1'], + ['config_name' => 'board_disable', 'config_value' => '0'], + ['config_name' => 'board_startdate', 'config_value' => (string)$currentTime], + ['config_name' => 'board_timezone', 'config_value' => '0'], + ['config_name' => 'bonus_upload', 'config_value' => ''], + ['config_name' => 'bonus_upload_price', 'config_value' => ''], + ['config_name' => 'birthday_enabled', 'config_value' => '1'], + ['config_name' => 'birthday_max_age', 'config_value' => '99'], + ['config_name' => 'birthday_min_age', 'config_value' => '10'], + ['config_name' => 'birthday_check_day', 'config_value' => '7'], + ['config_name' => 'bt_add_auth_key', 'config_value' => '1'], + ['config_name' => 'bt_allow_spmode_change', 'config_value' => '1'], + ['config_name' => 'bt_announce_url', 'config_value' => 'https://localhost/bt/announce.php'], + ['config_name' => 'bt_disable_dht', 'config_value' => '0'], + ['config_name' => 'bt_check_announce_url', 'config_value' => '0'], + ['config_name' => 'bt_del_addit_ann_urls', 'config_value' => '1'], + ['config_name' => 'bt_dl_list_only_1st_page', 'config_value' => '1'], + ['config_name' => 'bt_dl_list_only_count', 'config_value' => '1'], + ['config_name' => 'bt_newtopic_auto_reg', 'config_value' => '1'], + ['config_name' => 'bt_replace_ann_url', 'config_value' => '1'], + ['config_name' => 'bt_search_bool_mode', 'config_value' => '1'], + ['config_name' => 'bt_set_dltype_on_tor_reg', 'config_value' => '1'], + ['config_name' => 'bt_show_dl_but_cancel', 'config_value' => '1'], + ['config_name' => 'bt_show_dl_but_compl', 'config_value' => '1'], + ['config_name' => 'bt_show_dl_but_down', 'config_value' => '0'], + ['config_name' => 'bt_show_dl_but_will', 'config_value' => '1'], + ['config_name' => 'bt_show_dl_list', 'config_value' => '0'], + ['config_name' => 'bt_show_dl_list_buttons', 'config_value' => '1'], + ['config_name' => 'bt_show_dl_stat_on_index', 'config_value' => '1'], + ['config_name' => 'bt_show_ip_only_moder', 'config_value' => '1'], + ['config_name' => 'bt_show_peers', 'config_value' => '1'], + ['config_name' => 'bt_show_peers_mode', 'config_value' => '1'], + ['config_name' => 'bt_show_port_only_moder', 'config_value' => '1'], + ['config_name' => 'bt_tor_browse_only_reg', 'config_value' => '0'], + ['config_name' => 'bt_unset_dltype_on_tor_unreg', 'config_value' => '1'], + ['config_name' => 'cron_last_check', 'config_value' => '0'], + ['config_name' => 'default_dateformat', 'config_value' => 'Y-m-d H:i'], + ['config_name' => 'default_lang', 'config_value' => 'en'], + ['config_name' => 'flood_interval', 'config_value' => '15'], + ['config_name' => 'hot_threshold', 'config_value' => '300'], + ['config_name' => 'login_reset_time', 'config_value' => '30'], + ['config_name' => 'max_autologin_time', 'config_value' => '10'], + ['config_name' => 'max_login_attempts', 'config_value' => '5'], + ['config_name' => 'max_poll_options', 'config_value' => '6'], + ['config_name' => 'max_sig_chars', 'config_value' => '255'], + ['config_name' => 'posts_per_page', 'config_value' => '15'], + ['config_name' => 'prune_enable', 'config_value' => '1'], + ['config_name' => 'record_online_date', 'config_value' => (string)$currentTime], + ['config_name' => 'record_online_users', 'config_value' => '0'], + ['config_name' => 'seed_bonus_enabled', 'config_value' => '1'], + ['config_name' => 'seed_bonus_release', 'config_value' => ''], + ['config_name' => 'seed_bonus_points', 'config_value' => ''], + ['config_name' => 'seed_bonus_tor_size', 'config_value' => '0'], + ['config_name' => 'seed_bonus_user_regdate', 'config_value' => '0'], + ['config_name' => 'site_desc', 'config_value' => 'Bull-powered BitTorrent tracker engine'], + ['config_name' => 'sitemap_time', 'config_value' => ''], + ['config_name' => 'sitename', 'config_value' => 'TorrentPier'], + ['config_name' => 'smilies_path', 'config_value' => 'styles/images/smiles'], + ['config_name' => 'static_sitemap', 'config_value' => ''], + ['config_name' => 'topics_per_page', 'config_value' => '50'], + ['config_name' => 'xs_use_cache', 'config_value' => '1'], + ['config_name' => 'cron_check_interval', 'config_value' => '180'], + ['config_name' => 'magnet_links_enabled', 'config_value' => '1'], + ['config_name' => 'magnet_links_for_guests', 'config_value' => '0'], + ['config_name' => 'gender', 'config_value' => '1'], + ['config_name' => 'callseed', 'config_value' => '0'], + ['config_name' => 'tor_stats', 'config_value' => '1'], + ['config_name' => 'show_latest_news', 'config_value' => '1'], + ['config_name' => 'max_news_title', 'config_value' => '50'], + ['config_name' => 'latest_news_count', 'config_value' => '5'], + ['config_name' => 'latest_news_forum_id', 'config_value' => '1'], + ['config_name' => 'show_network_news', 'config_value' => '1'], + ['config_name' => 'max_net_title', 'config_value' => '50'], + ['config_name' => 'network_news_count', 'config_value' => '5'], + ['config_name' => 'network_news_forum_id', 'config_value' => '2'], + ['config_name' => 'whois_info', 'config_value' => 'https://whatismyipaddress.com/ip/'], + ['config_name' => 'show_mod_index', 'config_value' => '0'], + ['config_name' => 'premod', 'config_value' => '0'], + ['config_name' => 'tor_comment', 'config_value' => '1'], + ['config_name' => 'terms', 'config_value' => ''], + ['config_name' => 'show_board_start_index', 'config_value' => '1'] + ]; + + $this->table('bb_config')->insert($configs)->saveData(); + } + + private function seedCronJobs() + { + $cronJobs = [ + [ + 'cron_active' => 1, + 'cron_title' => 'Attach maintenance', + 'cron_script' => 'attach_maintenance.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 40, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Board maintenance', + 'cron_script' => 'board_maintenance.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 40, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Prune forums', + 'cron_script' => 'prune_forums.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 50, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Prune topic moved stubs', + 'cron_script' => 'prune_topic_moved.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 60, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Logs cleanup', + 'cron_script' => 'clean_log.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 70, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'PM cleanup', + 'cron_script' => 'clean_pm.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 70, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Tracker maintenance', + 'cron_script' => 'tr_maintenance.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 90, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Clean dlstat', + 'cron_script' => 'clean_dlstat.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 100, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Prune inactive users', + 'cron_script' => 'prune_inactive_users.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 110, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 1, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Sessions cleanup', + 'cron_script' => 'sessions_cleanup.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:03:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'DS update cat_forums', + 'cron_script' => 'ds_update_cat_forums.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:05:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'DS update stats', + 'cron_script' => 'ds_update_stats.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:10:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Flash topic view', + 'cron_script' => 'flash_topic_view.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:10:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Clean search results', + 'cron_script' => 'clean_search_results.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:10:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Tracker cleanup and dlstat', + 'cron_script' => 'tr_cleanup_and_dlstat.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 20, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:15:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Accrual seedbonus', + 'cron_script' => 'tr_seed_bonus.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 25, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:10:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Make tracker snapshot', + 'cron_script' => 'tr_make_snapshot.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 10, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:10:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Seeder last seen', + 'cron_script' => 'tr_update_seeder_last_seen.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '01:00:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Tracker dl-complete count', + 'cron_script' => 'tr_complete_count.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '06:00:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Sitemap update', + 'cron_script' => 'sitemap.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '06:00:00', + 'run_order' => 30, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Update forums atom', + 'cron_script' => 'update_forums_atom.php', + 'schedule' => 'interval', + 'run_day' => null, + 'run_time' => '04:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => '00:15:00', + 'log_enabled' => 0, + 'log_file' => '', + 'log_sql_queries' => 0, + 'disable_board' => 0, + 'run_counter' => 0 + ], + [ + 'cron_active' => 1, + 'cron_title' => 'Demo mode', + 'cron_script' => 'demo_mode.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 1, + 'log_file' => 'demo_mode_cron', + 'log_sql_queries' => 1, + 'disable_board' => 1, + 'run_counter' => 0 + ] + ]; + + $this->table('bb_cron')->insert($cronJobs)->saveData(); + } + + private function seedExtensions() + { + // Extension groups + $groups = [ + ['group_name' => 'Images', 'cat_id' => 1, 'allow_group' => 1, 'download_mode' => 1, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''], + ['group_name' => 'Archives', 'cat_id' => 0, 'allow_group' => 1, 'download_mode' => 1, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''], + ['group_name' => 'Plain text', 'cat_id' => 0, 'allow_group' => 1, 'download_mode' => 1, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''], + ['group_name' => 'Documents', 'cat_id' => 0, 'allow_group' => 1, 'download_mode' => 1, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''], + ['group_name' => 'Real media', 'cat_id' => 0, 'allow_group' => 0, 'download_mode' => 2, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''], + ['group_name' => 'Torrent', 'cat_id' => 0, 'allow_group' => 1, 'download_mode' => 1, 'upload_icon' => '', 'max_filesize' => 262144, 'forum_permissions' => ''] + ]; + + $this->table('bb_extension_groups')->insert($groups)->saveData(); + + // Extensions + $extensions = [ + ['group_id' => 1, 'extension' => 'gif', 'comment' => ''], + ['group_id' => 1, 'extension' => 'png', 'comment' => ''], + ['group_id' => 1, 'extension' => 'jpeg', 'comment' => ''], + ['group_id' => 1, 'extension' => 'jpg', 'comment' => ''], + ['group_id' => 1, 'extension' => 'webp', 'comment' => ''], + ['group_id' => 1, 'extension' => 'avif', 'comment' => ''], + ['group_id' => 1, 'extension' => 'bmp', 'comment' => ''], + ['group_id' => 2, 'extension' => 'gtar', 'comment' => ''], + ['group_id' => 2, 'extension' => 'gz', 'comment' => ''], + ['group_id' => 2, 'extension' => 'tar', 'comment' => ''], + ['group_id' => 2, 'extension' => 'zip', 'comment' => ''], + ['group_id' => 2, 'extension' => 'rar', 'comment' => ''], + ['group_id' => 2, 'extension' => 'ace', 'comment' => ''], + ['group_id' => 2, 'extension' => '7z', 'comment' => ''], + ['group_id' => 3, 'extension' => 'txt', 'comment' => ''], + ['group_id' => 3, 'extension' => 'c', 'comment' => ''], + ['group_id' => 3, 'extension' => 'h', 'comment' => ''], + ['group_id' => 3, 'extension' => 'cpp', 'comment' => ''], + ['group_id' => 3, 'extension' => 'hpp', 'comment' => ''], + ['group_id' => 3, 'extension' => 'diz', 'comment' => ''], + ['group_id' => 3, 'extension' => 'm3u', 'comment' => ''], + ['group_id' => 4, 'extension' => 'xls', 'comment' => ''], + ['group_id' => 4, 'extension' => 'doc', 'comment' => ''], + ['group_id' => 4, 'extension' => 'dot', 'comment' => ''], + ['group_id' => 4, 'extension' => 'pdf', 'comment' => ''], + ['group_id' => 4, 'extension' => 'ai', 'comment' => ''], + ['group_id' => 4, 'extension' => 'ps', 'comment' => ''], + ['group_id' => 4, 'extension' => 'ppt', 'comment' => ''], + ['group_id' => 5, 'extension' => 'rm', 'comment' => ''], + ['group_id' => 6, 'extension' => 'torrent', 'comment' => ''] + ]; + + $this->table('bb_extensions')->insert($extensions)->saveData(); + } + + private function seedSmilies() + { + $smilies = [ + ['code' => ':aa:', 'smile_url' => 'aa.gif', 'emoticon' => 'aa'], + ['code' => ':ab:', 'smile_url' => 'ab.gif', 'emoticon' => 'ab'], + ['code' => ':ac:', 'smile_url' => 'ac.gif', 'emoticon' => 'ac'], + ['code' => ':ae:', 'smile_url' => 'ae.gif', 'emoticon' => 'ae'], + ['code' => ':af:', 'smile_url' => 'af.gif', 'emoticon' => 'af'], + ['code' => ':ag:', 'smile_url' => 'ag.gif', 'emoticon' => 'ag'], + ['code' => ':ah:', 'smile_url' => 'ah.gif', 'emoticon' => 'ah'], + ['code' => ':ai:', 'smile_url' => 'ai.gif', 'emoticon' => 'ai'], + ['code' => ':aj:', 'smile_url' => 'aj.gif', 'emoticon' => 'aj'], + ['code' => ':ak:', 'smile_url' => 'ak.gif', 'emoticon' => 'ak'], + ['code' => ':al:', 'smile_url' => 'al.gif', 'emoticon' => 'al'], + ['code' => ':am:', 'smile_url' => 'am.gif', 'emoticon' => 'am'], + ['code' => ':an:', 'smile_url' => 'an.gif', 'emoticon' => 'an'], + ['code' => ':ao:', 'smile_url' => 'ao.gif', 'emoticon' => 'ao'], + ['code' => ':ap:', 'smile_url' => 'ap.gif', 'emoticon' => 'ap'], + ['code' => ':aq:', 'smile_url' => 'aq.gif', 'emoticon' => 'aq'], + ['code' => ':ar:', 'smile_url' => 'ar.gif', 'emoticon' => 'ar'], + ['code' => ':as:', 'smile_url' => 'as.gif', 'emoticon' => 'as'], + ['code' => ':at:', 'smile_url' => 'at.gif', 'emoticon' => 'at'], + ['code' => ':au:', 'smile_url' => 'au.gif', 'emoticon' => 'au'], + ['code' => ':av:', 'smile_url' => 'av.gif', 'emoticon' => 'av'], + ['code' => ':aw:', 'smile_url' => 'aw.gif', 'emoticon' => 'aw'], + ['code' => ':ax:', 'smile_url' => 'ax.gif', 'emoticon' => 'ax'], + ['code' => ':ay:', 'smile_url' => 'ay.gif', 'emoticon' => 'ay'], + ['code' => ':az:', 'smile_url' => 'az.gif', 'emoticon' => 'az'], + ['code' => ':ba:', 'smile_url' => 'ba.gif', 'emoticon' => 'ba'], + ['code' => ':bb:', 'smile_url' => 'bb.gif', 'emoticon' => 'bb'], + ['code' => ':bc:', 'smile_url' => 'bc.gif', 'emoticon' => 'bc'], + ['code' => ':bd:', 'smile_url' => 'bd.gif', 'emoticon' => 'bd'], + ['code' => ':be:', 'smile_url' => 'be.gif', 'emoticon' => 'be'], + ['code' => ':bf:', 'smile_url' => 'bf.gif', 'emoticon' => 'bf'], + ['code' => ':bg:', 'smile_url' => 'bg.gif', 'emoticon' => 'bg'], + ['code' => ':bh:', 'smile_url' => 'bh.gif', 'emoticon' => 'bh'], + ['code' => ':bi:', 'smile_url' => 'bi.gif', 'emoticon' => 'bi'], + ['code' => ':bj:', 'smile_url' => 'bj.gif', 'emoticon' => 'bj'], + ['code' => ':bk:', 'smile_url' => 'bk.gif', 'emoticon' => 'bk'], + ['code' => ':bl:', 'smile_url' => 'bl.gif', 'emoticon' => 'bl'], + ['code' => ':bm:', 'smile_url' => 'bm.gif', 'emoticon' => 'bm'], + ['code' => ':bn:', 'smile_url' => 'bn.gif', 'emoticon' => 'bn'], + ['code' => ':bo:', 'smile_url' => 'bo.gif', 'emoticon' => 'bo'], + ['code' => ':bp:', 'smile_url' => 'bp.gif', 'emoticon' => 'bp'], + ['code' => ':bq:', 'smile_url' => 'bq.gif', 'emoticon' => 'bq'], + ['code' => ':br:', 'smile_url' => 'br.gif', 'emoticon' => 'br'], + ['code' => ':bs:', 'smile_url' => 'bs.gif', 'emoticon' => 'bs'], + ['code' => ':bt:', 'smile_url' => 'bt.gif', 'emoticon' => 'bt'], + ['code' => ':bu:', 'smile_url' => 'bu.gif', 'emoticon' => 'bu'], + ['code' => ':bv:', 'smile_url' => 'bv.gif', 'emoticon' => 'bv'], + ['code' => ':bw:', 'smile_url' => 'bw.gif', 'emoticon' => 'bw'], + ['code' => ':bx:', 'smile_url' => 'bx.gif', 'emoticon' => 'bx'], + ['code' => ':by:', 'smile_url' => 'by.gif', 'emoticon' => 'by'], + ['code' => ':bz:', 'smile_url' => 'bz.gif', 'emoticon' => 'bz'], + ['code' => ':ca:', 'smile_url' => 'ca.gif', 'emoticon' => 'ca'], + ['code' => ':cb:', 'smile_url' => 'cb.gif', 'emoticon' => 'cb'], + ['code' => ':cc:', 'smile_url' => 'cc.gif', 'emoticon' => 'cc'], + ['code' => ':cd:', 'smile_url' => 'cd.gif', 'emoticon' => 'cd'] + ]; + + $this->table('bb_smilies')->insert($smilies)->saveData(); + } + + private function seedRanks() + { + $this->table('bb_ranks')->insert([ + [ + 'rank_title' => 'Administrator', + 'rank_image' => 'styles/images/ranks/admin.png', + 'rank_style' => 'colorAdmin' + ] + ])->saveData(); + } + + private function seedQuotaLimits() + { + $quotas = [ + ['quota_desc' => 'Low', 'quota_limit' => 262144], + ['quota_desc' => 'Medium', 'quota_limit' => 10485760], + ['quota_desc' => 'High', 'quota_limit' => 15728640] + ]; + + $this->table('bb_quota_limits')->insert($quotas)->saveData(); + } + + private function seedDisallowedUsernames() + { + $disallowed = [ + ['disallow_id' => 1, 'disallow_username' => 'torrentpier*'], + ['disallow_id' => 2, 'disallow_username' => 'tracker*'], + ['disallow_id' => 3, 'disallow_username' => 'forum*'], + ['disallow_id' => 4, 'disallow_username' => 'torrent*'], + ['disallow_id' => 5, 'disallow_username' => 'admin*'] + ]; + + $this->table('bb_disallow')->insert($disallowed)->saveData(); + } + + private function seedAttachmentConfig() + { + $attachConfig = [ + ['config_name' => 'upload_dir', 'config_value' => 'data/uploads'], + ['config_name' => 'upload_img', 'config_value' => 'styles/images/icon_clip.gif'], + ['config_name' => 'topic_icon', 'config_value' => 'styles/images/icon_clip.gif'], + ['config_name' => 'display_order', 'config_value' => '0'], + ['config_name' => 'max_filesize', 'config_value' => '262144'], + ['config_name' => 'attachment_quota', 'config_value' => '52428800'], + ['config_name' => 'max_filesize_pm', 'config_value' => '262144'], + ['config_name' => 'max_attachments', 'config_value' => '1'], + ['config_name' => 'max_attachments_pm', 'config_value' => '1'], + ['config_name' => 'disable_mod', 'config_value' => '0'], + ['config_name' => 'allow_pm_attach', 'config_value' => '1'], + ['config_name' => 'default_upload_quota', 'config_value' => '0'], + ['config_name' => 'default_pm_quota', 'config_value' => '0'], + ['config_name' => 'img_display_inlined', 'config_value' => '1'], + ['config_name' => 'img_max_width', 'config_value' => '2000'], + ['config_name' => 'img_max_height', 'config_value' => '2000'], + ['config_name' => 'img_link_width', 'config_value' => '600'], + ['config_name' => 'img_link_height', 'config_value' => '400'], + ['config_name' => 'img_create_thumbnail', 'config_value' => '1'], + ['config_name' => 'img_min_thumb_filesize', 'config_value' => '12000'] + ]; + + $this->table('bb_attachments_config')->insert($attachConfig)->saveData(); + } + + private function seedTopicsAndPosts() + { + $currentTime = time(); + + // Create welcome topic + $this->table('bb_topics')->insert([ + [ + 'topic_id' => 1, + 'forum_id' => 1, + 'topic_title' => 'Welcome to TorrentPier Cattle', + 'topic_poster' => 2, + 'topic_time' => $currentTime, + 'topic_views' => 0, + 'topic_replies' => 0, + 'topic_status' => 0, + 'topic_vote' => 0, + 'topic_type' => 0, + 'topic_first_post_id' => 1, + 'topic_last_post_id' => 1, + 'topic_moved_id' => 0, + 'topic_attachment' => 0, + 'topic_dl_type' => 0, + 'topic_last_post_time' => $currentTime, + 'topic_show_first_post' => 0, + 'topic_allow_robots' => 1 + ] + ])->saveData(); + + // Create welcome post + $this->table('bb_posts')->insert([ + [ + 'post_id' => 1, + 'topic_id' => 1, + 'forum_id' => 1, + 'poster_id' => 2, + 'post_time' => $currentTime, + 'poster_ip' => '0', + 'poster_rg_id' => 0, + 'attach_rg_sig' => 0, + 'post_username' => '', + 'post_edit_time' => 0, + 'post_edit_count' => 0, + 'post_attachment' => 0, + 'user_post' => 1, + 'mc_comment' => '', + 'mc_type' => 0, + 'mc_user_id' => 0 + ] + ])->saveData(); + + // Create welcome post text + $welcomeText = "Thank you for installing the new β€” TorrentPier Cattle!\n\n" . + "What to do next? First of all configure your site in the administration panel (link in the bottom).\n\n" . + "Change main options: site description, number of messages per topic, time zone, language by default, seed-bonus options, birthdays etc... " . + "Create a couple of forums, delete or change this one. Change settings of categories to allow registration of torrents, change announcer url. " . + "If you will have questions or want additional modifications of the engine, [url=https://torrentpier.com/]visit our forum[/url] " . + "(you can use english, we will try to help in any case).\n\n" . + "If you want to help with the translations: [url=https://crowdin.com/project/torrentpier]Crowdin[/url].\n\n" . + "Our GitHub organization: [url=https://github.com/torrentpier]https://github.com/torrentpier[/url].\n" . + "Our SourceForge repository: [url=https://sourceforge.net/projects/torrentpier-engine]https://sourceforge.net/projects/torrentpier-engine[/url].\n" . + "Our demo website: [url=https://torrentpier.duckdns.org]https://torrentpier.duckdns.org[/url].\n\n" . + "We are sure that you will be able to create the best tracker available!\n" . + "Good luck! πŸ˜‰"; + + $this->table('bb_posts_text')->insert([ + [ + 'post_id' => 1, + 'post_text' => $welcomeText + ] + ])->saveData(); + } + + private function seedTopicWatch() + { + $this->table('bb_topics_watch')->insert([ + [ + 'topic_id' => 1, + 'user_id' => 2, + 'notify_status' => 1 + ] + ])->saveData(); + } + + public function down() + { + // Clean all seeded data + $tables = [ + 'bb_topics_watch', 'bb_posts_text', 'bb_posts', 'bb_topics', + 'bb_attachments_config', 'bb_disallow', 'bb_quota_limits', + 'bb_ranks', 'bb_smilies', 'bb_extensions', 'bb_extension_groups', + 'bb_cron', 'bb_config', 'bb_bt_users', 'bb_users', 'bb_forums', 'bb_categories' + ]; + + foreach ($tables as $table) { + $this->execute("DELETE FROM {$table}"); + } + } +} diff --git a/migrations/20250620001449_remove_demo_mode.php b/migrations/20250620001449_remove_demo_mode.php new file mode 100644 index 000000000..d32f3e798 --- /dev/null +++ b/migrations/20250620001449_remove_demo_mode.php @@ -0,0 +1,44 @@ +table('bb_cron') + ->getAdapter() + ->execute("DELETE FROM bb_cron WHERE cron_script = 'demo_mode.php'"); + } + + /** + * Migrate Down. + */ + public function down(): void + { + // Restore the demo_mode.php cron job to bb_cron table + $this->table('bb_cron')->insert([ + 'cron_active' => 1, + 'cron_title' => 'Demo mode', + 'cron_script' => 'demo_mode.php', + 'schedule' => 'daily', + 'run_day' => null, + 'run_time' => '05:00:00', + 'run_order' => 255, + 'last_run' => '1900-01-01 00:00:00', + 'next_run' => '1900-01-01 00:00:00', + 'run_interval' => null, + 'log_enabled' => 1, + 'log_file' => 'demo_mode_cron', + 'log_sql_queries' => 1, + 'disable_board' => 1, + 'run_counter' => 0 + ])->save(); + } +} diff --git a/phinx.php b/phinx.php new file mode 100644 index 000000000..880494b10 --- /dev/null +++ b/phinx.php @@ -0,0 +1,74 @@ +load(); +} + +// Helper function for environment variables +function env(string $key, mixed $default = null): mixed +{ + $value = $_ENV[$key] ?? getenv($key); + if ($value === false) { + return $default; + } + return $value; +} + +return [ + 'paths' => [ + 'migrations' => __DIR__ . '/migrations' + ], + 'environments' => [ + 'default_migration_table' => BB_MIGRATIONS, + 'default_environment' => env('APP_ENV', 'production'), + 'production' => [ + 'adapter' => 'mysql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => (int)env('DB_PORT', 3306), + 'name' => env('DB_DATABASE'), + 'user' => env('DB_USERNAME'), + 'pass' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'table_options' => [ + 'ENGINE' => 'InnoDB', + 'DEFAULT CHARSET' => 'utf8mb4', + 'COLLATE' => 'utf8mb4_unicode_ci' + ] + ], + 'development' => [ + 'adapter' => 'mysql', + 'host' => env('DB_HOST', 'localhost'), + 'port' => (int)env('DB_PORT', 3306), + 'name' => env('DB_DATABASE'), + 'user' => env('DB_USERNAME'), + 'pass' => env('DB_PASSWORD', ''), + 'charset' => 'utf8mb4', + 'collation' => 'utf8mb4_unicode_ci', + 'table_options' => [ + 'ENGINE' => 'InnoDB', + 'DEFAULT CHARSET' => 'utf8mb4', + 'COLLATE' => 'utf8mb4_unicode_ci' + ] + ] + ], + 'version_order' => 'creation', +]; diff --git a/src/Cache/UnifiedCacheSystem.php b/src/Cache/UnifiedCacheSystem.php index 594910afc..07a617388 100644 --- a/src/Cache/UnifiedCacheSystem.php +++ b/src/Cache/UnifiedCacheSystem.php @@ -165,10 +165,23 @@ class UnifiedCacheSystem case 'redis': // Some deprecated cache types will fall back to file storage $dir = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/' . $cache_name . '/'; + + // Create directory automatically using TorrentPier's bb_mkdir function + if (!is_dir($dir) && !bb_mkdir($dir)) { + throw new \RuntimeException("Failed to create cache directory: $dir"); + } + return new FileStorage($dir); case 'sqlite': $dbFile = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/' . $cache_name . '.db'; + + // Create parent directory for SQLite file + $dbDir = dirname($dbFile); + if (!is_dir($dbDir) && !bb_mkdir($dbDir)) { + throw new \RuntimeException("Failed to create cache directory for SQLite: $dbDir"); + } + return new SQLiteStorage($dbFile); case 'memory': @@ -183,6 +196,12 @@ class UnifiedCacheSystem default: // Fallback to file storage $dir = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/' . $cache_name . '/'; + + // Create directory automatically using TorrentPier's bb_mkdir function + if (!is_dir($dir) && !bb_mkdir($dir)) { + throw new \RuntimeException("Failed to create cache directory: $dir"); + } + return new FileStorage($dir); } } @@ -218,10 +237,23 @@ class UnifiedCacheSystem case 'redis': // Some deprecated cache types will fall back to file storage $dir = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/datastore/'; + + // Create directory automatically using TorrentPier's bb_mkdir function + if (!is_dir($dir) && !bb_mkdir($dir)) { + throw new \RuntimeException("Failed to create datastore directory: $dir"); + } + return new FileStorage($dir); case 'sqlite': $dbFile = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/datastore.db'; + + // Create parent directory for SQLite file + $dbDir = dirname($dbFile); + if (!is_dir($dbDir) && !bb_mkdir($dbDir)) { + throw new \RuntimeException("Failed to create datastore directory for SQLite: $dbDir"); + } + return new SQLiteStorage($dbFile); case 'memory': @@ -236,6 +268,12 @@ class UnifiedCacheSystem default: // Fallback to file storage $dir = rtrim($this->cfg['db_dir'] ?? sys_get_temp_dir() . '/cache/', '/') . '/datastore/'; + + // Create directory automatically using TorrentPier's bb_mkdir function + if (!is_dir($dir) && !bb_mkdir($dir)) { + throw new \RuntimeException("Failed to create datastore directory: $dir"); + } + return new FileStorage($dir); } } diff --git a/src/Database/MigrationStatus.php b/src/Database/MigrationStatus.php new file mode 100644 index 000000000..ed73e038a --- /dev/null +++ b/src/Database/MigrationStatus.php @@ -0,0 +1,305 @@ +migrationTable = BB_MIGRATIONS; + $this->migrationPath = BB_ROOT . 'migrations'; + } + + /** + * Get complete migration status information + * + * @return array Migration status data including applied/pending migrations + */ + public function getMigrationStatus(): array + { + try { + // Check if migration table exists using Nette Database Explorer + $tableExists = $this->checkMigrationTableExists(); + $setupStatus = $this->getSetupStatus(); + + if (!$tableExists) { + return [ + 'table_exists' => false, + 'current_version' => null, + 'applied_migrations' => [], + 'pending_migrations' => $this->getAvailableMigrations(), + 'setup_status' => $setupStatus, + 'requires_setup' => $setupStatus['needs_setup'] + ]; + } + + // Get applied migrations using Nette Database Explorer + $appliedMigrations = DB()->query(" + SELECT version, migration_name, start_time, end_time + FROM {$this->migrationTable} + ORDER BY version ASC + ")->fetchAll(); + + // Convert Nette Result objects to arrays + $appliedMigrationsArray = []; + foreach ($appliedMigrations as $migration) { + $appliedMigrationsArray[] = [ + 'version' => $migration->version, + 'migration_name' => $migration->migration_name, + 'start_time' => $migration->start_time, + 'end_time' => $migration->end_time + ]; + } + + // Get current version (latest applied) + $currentVersion = null; + if (!empty($appliedMigrationsArray)) { + $currentVersion = end($appliedMigrationsArray)['version']; + } + + // Get pending migrations + $availableMigrations = $this->getAvailableMigrations(); + $appliedVersions = array_column($appliedMigrationsArray, 'version'); + $pendingMigrations = array_filter($availableMigrations, function ($migration) use ($appliedVersions) { + return !in_array($migration['version'], $appliedVersions); + }); + + return [ + 'table_exists' => true, + 'current_version' => $currentVersion, + 'applied_migrations' => $appliedMigrationsArray, + 'pending_migrations' => array_values($pendingMigrations), + 'setup_status' => $setupStatus, + 'requires_setup' => $setupStatus['needs_setup'] + ]; + + } catch (\Exception $e) { + bb_die('Error checking migration status: ' . $e->getMessage()); + } + } + + /** + * Determine setup status for existing installations + * + * @return array Setup status information + */ + private function getSetupStatus(): array + { + try { + // Check if core TorrentPier tables exist (indicates existing installation) + $coreTablesExist = $this->checkCoreTablesExist(); + $migrationTableExists = $this->checkMigrationTableExists(); + + if (!$coreTablesExist) { + // Fresh installation + return [ + 'type' => 'fresh', + 'needs_setup' => false, + 'message' => 'Fresh installation - migrations will run normally', + 'action_required' => false + ]; + } + + if (!$migrationTableExists) { + // Existing installation without migration system + return [ + 'type' => 'existing_needs_setup', + 'needs_setup' => true, + 'message' => 'Existing installation detected - migration setup required', + 'action_required' => true, + 'instructions' => 'Mark initial migrations as applied using --fake flag' + ]; + } + + // Check if initial migrations are marked as applied + $initialMigrationsApplied = $this->checkInitialMigrationsApplied(); + + if (!$initialMigrationsApplied) { + return [ + 'type' => 'existing_partial_setup', + 'needs_setup' => true, + 'message' => 'Migration table exists but initial migrations not marked as applied', + 'action_required' => true, + 'instructions' => 'Run: php vendor/bin/phinx migrate --fake --target=20250619000002' + ]; + } + + // Fully set up + return [ + 'type' => 'fully_setup', + 'needs_setup' => false, + 'message' => 'Migration system fully configured', + 'action_required' => false + ]; + + } catch (\Exception $e) { + return [ + 'type' => 'error', + 'needs_setup' => false, + 'message' => 'Error detecting setup status: ' . $e->getMessage(), + 'action_required' => false + ]; + } + } + + /** + * Check if core TorrentPier tables exist + * + * @return bool True if core tables exist + */ + private function checkCoreTablesExist(): bool + { + try { + $coreTable = 'bb_users'; // Key table that should exist in any TorrentPier installation + $escapedTable = DB()->escape($coreTable); + $result = DB()->query(" + SELECT COUNT(*) as table_count + FROM information_schema.tables + WHERE table_schema = DATABASE() + AND table_name = '{$escapedTable}' + ")->fetch(); + + return $result && $result->table_count > 0; + } catch (\Exception $e) { + return false; + } + } + + /** + * Check if initial migrations are marked as applied + * + * @return bool True if initial migrations are applied + */ + private function checkInitialMigrationsApplied(): bool + { + try { + $initialMigrationsCSV = implode(',', $this->initialMigrations); + $result = DB()->query(" + SELECT COUNT(*) as migration_count + FROM {$this->migrationTable} + WHERE version IN ($initialMigrationsCSV) + ")->fetch(); + + return $result && $result->migration_count >= count($this->initialMigrations); + } catch (\Exception $e) { + return false; + } + } + + /** + * Check if migration table exists + * + * @return bool True if table exists, false otherwise + */ + private function checkMigrationTableExists(): bool + { + try { + // Using simple query without parameters to avoid issues + $escapedTable = DB()->escape($this->migrationTable); + $result = DB()->query(" + SELECT COUNT(*) as table_count + FROM information_schema.tables + WHERE table_schema = DATABASE() + AND table_name = '{$escapedTable}' + ")->fetch(); + + return $result && $result->table_count > 0; + } catch (\Exception $e) { + return false; + } + } + + /** + * Get available migrations from filesystem + * + * @return array List of available migration files + */ + private function getAvailableMigrations(): array + { + $migrations = []; + + if (is_dir($this->migrationPath)) { + $files = glob($this->migrationPath . '/*.php'); + foreach ($files as $file) { + $filename = basename($file); + if (preg_match('/^(\d+)_(.+)\.php$/', $filename, $matches)) { + $migrations[] = [ + 'version' => $matches[1], + 'name' => $matches[2], + 'filename' => $filename, + 'file_path' => $file + ]; + } + } + } + + // Sort by version + usort($migrations, function ($a, $b) { + return strcmp($a['version'], $b['version']); + }); + + return $migrations; + } + + /** + * Get database schema information + * + * @return array Database statistics and information + */ + public function getSchemaInfo(): array + { + try { + // Get database name using Nette Database Explorer + $dbInfo = DB()->query("SELECT DATABASE() as db_name")->fetch(); + + // Get table count using Nette Database Explorer + $tableInfo = DB()->query(" + SELECT COUNT(*) as table_count + FROM information_schema.tables + WHERE table_schema = DATABASE() + ")->fetch(); + + // Get database size using Nette Database Explorer + $sizeInfo = DB()->query(" + SELECT + ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) as size_mb + FROM information_schema.tables + WHERE table_schema = DATABASE() + ")->fetch(); + + return [ + 'database_name' => $dbInfo->db_name ?? 'Unknown', + 'table_count' => $tableInfo->table_count ?? 0, + 'size_mb' => $sizeInfo->size_mb ?? 0 + ]; + + } catch (\Exception $e) { + return [ + 'database_name' => 'Unknown', + 'table_count' => 0, + 'size_mb' => 0, + 'error' => $e->getMessage() + ]; + } + } +} diff --git a/styles/templates/admin/admin_migrations.tpl b/styles/templates/admin/admin_migrations.tpl new file mode 100644 index 000000000..65ef168fe --- /dev/null +++ b/styles/templates/admin/admin_migrations.tpl @@ -0,0 +1,183 @@ +

{L_MIGRATIONS_STATUS}

+ + + + + + + + + + + + + + + + + + + + + +
{L_MIGRATIONS_DATABASE_INFO}
{L_MIGRATIONS_DATABASE_NAME}:{SCHEMA_DATABASE_NAME}
{L_MIGRATIONS_DATABASE_TOTAL}:{SCHEMA_TABLE_COUNT}
{L_MIGRATIONS_DATABASE_SIZE}:{SCHEMA_SIZE_MB} MB
{L_LAST_UPDATED}:{CURRENT_TIME}
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
{L_MIGRATIONS_STATUS}
{L_MIGRATIONS_SYSTEM}: + + + ⚠ {L_MIGRATIONS_NEEDS_SETUP} + + βœ“ {L_MIGRATIONS_ACTIVE} + + + βœ— {L_MIGRATIONS_NOT_INITIALIZED} + +
{L_MIGRATIONS_SETUP_STATUS}: +
+ {L_MIGRATIONS_ACTION_REQUIRED}: {SETUP_MESSAGE}
+ + {L_MIGRATIONS_INSTRUCTIONS}: {SETUP_INSTRUCTIONS}
+ + {L_MIGRATIONS_SETUP_GUIDE} +
+
Current Version: + + {MIGRATION_CURRENT_VERSION} + + {L_MIGRATIONS_NOT_APPLIED} + +
{L_MIGRATIONS_APPLIED}:{MIGRATION_APPLIED_COUNT}
{L_MIGRATIONS_PENDING}: + + {MIGRATION_PENDING_COUNT} {L_MIGRATIONS_PENDING_COUNT} + + {L_MIGRATIONS_UP_TO_DATE} + +
+ + +
+ + + + + + + + + + + + + + + + + + +
{L_MIGRATIONS_APPLIED}
{L_MIGRATIONS_VERSION}{L_MIGRATIONS_NAME}{L_MIGRATIONS_APPLIED_AT}{L_MIGRATIONS_COMPLETED_AT}
{applied_migrations.VERSION}{applied_migrations.NAME}{applied_migrations.START_TIME}{applied_migrations.END_TIME}
+ + + +
+ + + + + + + + + + + + + + + + +
{L_MIGRATIONS_PENDING}
{L_MIGRATIONS_VERSION}{L_MIGRATIONS_NAME}{L_MIGRATIONS_FILE}
{pending_migrations.VERSION}{pending_migrations.NAME}{pending_migrations.FILENAME}
+ +
+
+ ⚠️ Pending Migrations Detected
+ There are {MIGRATION_PENDING_COUNT} migration(s) that need to be applied. + Contact your system administrator to run:
+ php vendor/bin/phinx migrate +
+ + +
+
+

Migration Management

+

This panel provides read-only information about the database migration status. + To manage migrations, use the command line interface:

+ +
    +
  • Check status: php vendor/bin/phinx status
  • +
  • Run migrations: php vendor/bin/phinx migrate
  • +
  • Create new migration: php vendor/bin/phinx create MigrationName
  • +
  • Rollback last migration: php vendor/bin/phinx rollback
  • +
+ +

⚠️ Important: Always backup your database before running migrations in production!

+
+ + +
+
+