Ignore:
Timestamp:
May 22, 2011, 12:34:18 PM (13 years ago)
Author:
mistic100
Message:

code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_on_Albums/admin/config.php

    r9766 r10984  
    33
    44// +-----------------------------------------------------------------------+
    5 //                              Save configuration
     5//        Save configuration
    66// +-----------------------------------------------------------------------+
    77if (isset($_POST['config_submit'])) {
    8         $conf['comments_on_albums'] = array(
    9                 'icon_color' => $_POST['icon_color'],
    10                 'icon_color_over' => $_POST['icon_color_over'],
    11         );
    12        
    13         pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($conf['comments_on_albums']) . "' WHERE `param` = 'comments_on_albums';");
    14         array_push($page['infos'], l10n('Information data registered in database'));
    15 }       
     8  $conf['comments_on_albums'] = array(
     9    'icon_color' => $_POST['icon_color'],
     10    'icon_color_over' => $_POST['icon_color_over'],
     11  );
     12 
     13  conf_update_param('comments_on_albums', serialize($conf['comments_on_albums']));
     14  array_push($page['infos'], l10n('Information data registered in database'));
     15} 
    1616
    1717
    1818// +-----------------------------------------------------------------------+
    19 //                              Template
     19//        Template
    2020// +-----------------------------------------------------------------------+
    2121
     
    2323$dh = opendir(COA_PATH . 'template/s26');
    2424while (($file = readdir($dh)) !== false ) {
    25         if ($file !== '.' AND $file !== '..'
    26         AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) {
    27                 $template->append('COLORS', $file);
    28         }
     25  if ($file !== '.' AND $file !== '..'
     26  AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) {
     27    $template->append('COLORS', $file);
     28  }
    2929}
    3030closedir($dh);
    31        
     31 
    3232$template->assign(array(
    33         'ICON_COLOR' => $conf['comments_on_albums']['icon_color'],
    34         'ICON_COLOR_OVER' => $conf['comments_on_albums']['icon_color_over'],
     33  'ICON_COLOR' => $conf['comments_on_albums']['icon_color'],
     34  'ICON_COLOR_OVER' => $conf['comments_on_albums']['icon_color_over'],
    3535));
    3636
Note: See TracChangeset for help on using the changeset viewer.