aboutsummaryrefslogtreecommitdiffstats
path: root/admin/configuration.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2008-03-05 01:50:08 +0000
committerrvelices <rv-github@modusoptimus.com>2008-03-05 01:50:08 +0000
commit152d07d752a6da15518d22deed573e1d26b8193c (patch)
treea8d2b4c75c4eade36a08112d984240e36ab0525a /admin/configuration.php
parent925f581f2864cbb35cdb8b344d0d29f2659707d4 (diff)
- admin comments, configuration, element_set_global, element_set_unit, thumbnail and double_select migration to smarty
- fix in redirect.tpl git-svn-id: http://piwigo.org/svn/trunk@2249 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/configuration.php54
1 files changed, 18 insertions, 36 deletions
diff --git a/admin/configuration.php b/admin/configuration.php
index 1f96265ec..9f741ad89 100644
--- a/admin/configuration.php
+++ b/admin/configuration.php
@@ -49,6 +49,7 @@ else
}
$main_checkboxes = array(
+ 'gallery_locked',
'allow_user_registration',
'obligatory_user_mail_address',
'rate',
@@ -169,37 +170,23 @@ $tabsheet->select($page['section']);
// Assign tabsheet to template
$tabsheet->assign();
-$action = PHPWG_ROOT_PATH.'admin.php?page=configuration';
+$action = get_root_url().'admin.php?page=configuration';
$action.= '&amp;section='.$page['section'];
$template->assign_vars(
array(
- 'L_YES'=>l10n('yes'),
- 'L_NO'=>l10n('no'),
- 'L_SUBMIT'=>l10n('submit'),
- 'L_RESET'=>l10n('reset'),
-
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=configuration',
+ 'U_HELP' => get_root_url().'popuphelp.php?page=configuration',
'F_ACTION'=>$action
));
-$html_check='checked="checked"';
-
-$include_submit_buttons = true;
-
switch ($page['section'])
{
case 'main' :
{
- $lock_yes = ($conf['gallery_locked']==true)?'checked="checked"':'';
- $lock_no = ($conf['gallery_locked']==false)?'checked="checked"':'';
-
- $template->assign_block_vars(
+ $template->assign(
'main',
array(
- 'GALLERY_LOCKED_YES'=>$lock_yes,
- 'GALLERY_LOCKED_NO'=>$lock_no,
'CONF_GALLERY_TITLE' => htmlspecialchars($conf['gallery_title']),
'CONF_PAGE_BANNER' => htmlspecialchars($conf['page_banner']),
'CONF_GALLERY_URL' => $conf['gallery_url'],
@@ -207,11 +194,12 @@ switch ($page['section'])
foreach( $main_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'main',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
@@ -219,22 +207,21 @@ switch ($page['section'])
case 'history' :
{
//Necessary for merge_block_vars
- $template->assign_block_vars('history', array());
-
foreach( $history_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'history',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
}
case 'comments' :
{
- $template->assign_block_vars(
+ $template->assign(
'comments',
array(
'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
@@ -242,11 +229,12 @@ switch ($page['section'])
foreach( $comments_checkboxes as $checkbox)
{
- $template->merge_block_vars(
+ $template->append(
'comments',
array(
- strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
- )
+ $checkbox => $conf[$checkbox]
+ ),
+ true
);
}
break;
@@ -273,17 +261,11 @@ switch ($page['section'])
'',
$edit_user
);
- $template->assign_block_vars('default', array());
- $include_submit_buttons = false;
+ $template->assign('default', array());
break;
}
}
-if ($include_submit_buttons)
-{
- $template->assign_block_vars('include_submit_buttons', array());
-}
-
//----------------------------------------------------------- sending html code
$template->assign_var_from_handle('ADMIN_CONTENT', 'config');
?>