Ignore:
Timestamp:
Mar 9, 2006, 2:57:13 AM (18 years ago)
Author:
rvelices
Message:

bug 255: parameter values in #config limited to 255 chars (value becomes text)

feature 303: page banner moved from combination of gallery_title,
gallery_description and template to database (simplifies user customization)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r1048 r1071  
    5151  {
    5252    $conf[$row['param']] = $_POST[$row['param']];
    53   }
    54 }                                         
     53    if ( 'page_banner'==$row['param'] )
     54    { // should we do it for all ?
     55      $conf[$row['param']] = stripslashes( $conf[$row['param']] );
     56    }
     57  }
     58}
    5559//------------------------------ verification and registration of modifications
    5660if (isset($_POST['submit']))
     
    106110    }
    107111  }
    108  
     112
    109113  // updating configuration if no error found
    110114  if (count($page['errors']) == 0)
     
    117121      {
    118122        $value = $_POST[$row['param']];
    119      
    120         if ('gallery_title' == $row['param']
    121             or 'gallery_description' == $row['param'])
     123
     124        if ('gallery_title' == $row['param'])
    122125        {
    123126          if (!$conf['allow_html_descriptions'])
     
    126129          }
    127130        }
    128        
     131
    129132        $query = '
    130133UPDATE '.CONFIG_TABLE.'
     
    153156
    154157    'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=configuration',
    155    
     158
    156159    'F_ACTION'=>$action
    157160    ));
     
    162165  {
    163166    $html_check='checked="checked"';
    164    
     167
    165168    $history_yes = ($conf['log']=='true')?'checked="checked"':'';
    166169    $history_no  = ($conf['log']=='false')?'checked="checked"':'';
    167170    $lock_yes = ($conf['gallery_locked']=='true')?'checked="checked"':'';
    168171    $lock_no = ($conf['gallery_locked']=='false')?'checked="checked"':'';
    169    
     172
    170173    $template->assign_block_vars(
    171174      'general',
     
    179182             ? 'RATE_ANONYMOUS_YES' : 'RATE_ANONYMOUS_NO')=>$html_check,
    180183        'CONF_GALLERY_TITLE' => $conf['gallery_title'],
    181         'CONF_GALLERY_DESCRIPTION' => $conf['gallery_description'],
     184        'CONF_PAGE_BANNER' => $conf['page_banner'],
    182185        'CONF_GALLERY_URL' => $conf['gallery_url'],
    183186        ));
     
    190193    $validate_yes = ($conf['comments_validation']=='true')?'checked="checked"':'';
    191194    $validate_no = ($conf['comments_validation']=='false')?'checked="checked"':'';
    192      
     195
    193196    $template->assign_block_vars(
    194197      'comments',
     
    208211    $expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
    209212    $expand_no  = ($conf['auto_expand']=='false')?'checked="checked"':'';
    210      
     213
    211214    $template->assign_block_vars(
    212215      'default',
     
    223226        'SHOW_COMMENTS_NO'=>$show_no
    224227        ));
    225    
     228
    226229    $blockname = 'default.language_option';
    227    
     230
    228231    foreach (get_languages() as $language_code => $language_name)
    229232    {
     
    242245        $selected = '';
    243246      }
    244      
     247
    245248      $template->assign_block_vars(
    246249        $blockname,
     
    270273        $selected = '';
    271274      }
    272      
     275
    273276      $template->assign_block_vars(
    274277        $blockname,
     
    281284    }
    282285
    283  
     286
    284287    break;
    285288  }
Note: See TracChangeset for help on using the changeset viewer.