feature 1600: the upload_mode is "remembered".

git-svn-id: http://piwigo.org/svn/trunk@5812 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall 2010-04-12 09:35:33 +00:00
parent 342d40075c
commit 8571655d0f

View file

@ -329,18 +329,19 @@ $template->assign(
);
$upload_modes = array('html', 'multiple');
$upload_mode = isset($conf['upload_mode']) ? $conf['upload_mode'] : 'multiple';
$upload_mode = 'multiple';
$upload_switch = 'html';
if (isset($_GET['upload_mode']) and in_array($_GET['upload_mode'], $upload_modes))
{
$index_of_upload_mode = array_flip($upload_modes);
$upload_mode_index = $index_of_upload_mode[ $_GET['upload_mode'] ];
$upload_mode = $_GET['upload_mode'];
$upload_switch = $upload_modes[ ($upload_mode_index + 1) % 2 ];
conf_update_param('upload_mode', $upload_mode);
}
// what is the upload switch mode
$index_of_upload_mode = array_flip($upload_modes);
$upload_mode_index = $index_of_upload_mode[$upload_mode];
$upload_switch = $upload_modes[ ($upload_mode_index + 1) % 2 ];
$template->assign(
array(
'upload_mode' => $upload_mode,