Minor improvements (#902)

This commit is contained in:
Roman Kelesidis 2023-09-17 00:42:54 +07:00 committed by GitHub
commit a2e7251d38
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -141,6 +141,7 @@ if ($tor_reged && $tor_info) {
$tor_completed_count = declension((int)$tor_info['complete_count'], 'times'); $tor_completed_count = declension((int)$tor_info['complete_count'], 'times');
$tor_id = $tor_info['topic_id']; $tor_id = $tor_info['topic_id'];
$tor_type = $tor_info['tor_type']; $tor_type = $tor_info['tor_type'];
// Magnet link // Magnet link
$user_passkey = \TorrentPier\Legacy\Torrent::getPasskey($bt_user_id); $user_passkey = \TorrentPier\Legacy\Torrent::getPasskey($bt_user_id);
$tor_magnet = create_magnet($tor_info['info_hash'], $tor_info['info_hash_v2'], $user_passkey, wbr($t_data['topic_title'])); $tor_magnet = create_magnet($tor_info['info_hash'], $tor_info['info_hash_v2'], $user_passkey, wbr($t_data['topic_title']));

View file

@ -121,7 +121,7 @@ class Dev
$log = ''; $log = '';
foreach ($DBS->srv as $srv_name => $db_obj) { foreach ($DBS->srv as $srv_name => $db_obj) {
$log .= !empty($db_obj) ? self::get_sql_log_html($db_obj, "database: $srv_name [{$db_obj->engine}]") : ''; $log .= !empty($db_obj->dbg) ? self::get_sql_log_html($db_obj, "database: $srv_name [{$db_obj->engine}]") : '';
} }
foreach ($CACHES->obj as $cache_name => $cache_obj) { foreach ($CACHES->obj as $cache_name => $cache_obj) {

View file

@ -39,7 +39,7 @@ class Redis extends Common
{ {
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect'; $connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
$this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port']; $this->cur_query = $connect_type . ' ' . $this->cfg['host'] . ':' . $this->cfg['port'];
$this->debug('start'); $this->debug('start');
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port'])) { if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port'])) {