Ignore:
Timestamp:
May 22, 2011, 12:23:03 PM (14 years ago)
Author:
mistic100
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/bbcode_bar/admin.php

    r9965 r10983  
    88if (strpos($conf['bbcode_bar'],',') !== false)
    99{
    10         include(BBcode_PATH .'maintain.inc.php');
    11         plugin_activate();
     10  include(BBcode_PATH .'maintain.inc.php');
     11  plugin_activate();
    1212}
    1313
     
    1616// Enregistrement de la configuration
    1717if (isset($_POST['submit']))
    18 {       
    19         // nouveau tableau de config
    20         unset($conf_bbcode_bar);
    21         foreach(unserialize(BBcode_codes) as $key) {
    22                 $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false;
    23         }
    24        
    25         // enregistrement
    26     $query = "UPDATE " . CONFIG_TABLE . "
    27                 SET value='" . serialize($conf_bbcode_bar) . "'
    28                 WHERE param='bbcode_bar'";
    29     pwg_query($query);
    30     array_push($page['infos'], l10n('Information data registered in database'));
     18
     19  // nouveau tableau de config
     20  unset($conf_bbcode_bar);
     21  foreach(unserialize(BBcode_codes) as $key) {
     22    $conf_bbcode_bar[$key] = (isset($_POST[$key])) ? true : false;
     23  }
     24 
     25  // enregistrement
     26  conf_update_param('bbcode_bar', serialize($conf_bbcode_bar));
     27  array_push($page['infos'], l10n('Information data registered in database'));
    3128}
    3229
    3330// Parametrage du template
    3431foreach(unserialize(BBcode_codes) as $key) {
    35         $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null);
     32  $template->assign(strtoupper($key).'_STATUS', ($conf_bbcode_bar[$key] == 1) ? 'checked="checked"' : null);
    3633}
    3734
Note: See TracChangeset for help on using the changeset viewer.