Ignore:
Timestamp:
Mar 5, 2008, 2:50:08 AM (16 years ago)
Author:
rvelices
Message:
  • admin comments, configuration, element_set_global, element_set_unit, thumbnail and double_select migration to smarty
  • fix in redirect.tpl
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r2226 r2249  
    5050
    5151$main_checkboxes = array(
     52    'gallery_locked',
    5253    'allow_user_registration',
    5354    'obligatory_user_mail_address',
     
    170171$tabsheet->assign();
    171172
    172 $action = PHPWG_ROOT_PATH.'admin.php?page=configuration';
     173$action = get_root_url().'admin.php?page=configuration';
    173174$action.= '&section='.$page['section'];
    174175
    175176$template->assign_vars(
    176177  array(
    177     'L_YES'=>l10n('yes'),
    178     'L_NO'=>l10n('no'),
    179     'L_SUBMIT'=>l10n('submit'),
    180     'L_RESET'=>l10n('reset'),
    181 
    182     'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=configuration',
     178    'U_HELP' => get_root_url().'popuphelp.php?page=configuration',
    183179
    184180    'F_ACTION'=>$action
    185181    ));
    186182
    187 $html_check='checked="checked"';
    188 
    189 $include_submit_buttons = true;
    190 
    191183switch ($page['section'])
    192184{
    193185  case 'main' :
    194186  {
    195     $lock_yes = ($conf['gallery_locked']==true)?'checked="checked"':'';
    196     $lock_no = ($conf['gallery_locked']==false)?'checked="checked"':'';
    197 
    198     $template->assign_block_vars(
     187    $template->assign(
    199188      'main',
    200189      array(
    201         'GALLERY_LOCKED_YES'=>$lock_yes,
    202         'GALLERY_LOCKED_NO'=>$lock_no,
    203190        'CONF_GALLERY_TITLE' => htmlspecialchars($conf['gallery_title']),
    204191        'CONF_PAGE_BANNER' => htmlspecialchars($conf['page_banner']),
     
    208195    foreach( $main_checkboxes as $checkbox)
    209196    {
    210       $template->merge_block_vars(
     197      $template->append(
    211198          'main',
    212199          array(
    213             strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
    214             )
     200            $checkbox => $conf[$checkbox]
     201            ),
     202          true
    215203        );
    216204    }
     
    220208  {
    221209    //Necessary for merge_block_vars
    222     $template->assign_block_vars('history', array());
    223 
    224210    foreach( $history_checkboxes as $checkbox)
    225211    {
    226       $template->merge_block_vars(
     212      $template->append(
    227213          'history',
    228214          array(
    229             strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
    230             )
     215            $checkbox => $conf[$checkbox]
     216            ),
     217          true
    231218        );
    232219    }
     
    235222  case 'comments' :
    236223  {
    237     $template->assign_block_vars(
     224    $template->assign(
    238225      'comments',
    239226      array(
     
    243230    foreach( $comments_checkboxes as $checkbox)
    244231    {
    245       $template->merge_block_vars(
     232      $template->append(
    246233          'comments',
    247234          array(
    248             strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
    249             )
     235            $checkbox => $conf[$checkbox]
     236            ),
     237          true
    250238        );
    251239    }
     
    274262      $edit_user
    275263      );
    276     $template->assign_block_vars('default', array());
    277     $include_submit_buttons = false;
    278     break;
    279   }
    280 }
    281 
    282 if ($include_submit_buttons)
    283 {
    284   $template->assign_block_vars('include_submit_buttons', array());
     264    $template->assign('default', array());
     265    break;
     266  }
    285267}
    286268
Note: See TracChangeset for help on using the changeset viewer.