1
0
mirror of https://github.com/torrentpier/torrentpier.git synced 2025-03-12 04:35:42 -07:00

Minor improvements ()

* Minor improvements

* Update viewtopic_attach.tpl

* Update viewtopic_attach.tpl

* Update viewforum.tpl

* Update viewforum.tpl

* Update viewtopic.tpl

* Update viewtopic.tpl

* Update CHANGELOG.md

* Updated

* Update defines.php
This commit is contained in:
Roman Kelesidis 2024-07-12 23:05:14 +07:00 committed by GitHub
parent 97d42c599d
commit 126c75cd57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 29 additions and 25 deletions

@ -16,7 +16,7 @@
- Some improvements for integrity checker [\#1501](https://github.com/torrentpier/torrentpier/pull/1501) ([belomaxorka](https://github.com/belomaxorka))
- Hide in topic: Added country hiding [\#1535](https://github.com/torrentpier/torrentpier/pull/1535) ([belomaxorka](https://github.com/belomaxorka))
- Hide vote button in topic for guests [\#1507](https://github.com/torrentpier/torrentpier/pull/1507) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1502](https://github.com/torrentpier/torrentpier/pull/1502), [\#1506](https://github.com/torrentpier/torrentpier/pull/1506), [\#1509](https://github.com/torrentpier/torrentpier/pull/1509), [\#1511](https://github.com/torrentpier/torrentpier/pull/1511), [\#1515](https://github.com/torrentpier/torrentpier/pull/1515), [\#1516](https://github.com/torrentpier/torrentpier/pull/1516), [\#1517](https://github.com/torrentpier/torrentpier/pull/1517), [\#1519](https://github.com/torrentpier/torrentpier/pull/1519), [\#1523](https://github.com/torrentpier/torrentpier/pull/1523), [\#1525](https://github.com/torrentpier/torrentpier/pull/1525), [\#1530](https://github.com/torrentpier/torrentpier/pull/1530), [\#1532](https://github.com/torrentpier/torrentpier/pull/1532), [\#1536](https://github.com/torrentpier/torrentpier/pull/1536) ([belomaxorka](https://github.com/belomaxorka))
- New Crowdin updates [\#1504](https://github.com/torrentpier/torrentpier/pull/1504), [\#1513](https://github.com/torrentpier/torrentpier/pull/1513) ([Exileum](https://github.com/Exileum))
## [v2.4.3](https://github.com/torrentpier/torrentpier/tree/v2.4.3) (2024-06-09)

@ -25,13 +25,17 @@ if (!$topic_id = (int)$this->request['topic_id']) {
$this->ajax_die($lang['INVALID_TOPIC_ID']);
}
if (!$poster_id = (int)$this->request['poster_id']) {
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
}
switch ($mode) {
case 'add':
if (IS_GUEST) {
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
}
if (DB()->fetch_row('SELECT poster_id FROM ' . BB_BT_TORRENTS . " WHERE topic_id = $topic_id AND poster_id = " . $userdata['user_id'])) {
if ($poster_id == $userdata['user_id']) {
$this->ajax_die($lang['LIKE_OWN_POST']);
}
@ -48,14 +52,13 @@ switch ($mode) {
$this->ajax_die($lang['NEED_TO_LOGIN_FIRST']);
}
$sql = DB()->fetch_rowset('SELECT u.username, u.user_rank, u.user_id, t.* FROM ' . BB_THX . ' t, ' . BB_USERS . " u WHERE t.topic_id = $topic_id AND t.user_id = u.user_id");
$user_list = [];
$sql = DB()->fetch_rowset('SELECT u.username, u.user_rank, u.user_id, t.* FROM ' . BB_THX . ' t, ' . BB_USERS . " u WHERE t.topic_id = $topic_id AND t.user_id = u.user_id");
foreach ($sql as $row) {
$user_list[] = '<b>' . profile_url($row) . ' <i>(' . bb_date($row['time']) . ')</i></b>';
}
$this->response['html'] = join(', ', $user_list) ?: $lang['NO_LIKES'];
$this->response['html'] = implode(', ', $user_list) ?: $lang['NO_LIKES'];
break;
default:
$this->ajax_die('Invalid mode: ' . $mode);

@ -47,6 +47,7 @@ define('CHECK_REQUIREMENTS', [
'intl',
'xml',
'xmlwriter',
'zip'
],
]);

@ -18,29 +18,32 @@ $data = [];
$updaterDownloader = new \TorrentPier\Updater();
$updaterDownloader = $updaterDownloader->getLastVersion();
$get_version = $updaterDownloader['tag_name'];
$version_code_actual = (int)trim(str_replace(['.', 'v'], '', $get_version));
$getVersion = $updaterDownloader['tag_name'];
$versionCodeActual = (int)trim(str_replace(['.', 'v'], '', $getVersion));
// Has update!
if (VERSION_CODE < $version_code_actual) {
$latest_release_file = $updaterDownloader['assets'][0]['browser_download_url'];
if (VERSION_CODE < $versionCodeActual) {
$latestBuildFileLink = $updaterDownloader['assets'][0]['browser_download_url'];
// Save current version & latest available
file_write(json_encode(['previous_version' => VERSION_CODE, 'latest_version' => $version_code_actual]), UPDATER_FILE, replace_content: true);
file_write(json_encode([
'previous_version' => VERSION_CODE,
'latest_version' => $versionCodeActual
]), UPDATER_FILE, replace_content: true);
// Get MD5 checksum
$md5_file_checksum = '';
if (isset($latest_release_file)) {
$md5_file_checksum = strtoupper(md5_file($latest_release_file));
$buildFileChecksum = '';
if (isset($latestBuildFileLink)) {
$buildFileChecksum = strtoupper(md5_file($latestBuildFileLink));
}
// Build data array
$data = [
'available_update' => true,
'latest_version' => $get_version,
'latest_version' => $getVersion,
'latest_version_size' => isset($updaterDownloader['assets'][0]['size']) ? humn_size($updaterDownloader['assets'][0]['size']) : false,
'latest_version_dl_link' => $latest_release_file ?? $updaterDownloader['html_url'],
'latest_version_checksum' => $md5_file_checksum,
'latest_version_dl_link' => $latestBuildFileLink ?? $updaterDownloader['html_url'],
'latest_version_checksum' => $buildFileChecksum,
'latest_version_link' => $updaterDownloader['html_url']
];
}

@ -77,10 +77,10 @@ class Updater
{
$this->targetVersion = $targetVersion;
if ($targetVersion === 'latest') {
if ($this->targetVersion === 'latest') {
$versionInfo = $this->getLastVersion();
} else {
$targetIndex = array_search($targetVersion, array_column($this->jsonResponse, 'tag_name'));
$targetIndex = array_search($this->targetVersion, array_column($this->jsonResponse, 'tag_name'));
$versionInfo = is_numeric($targetIndex) ? $this->jsonResponse[$targetIndex] : false;
}

@ -512,9 +512,6 @@ td.topic_id { cursor: pointer; }
<!-- ELSE -->
&nbsp;
<!-- ENDIF -->
<div style="margin-top: 5px;">
<a href="#" onclick="$.scrollTo('#forum-table', {duration: 200, axis: 'y'}); return false;">{L_MOVE_TO_TOP}</a>
</div>
</td>
</tr>
</table>
@ -608,6 +605,7 @@ td.topic_id { cursor: pointer; }
<!--bottom_info-->
<div class="bottom_info">
<a href="#" onclick="$.scrollTo('#forum-table', {duration: 200, axis: 'y'}); return false;">{L_MOVE_TO_TOP}</a>
<!-- IF PAGINATION -->
<div class="nav">

@ -582,9 +582,6 @@ function build_poll_add_form (src_el)
{S_SELECT_POST_ORDER}&nbsp;
<input type="submit" value="{L_GO}" class="lite" name="submit" />
</form>
<div style="margin-top: 5px;">
<a href="#" onclick="$.scrollTo('#topic_main', {duration: 200, axis: 'y'}); return false;">{L_MOVE_TO_TOP}</a>
</div>
</td>
</tr>
</table>
@ -653,6 +650,7 @@ function build_poll_add_form (src_el)
<!--bottom_info-->
<div class="bottom_info">
<a href="#" onclick="$.scrollTo('#topic_main', {duration: 200, axis: 'y'}); return false;">{L_MOVE_TO_TOP}</a>
<div class="jumpbox"></div>

@ -429,7 +429,8 @@ $('#tor-filelist-btn').click(function () {
ajax.exec({
action: 'thx',
mode: mode,
topic_id: {TOPIC_ID}
topic_id: {TOPIC_ID},
poster_id: {postrow.POSTER_ID}
});
}
ajax.callback.thx = function (data) {