Minor fixes (#142)

This commit is contained in:
Roman Kelesidis 2023-04-08 14:46:50 +07:00 committed by GitHub
parent 0979b7dd65
commit 08440a0d03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -20,7 +20,7 @@
- Enhanced https check [\#131](https://github.com/torrentpier/torrentpier-lts/pull/131), [\#132](https://github.com/torrentpier/torrentpier-lts/pull/132) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to configure sphinx debug [\#137](https://github.com/torrentpier/torrentpier-lts/pull/137) ([belomaxorka](https://github.com/belomaxorka))
- Redundant pagination, mysql 5.7+ issue [\#140](https://github.com/torrentpier/torrentpier-lts/pull/140) ([belomaxorka](https://github.com/belomaxorka))
- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139) ([belomaxorka](https://github.com/belomaxorka))
- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139), [\#142](https://github.com/torrentpier/torrentpier-lts/pull/142) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.03](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.03) (2023-04-04)
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.03...main)

View File

@ -41,6 +41,8 @@ class DBS
// определение имени сервера
function get_srv_name ($name)
{
$srv_name = 'db1';
if (isset($this->alias[$name]))
{
$srv_name = $this->alias[$name];
@ -49,10 +51,6 @@ class DBS
{
$srv_name = $name;
}
else
{
$srv_name = 'db1';
}
return $srv_name;
}
}

View File

@ -12,7 +12,7 @@ $gen_simple_header = false;
$user = null;
// Obtain and encode user IP
$client_ip = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
$client_ip = filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
$user_ip = encode_ip($client_ip);
define('CLIENT_IP', $client_ip);
define('USER_IP', $user_ip);
@ -193,6 +193,7 @@ define('TOR_TMP', 10); // временная
define('TOR_PREMOD', 11); // премодерация
define('TOR_REPLENISH', 12); // пополняемая
// Иконки статусов
$bb_cfg['tor_icons'] = array(
TOR_NOT_APPROVED => '<span class="tor-icon tor-not-approved">*</span>',
TOR_CLOSED => '<span class="tor-icon tor-closed">x</span>',
@ -543,7 +544,7 @@ function cron_release_file_lock ()
function cron_touch_lock_file ($lock_file)
{
file_write(make_rand_str(20), $lock_file, 0, true, true);
file_write('', $lock_file, 0, true, true);
}
function cron_enable_board ()