Skip to content

Commit

Permalink
Minor fixes (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
belomaxorka authored Apr 8, 2023
1 parent 0979b7d commit 08440a0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 2 additions & 4 deletions library/includes/core/dbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function get_db_obj ($srv_name_or_alias = 'db1')
// определение имени сервера
function get_srv_name ($name)
{
$srv_name = 'db1';

if (isset($this->alias[$name]))
{
$srv_name = $this->alias[$name];
Expand All @@ -49,10 +51,6 @@ function get_srv_name ($name)
{
$srv_name = $name;
}
else
{
$srv_name = 'db1';
}
return $srv_name;
}
}
5 changes: 3 additions & 2 deletions library/includes/init_bb.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$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);
Expand Down Expand Up @@ -193,6 +193,7 @@ function bb_setcookie ($name, $val, $lifetime = COOKIE_PERSIST, $httponly = fals
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>',
Expand Down Expand Up @@ -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 ()
Expand Down

0 comments on commit 08440a0

Please sign in to comment.