mirror of
https://github.com/torrentpier/torrentpier-lts.git
synced 2025-02-28 15:10:54 +03:00
Redirect to viewprofile.php if profile.php hasn't arguments (#202)
* Redirect to viewprofile.php if profile.php hasn't arguments * Update CHANGELOG.md
This commit is contained in:
parent
a3494791b7
commit
690f34d50b
@ -6,6 +6,7 @@
|
|||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
- Release v2.1.5-2023.06 🎉
|
- Release v2.1.5-2023.06 🎉
|
||||||
|
- Redirect to viewprofile.php if profile.php hasn't arguments [\#202](https://github.com/torrentpier/torrentpier-lts/pull/202) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Show smilies in post for guests [\#196](https://github.com/torrentpier/torrentpier-lts/pull/196) ([belomaxorka](https://github.com/belomaxorka))
|
- Show smilies in post for guests [\#196](https://github.com/torrentpier/torrentpier-lts/pull/196) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Added showing PM counter in page title [\#193](https://github.com/torrentpier/torrentpier-lts/pull/193) ([belomaxorka](https://github.com/belomaxorka))
|
- Added showing PM counter in page title [\#193](https://github.com/torrentpier/torrentpier-lts/pull/193) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
- Corrected translations [\#183](https://github.com/torrentpier/torrentpier-lts/pull/183) ([belomaxorka](https://github.com/belomaxorka))
|
- Corrected translations [\#183](https://github.com/torrentpier/torrentpier-lts/pull/183) ([belomaxorka](https://github.com/belomaxorka))
|
||||||
|
@ -8,19 +8,22 @@ $datastore->enqueue(array(
|
|||||||
'ranks',
|
'ranks',
|
||||||
));
|
));
|
||||||
|
|
||||||
if (empty($_GET[POST_USERS_URL]) || $_GET[POST_USERS_URL] == GUEST_UID)
|
|
||||||
{
|
|
||||||
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
|
||||||
}
|
|
||||||
if (!$profiledata = get_userdata($_GET[POST_USERS_URL]))
|
|
||||||
{
|
|
||||||
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$userdata['session_logged_in'])
|
if (!$userdata['session_logged_in'])
|
||||||
{
|
{
|
||||||
redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}");
|
redirect(LOGIN_URL . "?redirect={$_SERVER['REQUEST_URI']}");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (empty($_GET[POST_USERS_URL]))
|
||||||
|
{
|
||||||
|
$_GET[POST_USERS_URL] = $userdata['user_id'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$profiledata = get_userdata($_GET[POST_USERS_URL]))
|
||||||
|
{
|
||||||
|
bb_die($lang['NO_USER_ID_SPECIFIED']);
|
||||||
|
}
|
||||||
|
|
||||||
if (!$ranks = $datastore->get('ranks'))
|
if (!$ranks = $datastore->get('ranks'))
|
||||||
{
|
{
|
||||||
@ -220,4 +223,4 @@ if (bf($profiledata['user_opt'], 'user_opt', 'dis_topic')) $user_restriction
|
|||||||
|
|
||||||
$template->assign_var('USER_RESTRICTIONS', join('</li><li>', $user_restrictions));
|
$template->assign_var('USER_RESTRICTIONS', join('</li><li>', $user_restrictions));
|
||||||
|
|
||||||
print_page('usercp_viewprofile.tpl');
|
print_page('usercp_viewprofile.tpl');
|
||||||
|
@ -9,7 +9,7 @@ require(BB_ROOT . 'common.php');
|
|||||||
$user->session_start();
|
$user->session_start();
|
||||||
|
|
||||||
set_die_append_msg();
|
set_die_append_msg();
|
||||||
$mode = request_var('mode', '');
|
$mode = request_var('mode', 'viewprofile');
|
||||||
|
|
||||||
switch ($mode)
|
switch ($mode)
|
||||||
{
|
{
|
||||||
@ -47,4 +47,4 @@ switch ($mode)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
bb_die('Invalid mode');
|
bb_die('Invalid mode');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user