aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-04-12 09:35:33 +0000
committerplegall <plg@piwigo.org>2010-04-12 09:35:33 +0000
commit8571655d0f933a716d1063e12bbed809d575cbff (patch)
tree5ca15b7af88ceaec3ab425a52da9b5f09f972283
parent342d40075c442f131677a5f0d9a949859226a058 (diff)
feature 1600: the upload_mode is "remembered".
git-svn-id: http://piwigo.org/svn/trunk@5812 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/photos_add_direct.php13
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,