Skip to content

Commit

Permalink
feature 2616: remove useless code (photos_add_direct_process or uploa…
Browse files Browse the repository at this point in the history
…dify related variables)

git-svn-id: http://piwigo.org/svn/trunk@28919 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
plegall committed Jul 2, 2014
1 parent d12f975 commit 7e9b653
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 590 deletions.
56 changes: 3 additions & 53 deletions admin/include/photos_add_direct_prepare.inc.php
Expand Up @@ -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')
Expand All @@ -72,7 +42,6 @@
$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,
)
Expand Down Expand Up @@ -117,29 +86,10 @@
}


$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,
)
);

Expand All @@ -151,7 +101,7 @@
$template->assign('tif_enabled', true);
}

if ('html' == $upload_mode)
if (false) // TODO manage zip files in pwg.images.upload
{
$upload_file_types.= ', zip';
}
Expand Down Expand Up @@ -278,7 +228,7 @@
$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'
)
);
}
Expand Down
242 changes: 0 additions & 242 deletions admin/include/photos_add_direct_process.inc.php

This file was deleted.

Binary file removed admin/include/uploadify/cancel.png
Binary file not shown.
38 changes: 0 additions & 38 deletions admin/include/uploadify/jquery.uploadify.v3.0.0.min.js

This file was deleted.

0 comments on commit 7e9b653

Please sign in to comment.