Minor improvements (#1355)

* Minor improvements

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-01-28 10:17:19 +07:00 committed by GitHub
commit 0a25af04e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 18 deletions

View file

@ -28,7 +28,7 @@
- Fixed HTTP 500 while cron running in server-side [\#1321](https://github.com/torrentpier/torrentpier/pull/1321) ([belomaxorka](https://github.com/belomaxorka))
- Sending debug errors to us 🌚 via Telegram bot [\#1323](https://github.com/torrentpier/torrentpier/pull/1323) ([belomaxorka](https://github.com/belomaxorka))
- Don't update downloads counter if attachment not exists [\#1345](https://github.com/torrentpier/torrentpier/pull/1345) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315), [\#1328](https://github.com/torrentpier/torrentpier/pull/1328), [\#1338](https://github.com/torrentpier/torrentpier/pull/1338), [\#1353](https://github.com/torrentpier/torrentpier/pull/1353) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1306](https://github.com/torrentpier/torrentpier/pull/1306), [\#1307](https://github.com/torrentpier/torrentpier/pull/1307), [\#1308](https://github.com/torrentpier/torrentpier/pull/1308), [\#1315](https://github.com/torrentpier/torrentpier/pull/1315), [\#1328](https://github.com/torrentpier/torrentpier/pull/1328), [\#1338](https://github.com/torrentpier/torrentpier/pull/1338), [\#1353](https://github.com/torrentpier/torrentpier/pull/1353), [\#1355](https://github.com/torrentpier/torrentpier/pull/1355) ([belomaxorka](https://github.com/belomaxorka))
- Some bugfixes [\#1326](https://github.com/torrentpier/torrentpier/pull/1326) ([belomaxorka](https://github.com/belomaxorka))
- Updated deps [\#1304](https://github.com/torrentpier/torrentpier/pull/1304), [\#1305](https://github.com/torrentpier/torrentpier/pull/1305) ([belomaxorka](https://github.com/belomaxorka))
- New Crowdin updates [\#1311](https://github.com/torrentpier/torrentpier/pull/1311), [\#1314](https://github.com/torrentpier/torrentpier/pull/1314), [\#1335](https://github.com/torrentpier/torrentpier/pull/1335), [\#1337](https://github.com/torrentpier/torrentpier/pull/1337), [\#1344](https://github.com/torrentpier/torrentpier/pull/1344) ([Exileum](https://github.com/Exileum))

View file

@ -7,22 +7,6 @@
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
/**
* Setup s_auth_can in viewforum and viewtopic (viewtopic.php/viewforum.php)
*/
function attach_build_auth_levels($is_auth, &$s_auth_can)
{
global $lang, $attach_config;
if ((int)$attach_config['disable_mod']) {
return;
}
// If you want to have the rules window link within the forum view too, comment out the two lines, and comment the third line
$s_auth_can .= (($is_auth['auth_attachments']) ? $lang['RULES_ATTACH_CAN'] : $lang['RULES_ATTACH_CANNOT']) . '<br />';
$s_auth_can .= (($is_auth['auth_download']) ? $lang['RULES_DOWNLOAD_CAN'] : $lang['RULES_DOWNLOAD_CANNOT']) . '<br />';
}
/**
* Called from admin_users.php and admin_groups.php in order to process Quota Settings (admin/admin_users.php:admin/admin_groups.php)
*/

View file

@ -23,6 +23,7 @@ $template->assign_vars(['DL_BUTTONS' => false]);
$count_mode = ($bb_cfg['bt_dl_list_only_count'] && !(@$_GET['dl'] === 'names'));
$have_dl_buttons_enabled = ($bb_cfg['bt_show_dl_but_will'] || $bb_cfg['bt_show_dl_but_down'] || $bb_cfg['bt_show_dl_but_compl'] || $bb_cfg['bt_show_dl_but_cancel']);
$dl_topic = ($t_data['topic_dl_type'] == TOPIC_DL_TYPE_DL && !($bb_cfg['bt_dl_list_only_1st_page'] && $start));
$show_dl_list = ($dl_topic && ($bb_cfg['bt_show_dl_list'] || ($bb_cfg['allow_dl_list_names_mode'] && @$_GET['dl'] === 'names')));
$show_dl_buttons = (!IS_GUEST && $dl_topic && $bb_cfg['bt_show_dl_list_buttons']);
@ -98,7 +99,7 @@ if ($show_dl_list) {
]);
}
}
} else {
} elseif ($bb_cfg['bt_show_dl_list_buttons'] && $have_dl_buttons_enabled) {
$template->assign_block_vars('dl_list_none', []);
}
}