diff options
author | plegall <plg@piwigo.org> | 2010-04-12 09:35:33 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-04-12 09:35:33 +0000 |
commit | 8571655d0f933a716d1063e12bbed809d575cbff (patch) | |
tree | 5ca15b7af88ceaec3ab425a52da9b5f09f972283 /admin/photos_add_direct.php | |
parent | 342d40075c442f131677a5f0d9a949859226a058 (diff) |
feature 1600: the upload_mode is "remembered".
git-svn-id: http://piwigo.org/svn/trunk@5812 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/photos_add_direct.php')
-rw-r--r-- | admin/photos_add_direct.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/admin/photos_add_direct.php b/admin/photos_add_direct.php index ec7235ad7..bda9ea8fc 100644 --- a/admin/photos_add_direct.php +++ b/admin/photos_add_direct.php @@ -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, |