aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-05-02 21:56:21 +0000
committerrub <rub@piwigo.org>2008-05-02 21:56:21 +0000
commit5436a351ef6dd685483f022af6656bbf8b797cb6 (patch)
tree8d963ace1e57b404726500753111649d144527c6 /admin/configuration.php
parent7942dccf9b682d359a89636528e96af5b38327da (diff)
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
Diffstat (limited to '')
-rw-r--r--admin/configuration.php43
1 files changed, 39 insertions, 4 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 0a89f6e4b..8e69d9c16 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -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);