diff options
author | plegall <plg@piwigo.org> | 2014-07-02 13:34:46 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2014-07-02 13:34:46 +0000 |
commit | 7e9b6530ecea9fc2f57b748df3a445fa7a3c88e6 (patch) | |
tree | cd8b23a524d51d5a284dc76c5b58b4ad277372cf /admin/include/photos_add_direct_prepare.inc.php | |
parent | d12f97545f541e0765f3e15bec533fb6de20441f (diff) |
feature 2616: remove useless code (photos_add_direct_process or uploadify related variables)
git-svn-id: http://piwigo.org/svn/trunk@28919 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/photos_add_direct_prepare.inc.php | 56 |
1 files changed, 3 insertions, 53 deletions
diff --git a/admin/include/photos_add_direct_prepare.inc.php b/admin/include/photos_add_direct_prepare.inc.php index 44b63082d..c917d12bd 100644 --- a/admin/include/photos_add_direct_prepare.inc.php +++ b/admin/include/photos_add_direct_prepare.inc.php @@ -21,40 +21,10 @@ // | USA. | // +-----------------------------------------------------------------------+ - -// +-----------------------------------------------------------------------+ -// | Uploaded photos | -// +-----------------------------------------------------------------------+ - -if (isset($page['thumbnails'])) -{ - $template->assign( - array( - 'thumbnails' => $page['thumbnails'], - ) - ); - - // only display the batch link if we have more than 1 photo - if (count($page['thumbnails']) > 1) - { - $template->assign( - array( - 'batch_link' => $page['batch_link'], - 'batch_label' => sprintf( - l10n('Manage this set of %d photos'), - count($page['thumbnails']) - ), - ) - ); - } -} - // +-----------------------------------------------------------------------+ // | Photo selection | // +-----------------------------------------------------------------------+ -$uploadify_path = PHPWG_ROOT_PATH.'admin/include/uploadify'; - $upload_max_filesize = min( get_ini_size('upload_max_filesize'), get_ini_size('post_max_size') @@ -72,7 +42,6 @@ else $template->assign( array( 'F_ADD_ACTION'=> PHOTOS_ADD_BASE_URL, - 'uploadify_path' => $uploadify_path, 'upload_max_filesize' => $upload_max_filesize, 'upload_max_filesize_shorthand' => $upload_max_filesize_shorthand, ) @@ -117,29 +86,10 @@ if ($conf['original_resize']) } -$upload_modes = array('html', 'multiple'); -$upload_mode = isset($conf['upload_mode']) ? $conf['upload_mode'] : 'multiple'; - -if (isset($_GET['upload_mode']) and $upload_mode != $_GET['upload_mode'] and in_array($_GET['upload_mode'], $upload_modes)) -{ - $upload_mode = $_GET['upload_mode']; - 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, - 'form_action' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode.'&processed=1', - 'switch_url' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_switch, - 'upload_id' => md5(rand()), - 'session_id' => session_id(), + 'form_action' => PHOTOS_ADD_BASE_URL, 'pwg_token' => get_pwg_token(), - 'another_upload_link' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode, ) ); @@ -151,7 +101,7 @@ if (pwg_image::get_library() == 'ext_imagick') $template->assign('tif_enabled', true); } -if ('html' == $upload_mode) +if (false) // TODO manage zip files in pwg.images.upload { $upload_file_types.= ', zip'; } @@ -278,7 +228,7 @@ if (!isset($_SESSION['upload_hide_warnings'])) $template->assign( array( 'setup_warnings' => $setup_warnings, - 'hide_warnings_link' => PHOTOS_ADD_BASE_URL.'&upload_mode='.$upload_mode.'&hide_warnings=1' + 'hide_warnings_link' => PHOTOS_ADD_BASE_URL.'&hide_warnings=1' ) ); } |