Minor improvements (#1338)

* Minor improvements

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-01-24 15:55:36 +07:00 committed by GitHub
commit 7f6f49c26d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 8 deletions

View file

@ -21,7 +21,7 @@
- Fixed auth(): empty $f_access [\#1329](https://github.com/torrentpier/torrentpier/pull/1329) ([belomaxorka](https://github.com/belomaxorka))
- 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))
- 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) ([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) ([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))

View file

@ -40,11 +40,10 @@ if ($is_moderator) {
if ($upload->init($bb_cfg['group_avatars'], $_FILES['avatar']) and $upload->store('avatar', ['user_id' => GROUP_AVATAR_MASK . $group_id, 'avatar_ext_id' => $group_info['avatar_ext_id']])) {
$avatar_ext_id = (int)$upload->file_ext_id;
DB()->query("UPDATE " . BB_GROUPS . " SET avatar_ext_id = $avatar_ext_id WHERE group_id = $group_id LIMIT 1");
} else {
bb_die(implode($upload->errors));
}
DB()->query("UPDATE " . BB_GROUPS . " SET avatar_ext_id = $avatar_ext_id WHERE group_id = $group_id LIMIT 1");
}
}

View file

@ -21,10 +21,10 @@ $page_cfg['include_bbcode_js'] = true;
$tracking_topics = get_tracks('topic');
$user_id = $userdata['user_id'];
if (isset($_GET['uid'])) {
if (get_username($_GET['uid'])) {
if ($_GET['uid'] == $userdata['user_id'] || IS_ADMIN) {
$user_id = DB()->escape($_GET['uid']);
if (isset($_GET[POST_USERS_URL])) {
if (get_username($_GET[POST_USERS_URL])) {
if ($_GET[POST_USERS_URL] == $userdata['user_id'] || IS_ADMIN) {
$user_id = DB()->escape($_GET[POST_USERS_URL]);
} else {
bb_die($lang['NOT_AUTHORISED']);
}

View file

@ -377,7 +377,7 @@ ajax.callback.index_data = function(data) {
[ <a href="{U_SEARCH_USER}" class="med">{L_SEARCH_USER_POSTS}</a> ]
[ <a href="{U_SEARCH_TOPICS}" class="med">{L_SEARCH_USER_TOPICS}</a> ]
[ <a href="{U_SEARCH_RELEASES}" class="med">{L_SEARCH_RELEASES}</a> ]
<!-- IF PROFILE_USER || IS_ADMIN -->[ <a href="{U_WATCHED_TOPICS}&uid={PROFILE_USER_ID}" class="med">{L_WATCHED_TOPICS}</a> ]<!-- ENDIF -->
<!-- IF PROFILE_USER || IS_ADMIN -->[ <a href="{U_WATCHED_TOPICS}&u={PROFILE_USER_ID}" class="med">{L_WATCHED_TOPICS}</a> ]<!-- ENDIF -->
[ <a title="{L_ATOM_SUBSCRIBE}" href="#" onclick="return post2url('feed.php', {mode: 'get_feed_url', type: 'u', id: {PROFILE_USER_ID}})">{FEED_IMG}</a> ]
</p>
</td>