fixes #1554 no need to store the selected album in session

This commit is contained in:
plegall
2021-11-09 16:21:56 +01:00
parent 8ef50d84e4
commit 26492d4f9b

View File

@@ -100,9 +100,6 @@ SELECT id, uppercats
if (pwg_db_num_rows($result) == 1)
{
$selected_category = array($_GET['album']);
// lets put in the session to persist in case of upload method switch
$_SESSION['selected_category'] = $selected_category;
$cat = pwg_db_fetch_assoc($result);
$template->assign('ADD_TO_ALBUM', get_cat_display_name_cache($cat['uppercats'], null));
@@ -112,10 +109,6 @@ SELECT id, uppercats
fatal_error('[Hacking attempt] the album id = "'.$_GET['album'].'" is not valid');
}
}
else if (isset($_SESSION['selected_category']))
{
$selected_category = $_SESSION['selected_category'];
}
else
{
// we need to know the category in which the last photo was added