diff options
Diffstat (limited to 'admin')
-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, |