mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-12 11:43:01 +02:00
Resolved issue 0000823: Enhance upload functionalities
First commit, others will be follow. Not hesitate to change my translations. Add upload configuration tabsheet (move and add configuration) Change and add define for access level Can show upload link every time Can restrict access upload.class.php Can choice category on upload page Add upload class not use for the moment Review quickly and temporary style of upload.tpl git-svn-id: http://piwigo.org/svn/trunk@2325 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+39
-4
@@ -51,7 +51,6 @@ $main_checkboxes = array(
|
||||
'rate',
|
||||
'rate_anonymous',
|
||||
'email_admin_on_new_user',
|
||||
'email_admin_on_picture_uploaded',
|
||||
);
|
||||
|
||||
$history_checkboxes = array(
|
||||
@@ -60,6 +59,11 @@ $history_checkboxes = array(
|
||||
'history_guest'
|
||||
);
|
||||
|
||||
$upload_checkboxes = array(
|
||||
'upload_link_everytime',
|
||||
'email_admin_on_picture_uploaded',
|
||||
);
|
||||
|
||||
$comments_checkboxes = array(
|
||||
'comments_forall',
|
||||
'comments_validation',
|
||||
@@ -110,6 +114,14 @@ if (isset($_POST['submit']) and !is_adviser())
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'upload' :
|
||||
{
|
||||
foreach( $upload_checkboxes as $checkbox)
|
||||
{
|
||||
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'default' :
|
||||
{
|
||||
// Never go here
|
||||
@@ -160,6 +172,7 @@ $tabsheet = new tabsheet();
|
||||
$tabsheet->add('main', l10n('conf_main_title'), $conf_link.'main');
|
||||
$tabsheet->add('history', l10n('conf_history_title'), $conf_link.'history');
|
||||
$tabsheet->add('comments', l10n('conf_comments_title'), $conf_link.'comments');
|
||||
$tabsheet->add('upload', l10n('conf_upload_title'), $conf_link.'upload');
|
||||
$tabsheet->add('default', l10n('conf_display'), $conf_link.'default');
|
||||
// TabSheet selection
|
||||
$tabsheet->select($page['section']);
|
||||
@@ -187,7 +200,7 @@ switch ($page['section'])
|
||||
'CONF_GALLERY_URL' => $conf['gallery_url'],
|
||||
));
|
||||
|
||||
foreach( $main_checkboxes as $checkbox)
|
||||
foreach ($main_checkboxes as $checkbox)
|
||||
{
|
||||
$template->append(
|
||||
'main',
|
||||
@@ -202,7 +215,7 @@ switch ($page['section'])
|
||||
case 'history' :
|
||||
{
|
||||
//Necessary for merge_block_vars
|
||||
foreach( $history_checkboxes as $checkbox)
|
||||
foreach ($history_checkboxes as $checkbox)
|
||||
{
|
||||
$template->append(
|
||||
'history',
|
||||
@@ -222,7 +235,7 @@ switch ($page['section'])
|
||||
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
|
||||
));
|
||||
|
||||
foreach( $comments_checkboxes as $checkbox)
|
||||
foreach ($comments_checkboxes as $checkbox)
|
||||
{
|
||||
$template->append(
|
||||
'comments',
|
||||
@@ -234,6 +247,28 @@ switch ($page['section'])
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'upload' :
|
||||
{
|
||||
$template->assign(
|
||||
'upload',
|
||||
array(
|
||||
'upload_user_access_options'=> get_user_access_level_html_options(ACCESS_GUEST),
|
||||
'upload_user_access_options_selected' => array($conf['upload_user_access'])
|
||||
)
|
||||
);
|
||||
//Necessary for merge_block_vars
|
||||
foreach ($upload_checkboxes as $checkbox)
|
||||
{
|
||||
$template->append(
|
||||
'upload',
|
||||
array(
|
||||
$checkbox => $conf[$checkbox]
|
||||
),
|
||||
true
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'default' :
|
||||
{
|
||||
$edit_user = build_user($conf['default_user_id'], false);
|
||||
|
||||
Reference in New Issue
Block a user