mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixes #1554 no need to store the selected album in session
This commit is contained in:
@@ -100,9 +100,6 @@ SELECT id, uppercats
|
|||||||
if (pwg_db_num_rows($result) == 1)
|
if (pwg_db_num_rows($result) == 1)
|
||||||
{
|
{
|
||||||
$selected_category = array($_GET['album']);
|
$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);
|
$cat = pwg_db_fetch_assoc($result);
|
||||||
$template->assign('ADD_TO_ALBUM', get_cat_display_name_cache($cat['uppercats'], null));
|
$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');
|
fatal_error('[Hacking attempt] the album id = "'.$_GET['album'].'" is not valid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (isset($_SESSION['selected_category']))
|
|
||||||
{
|
|
||||||
$selected_category = $_SESSION['selected_category'];
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// we need to know the category in which the last photo was added
|
// we need to know the category in which the last photo was added
|
||||||
|
|||||||
Reference in New Issue
Block a user