mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Minor improvements (#1589)
* Minor improvements * Update CHANGELOG.md * Update README.md
This commit is contained in:
parent
7c31bc50e0
commit
df9922870c
5 changed files with 7 additions and 55 deletions
|
@ -14,7 +14,7 @@
|
||||||
- Demo mode: Save user language in cookies [\#1584](https://github.com/torrentpier/torrentpier/pull/1584) ([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))
|
||||||
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([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))
|
- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([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) ([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) ([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) ([Exileum](https://github.com/Exileum))
|
- 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) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)
|
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)
|
||||||
|
|
11
README.md
11
README.md
|
@ -73,14 +73,15 @@ For installation, you need to follow a few simple steps.
|
||||||
|
|
||||||
1. Install [Composer](https://getcomposer.org/)
|
1. Install [Composer](https://getcomposer.org/)
|
||||||
2. Run `composer create-project torrentpier/torrentpier`
|
2. Run `composer create-project torrentpier/torrentpier`
|
||||||
3. After run `composer install` on the project directory
|
3. [Check our system requirements](#-requirements)
|
||||||
4. Create database and import dump located at `install/sql/mysql.sql`
|
4. After run `composer install` on the project directory
|
||||||
5. Edit database configuration settings in the environment (`.env.example`, after rename to `.env`)
|
5. Create database and import dump located at `install/sql/mysql.sql`
|
||||||
6. Provide write permissions to the specified folders:
|
6. Edit database configuration settings in the environment (`.env.example`), after rename to `.env`
|
||||||
|
7. Provide write permissions to the specified folders:
|
||||||
* `data/avatars`, `data/uploads`, `data/uploads/thumbs`
|
* `data/avatars`, `data/uploads`, `data/uploads/thumbs`
|
||||||
* `internal_data/atom`, `internal_data/cache`, `internal_data/log`, `internal_data/triggers`
|
* `internal_data/atom`, `internal_data/cache`, `internal_data/log`, `internal_data/triggers`
|
||||||
* `sitemap`
|
* `sitemap`
|
||||||
7. Voila! ✨
|
8. Voila! ✨
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> The specific settings depend on the server you are using, but in general case we recommend chmod **0755** for folders, and chmod **0644** for files in them.
|
> The specific settings depend on the server you are using, but in general case we recommend chmod **0755** for folders, and chmod **0644** for files in them.
|
||||||
|
|
23
common.php
23
common.php
|
@ -143,29 +143,6 @@ switch ($bb_cfg['datastore_type']) {
|
||||||
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
|
$datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check system requirements
|
|
||||||
*/
|
|
||||||
if (CHECK_REQUIREMENTS['status'] && !CACHE('bb_cache')->get('system_req')) {
|
|
||||||
// [1] Check PHP Version
|
|
||||||
if (!\TorrentPier\Helpers\IsHelper::isPHP(CHECK_REQUIREMENTS['php_min_version'])) {
|
|
||||||
die("TorrentPier requires PHP version " . CHECK_REQUIREMENTS['php_min_version'] . "+ Your PHP version " . PHP_VERSION);
|
|
||||||
}
|
|
||||||
|
|
||||||
// [2] Check installed PHP Extensions on server
|
|
||||||
$data = [];
|
|
||||||
foreach (CHECK_REQUIREMENTS['ext_list'] as $ext) {
|
|
||||||
if (!extension_loaded($ext)) {
|
|
||||||
$data[] = '<code style="background:#222;color:#00e01f;padding:2px 6px;border-radius:3px;">' . $ext . '</code>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!empty($data)) {
|
|
||||||
die(sprintf("TorrentPier requires %s extension(s) installed on server", implode(', ', $data)));
|
|
||||||
}
|
|
||||||
|
|
||||||
CACHE('bb_cache')->set('system_req', true);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
function utime()
|
function utime()
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,21 +35,6 @@ define('UPDATER_FILE', INT_DATA_DIR . '/updater.json');
|
||||||
define('API_IP_URL', 'https://freeipapi.com/api/json/');
|
define('API_IP_URL', 'https://freeipapi.com/api/json/');
|
||||||
define('CHECKSUMS_FILE', INT_DATA_DIR . '/checksums.md5');
|
define('CHECKSUMS_FILE', INT_DATA_DIR . '/checksums.md5');
|
||||||
define('RESTORE_CORRUPT_CONFIRM_FILE', INT_DATA_DIR . '/rescorrupt.integrity');
|
define('RESTORE_CORRUPT_CONFIRM_FILE', INT_DATA_DIR . '/rescorrupt.integrity');
|
||||||
define('CHECK_REQUIREMENTS', [
|
|
||||||
'status' => true,
|
|
||||||
'php_min_version' => '8.1.0',
|
|
||||||
'ext_list' => [
|
|
||||||
'json',
|
|
||||||
'curl',
|
|
||||||
'mysqli',
|
|
||||||
'bcmath',
|
|
||||||
'mbstring',
|
|
||||||
'intl',
|
|
||||||
'xml',
|
|
||||||
'xmlwriter',
|
|
||||||
'zip'
|
|
||||||
],
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Templates
|
// Templates
|
||||||
define('ADMIN_TPL_DIR', TEMPLATES_DIR . '/admin/');
|
define('ADMIN_TPL_DIR', TEMPLATES_DIR . '/admin/');
|
||||||
|
|
|
@ -15,17 +15,6 @@ namespace TorrentPier\Helpers;
|
||||||
*/
|
*/
|
||||||
class IsHelper
|
class IsHelper
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Determines if the current version of PHP is equal to or greater than the supplied value
|
|
||||||
*
|
|
||||||
* @param string $version
|
|
||||||
* @return bool TRUE if the current version is $version or higher
|
|
||||||
*/
|
|
||||||
public static function isPHP(string $version): bool
|
|
||||||
{
|
|
||||||
return version_compare(PHP_VERSION, $version, '>=');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if server have SSL
|
* Return true if server have SSL
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue