Ignore:
Timestamp:
Jan 23, 2007, 11:03:06 PM (17 years ago)
Author:
rub
Message:

Undo r1677 functions_html.inc.php, because links are wrong.
I wanted to add flat_cat on categories url, but I will keep same comportment of the calendar.

Some improvements when updating #_config table

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r1744 r1748  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | branch        : BSF (Best So Far)
     
    129129  {
    130130    //echo '<pre>'; print_r($_POST); echo '</pre>';
    131     $result = pwg_query('SELECT * FROM '.CONFIG_TABLE);
     131    $result = pwg_query('SELECT param FROM '.CONFIG_TABLE);
    132132    while ($row = mysql_fetch_array($result))
    133133    {
     
    154154    array_push($page['infos'], $lang['conf_confirmation']);
    155155  }
    156 }
    157 
    158 //------------------------------------------------------ $conf reinitialization
    159 $result = pwg_query('SELECT param,value FROM '.CONFIG_TABLE);
    160 while ($row = mysql_fetch_array($result))
    161 {
    162   $conf[$row['param']] = $row['value'];
     156
     157  //------------------------------------------------------ $conf reinitialization
     158  load_conf_from_db();
    163159}
    164160
     
    187183  case 'general' :
    188184  {
    189     $lock_yes = ($conf['gallery_locked']=='true')?'checked="checked"':'';
    190     $lock_no = ($conf['gallery_locked']=='false')?'checked="checked"':'';
     185    $lock_yes = ($conf['gallery_locked']==true)?'checked="checked"':'';
     186    $lock_no = ($conf['gallery_locked']==false)?'checked="checked"':'';
    191187
    192188    $template->assign_block_vars(
     
    195191        'GALLERY_LOCKED_YES'=>$lock_yes,
    196192        'GALLERY_LOCKED_NO'=>$lock_no,
    197         ($conf['rate']=='true'?'RATE_YES':'RATE_NO')=>$html_check,
    198         ($conf['rate_anonymous']=='true'
     193        ($conf['rate']==true?'RATE_YES':'RATE_NO')=>$html_check,
     194        ($conf['rate_anonymous']==true
    199195             ? 'RATE_ANONYMOUS_YES' : 'RATE_ANONYMOUS_NO')=>$html_check,
    200196        'CONF_GALLERY_TITLE' => $conf['gallery_title'],
     
    208204          'general',
    209205          array(
    210             strtoupper($checkbox) => ($conf[$checkbox]=='true')?$html_check:''
     206            strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
    211207            )
    212208        );
     
    227223          'comments',
    228224          array(
    229             strtoupper($checkbox) => ($conf[$checkbox]=='true')?$html_check:''
     225            strtoupper($checkbox) => ($conf[$checkbox]==true)?$html_check:''
    230226            )
    231227        );
     
    235231  case 'default' :
    236232  {
    237     $show_yes = ($conf['show_nb_comments']=='true')?'checked="checked"':'';
    238     $show_no = ($conf['show_nb_comments']=='false')?'checked="checked"':'';
    239     $expand_yes = ($conf['auto_expand']=='true')?'checked="checked"':'';
    240     $expand_no  = ($conf['auto_expand']=='false')?'checked="checked"':'';
     233    $show_yes = ($conf['show_nb_comments']==true)?'checked="checked"':'';
     234    $show_no = ($conf['show_nb_comments']==false)?'checked="checked"':'';
     235    $expand_yes = ($conf['auto_expand']==true)?'checked="checked"':'';
     236    $expand_no  = ($conf['auto_expand']==false)?'checked="checked"':'';
    241237
    242238    $template->assign_block_vars(
Note: See TracChangeset for help on using the changeset viewer.