diff --git a/CHANGELOG.md b/CHANGELOG.md index a78abda7e..1e275af76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,8 +19,8 @@ - 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) ([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) ([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) ([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) ([Exileum](https://github.com/Exileum)) ## [v2.4.2](https://github.com/torrentpier/torrentpier/tree/v2.4.2) (2024-03-30) diff --git a/common.php b/common.php index 9ba5ba0d3..bce07f925 100644 --- a/common.php +++ b/common.php @@ -172,15 +172,18 @@ switch ($bb_cfg['datastore_type']) { $datastore = new TorrentPier\Legacy\Datastore\File($bb_cfg['cache']['db_dir'] . 'datastore/', $bb_cfg['cache']['prefix']); } -if (CHECK_REQIREMENTS['status'] && !CACHE('bb_cache')->get('system_req')) { +/** + * Check system requirements + */ +if (CHECK_REQUIREMENTS['status'] && !CACHE('bb_cache')->get('system_req')) { // [1] Check PHP Version - if (!\TorrentPier\Helpers\IsHelper::isPHP(CHECK_REQIREMENTS['php_min_version'])) { - die("TorrentPier requires PHP version " . CHECK_REQIREMENTS['php_min_version'] . "+ Your PHP version " . 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_REQIREMENTS['ext_list'] as $ext) { + foreach (CHECK_REQUIREMENTS['ext_list'] as $ext) { if (!extension_loaded($ext)) { $data[] = '' . $ext . ''; } diff --git a/library/defines.php b/library/defines.php index 9d4bc464f..be78aff88 100644 --- a/library/defines.php +++ b/library/defines.php @@ -33,7 +33,7 @@ define('APP_NAME', 'TorrentPier'); define('UPDATER_URL', 'https://api.github.com/repos/torrentpier/torrentpier/releases/latest'); define('UPDATER_FILE', INT_DATA_DIR . '/updater.ver'); define('API_IP_URL', 'https://freeipapi.com/api/json/'); -define('CHECK_REQIREMENTS', [ +define('CHECK_REQUIREMENTS', [ 'status' => true, 'php_min_version' => '8.1.0', 'ext_list' => [ diff --git a/library/language/source/main.php b/library/language/source/main.php index c5dab8d21..45067e770 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -1115,7 +1115,7 @@ $lang['COUNTRIES'] = [ 'KZ' => 'Kazakhstan', 'LA' => 'Laos (Lao People\'s Democratic Republic)', 'LB' => 'Lebanon', - 'LGBT' => 'Pride flag 🏳️‍🌈', + 'LGBT' => 'Pride flag', // __ // 'LC' => 'Saint Lucia', 'LI' => 'Liechtenstein', 'LK' => 'Sri Lanka', @@ -1162,7 +1162,7 @@ $lang['COUNTRIES'] = [ 'NZ' => 'New Zealand', 'OM' => 'Oman', 'PA' => 'Panama', - 'PACE' => 'Peace flag 🕊', + 'PACE' => 'Peace flag', // __ // 'PE' => 'Peru', 'PF' => 'French Polynesia', 'PG' => 'Papua New Guinea', diff --git a/modcp.php b/modcp.php index 62d77599b..a8ec6a0db 100644 --- a/modcp.php +++ b/modcp.php @@ -519,7 +519,7 @@ switch ($mode) { $msg = $result ? $lang['DELETE_POSTS_SUCCESFULLY'] : $lang['NO_POSTS_REMOVED']; bb_die(return_msg_mcp($msg)); } else { - $sql = "SELECT u.username, p.*, pt.post_text, p.post_username + $sql = "SELECT u.username, u.user_rank, p.*, pt.post_text, p.post_username FROM " . BB_POSTS . " p, " . BB_USERS . " u, " . BB_POSTS_TEXT . " pt WHERE p.topic_id = $topic_id AND p.poster_id = u.user_id @@ -562,7 +562,7 @@ switch ($mode) { $template->assign_block_vars('postrow', [ 'ROW_CLASS' => $row_class, - 'POSTER_NAME' => $poster, + 'POSTER_NAME' => profile_url(['username' => $poster, 'user_id' => $poster_id, 'user_rank' => $postrow[$i]['user_rank']]), 'POST_DATE' => $post_date, 'MESSAGE' => $message, 'CHECKBOX' => defined('BEGIN_CHECKBOX'), diff --git a/src/Emailer.php b/src/Emailer.php index 4e669dee0..ae0ce8ccb 100644 --- a/src/Emailer.php +++ b/src/Emailer.php @@ -142,23 +142,16 @@ class Emailer if ($bb_cfg['emailer']['smtp']['enabled']) { if (!empty($bb_cfg['emailer']['smtp']['host'])) { if (empty($bb_cfg['emailer']['smtp']['ssl_type'])) { - /** @var EsmtpTransport $transport external SMTP without SSL */ - $transport = (new EsmtpTransport( - $bb_cfg['emailer']['smtp']['host'], - $bb_cfg['emailer']['smtp']['port'] - )) - ->setUsername($bb_cfg['emailer']['smtp']['username']) - ->setPassword($bb_cfg['emailer']['smtp']['password']); - } else { - /** @var EsmtpTransport $transport external SMTP with SSL */ - $transport = (new EsmtpTransport( - $bb_cfg['emailer']['smtp']['host'], - $bb_cfg['emailer']['smtp']['port'], - $bb_cfg['emailer']['smtp']['ssl_type'] - )) - ->setUsername($bb_cfg['emailer']['smtp']['username']) - ->setPassword($bb_cfg['emailer']['smtp']['password']); + $bb_cfg['emailer']['smtp']['ssl_type'] = null; } + /** @var EsmtpTransport $transport external SMTP with SSL */ + $transport = (new EsmtpTransport( + $bb_cfg['emailer']['smtp']['host'], + $bb_cfg['emailer']['smtp']['port'], + $bb_cfg['emailer']['smtp']['ssl_type'] + )) + ->setUsername($bb_cfg['emailer']['smtp']['username']) + ->setPassword($bb_cfg['emailer']['smtp']['password']); } else { $transport = new EsmtpTransport('localhost', 25); } diff --git a/styles/templates/default/modcp_split.tpl b/styles/templates/default/modcp_split.tpl index 299e250fe..ec7887080 100644 --- a/styles/templates/default/modcp_split.tpl +++ b/styles/templates/default/modcp_split.tpl @@ -60,9 +60,9 @@ function toggle_cbox (cb_id, tr_id) - - - + + + @@ -91,9 +91,9 @@ function toggle_cbox (cb_id, tr_id) - - - + + + {S_HIDDEN_FIELDS} diff --git a/styles/templates/default/viewtopic.tpl b/styles/templates/default/viewtopic.tpl index 59c0cea08..586408ef4 100644 --- a/styles/templates/default/viewtopic.tpl +++ b/styles/templates/default/viewtopic.tpl @@ -244,7 +244,7 @@ function build_poll_add_form (src_el)
{L_NEW_POLL_M_VOTES}:
{L_NEW_POLL_M_EXPLAIN}: {$bb_cfg['max_poll_options']})
-
  
+
  
diff --git a/viewtopic.php b/viewtopic.php index 26c819cb8..d88b4f387 100644 --- a/viewtopic.php +++ b/viewtopic.php @@ -498,7 +498,7 @@ $template->assign_vars([ 'TOPIC_HAS_POLL' => $topic_has_poll, 'POLL_IS_EDITABLE' => !$poll_time_expired, - 'POLL_IS_FINISHED' => ($t_data['topic_vote'] == POLL_FINISHED), + 'POLL_IS_FINISHED' => ($topic_has_poll == POLL_FINISHED), 'CAN_MANAGE_POLL' => $can_manage_poll, 'CAN_ADD_POLL' => $can_add_poll ]);