mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-19 21:03:54 -07:00
Minor improvements (#1570)
* Minor improvements * Update index_data.php * Updated * Updated * Update CHANGELOG.md * Update common.php * Updated * Revert "Updated" This reverts commitf5227b4083
. * Revert "Updated" This reverts commit911ac4ac29
. * Revert "Updated" This reverts commit3e19c1a973
. * Update CHANGELOG.md
This commit is contained in:
parent
360b66baca
commit
c25a6f1dde
4 changed files with 15 additions and 16 deletions
|
@ -10,6 +10,8 @@
|
||||||
- Added showing releaser stats in profile [\#1568](https://github.com/torrentpier/torrentpier/pull/1568) ([belomaxorka](https://github.com/belomaxorka))
|
- Added showing releaser stats in profile [\#1568](https://github.com/torrentpier/torrentpier/pull/1568) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka))
|
- Fixed `md5()` deprecated in PHP 8.4 [\#1561](https://github.com/torrentpier/torrentpier/pull/1561) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka))
|
- Increased `USEREMAIL_MAX_LENGTH` [\#1566](https://github.com/torrentpier/torrentpier/pull/1566) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
- Minor improvements [\#1570](https://github.com/torrentpier/torrentpier/pull/1570) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
- New Crowdin updates [\#1569](https://github.com/torrentpier/torrentpier/pull/1569) ([Exileum](https://github.com/Exileum))
|
||||||
|
|
||||||
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)
|
## [v2.4.4](https://github.com/torrentpier/torrentpier/tree/v2.4.4) (2024-07-22)
|
||||||
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.3...v2.4.4)
|
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.3...v2.4.4)
|
||||||
|
|
|
@ -172,7 +172,7 @@ function utime()
|
||||||
return array_sum(explode(' ', microtime()));
|
return array_sum(explode(' ', microtime()));
|
||||||
}
|
}
|
||||||
|
|
||||||
function bb_log($msg, $file_name = 'logs.log', $return_path = false)
|
function bb_log($msg, $file_name = 'logs', $return_path = false)
|
||||||
{
|
{
|
||||||
if (is_array($msg)) {
|
if (is_array($msg)) {
|
||||||
$msg = implode(LOG_LF, $msg);
|
$msg = implode(LOG_LF, $msg);
|
||||||
|
|
|
@ -124,33 +124,30 @@ switch ($mode) {
|
||||||
|
|
||||||
case 'releaser_stats':
|
case 'releaser_stats':
|
||||||
$user_id = (int)$this->request['user_id'];
|
$user_id = (int)$this->request['user_id'];
|
||||||
if (!IS_ADMIN && $user_id != $userdata['user_id']) {
|
|
||||||
$this->ajax_die($lang['NOT_AUTHORISED']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = "
|
$sql = "
|
||||||
SELECT COUNT(tor.poster_id) as total_releases, SUM(tor.size) as total_size, tor.poster_id, SUM(ad.download_count) as download_count
|
SELECT COUNT(tor.poster_id) as total_releases, SUM(tor.size) as total_size, SUM(tor.complete_count) as total_complete, SUM(ad.download_count) as total_dl_count
|
||||||
FROM " . BB_BT_TORRENTS . " tor
|
FROM " . BB_BT_TORRENTS . " tor
|
||||||
LEFT JOIN " . BB_USERS . " u ON(u.user_id = tor.poster_id)
|
LEFT JOIN " . BB_USERS . " u ON(u.user_id = tor.poster_id)
|
||||||
LEFT JOIN " . BB_ATTACHMENTS_DESC . " ad ON(ad.attach_id = tor.attach_id)
|
LEFT JOIN " . BB_ATTACHMENTS_DESC . " ad ON(ad.attach_id = tor.attach_id)
|
||||||
LEFT JOIN " . BB_BT_USERS . " ut ON(ut.user_id = tor.poster_id)
|
LEFT JOIN " . BB_BT_USERS . " ut ON(ut.user_id = tor.poster_id)
|
||||||
WHERE u.user_id = $user_id
|
WHERE u.user_id = $user_id
|
||||||
GROUP BY tor.poster_id
|
GROUP BY tor.poster_id
|
||||||
ORDER BY SUM(ad.download_count) DESC
|
LIMIT 1
|
||||||
";
|
";
|
||||||
|
|
||||||
$total_releases_size = $total_releases = $total_releases_completed = 0;
|
$total_releases_size = $total_releases = $total_releases_completed = $total_releases_downloaded = 0;
|
||||||
if ($row = DB()->fetch_row($sql)) {
|
if ($row = DB()->fetch_row($sql)) {
|
||||||
$total_releases = $row['total_releases'];
|
$total_releases = $row['total_releases'];
|
||||||
$total_releases_size = humn_size($row['total_size']);
|
$total_releases_size = humn_size($row['total_size']);
|
||||||
$total_releases_completed = $row['download_count'];
|
$total_releases_downloaded = $row['total_dl_count'];
|
||||||
|
$total_releases_completed = $row['total_complete'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$html = '[
|
$html = '[
|
||||||
' . $lang['RELEASES'] . ': <span class="seed bold">' . $total_releases . '</span> |
|
' . $lang['RELEASES'] . ': <span class="seed bold">' . $total_releases . '</span> |
|
||||||
' . $lang['RELEASER_STAT_SIZE'] . ' <span class="seed bold">' . $total_releases_size . '</span> |
|
' . $lang['RELEASER_STAT_SIZE'] . ' <span class="seed bold">' . $total_releases_size . '</span> |
|
||||||
' . $lang['DOWNLOADED'] . ': <span class="seed bold">' . declension((int)$total_releases_completed, 'times') . '</span> ]
|
' . $lang['DOWNLOADED'] . ': <span title="' . $lang['COMPLETED'] . ': ' . declension((int)$total_releases_completed, 'times') . '" class="seed bold">' . declension((int)$total_releases_downloaded, 'times') . '</span> ]';
|
||||||
';
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'get_traf_stats':
|
case 'get_traf_stats':
|
||||||
|
|
|
@ -462,12 +462,12 @@ ajax.callback.group_membership = function(data) {
|
||||||
<td><b>{AGE}</b></td>
|
<td><b>{AGE}</b></td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF SHOW_BT_USERDATA --><!-- IF PROFILE_USER || IS_ADMIN -->
|
<!-- IF SHOW_BT_USERDATA -->
|
||||||
<tr>
|
<tr>
|
||||||
<th>{L_RELEASER_STAT}</th>
|
<th>{L_RELEASER_STAT}</th>
|
||||||
<td id="releases_profile">[ <a href="#" class="med" onclick="ajax.index_data('releaser_stats'); return false;">{L_RELEASER_STAT_SHOW}</a> ]</td>
|
<td id="releases_profile">[ <a href="#" class="med" onclick="ajax.index_data('releaser_stats'); return false;">{L_RELEASER_STAT_SHOW}</a> ]</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF --><!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF SHOW_BT_USERDATA -->
|
<!-- IF SHOW_BT_USERDATA -->
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" class="pad_4">
|
<td colspan="2" class="pad_4">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue