Changeset 1728 for trunk

Show
Ignore:
Timestamp:
06/08/07 21:22:46 (18 months ago)
Author:
cfriesen
Message:

That giant IF statement was scary.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/admin/config.php

    r1580 r1728  
    2828/*************** Config management ************/ 
    2929 
     30$OBSOLETE_CONFIG_OPTIONS = array('rss.config.plugins', 
     31  'rss.output.theme', 
     32  'rss.output.barefrontpage', 
     33  'rss.output.noreaditems', 
     34  'rss.output.cachedir', 
     35  'rss.output.showdevloglink', 
     36  'rss.output.numitemsonpage'); 
     37 
    3038function config() { 
     39    global $OBSOLETE_CONFIG_OPTIONS; 
     40     
    3141    echo "<h2 class=\"trigger\">".__('Configuration:')."</h2>\n" 
    3242    ."<div id=\"admin_config\" class=\"trigger\">\n"; 
     
    4151    while ($row = rss_fetch_assoc($res)) { 
    4252        // Don't show old/moved config keys in the main config list 
    43         if ($row['key_'] == 'rss.config.plugins' or 
    44                 $row['key_'] == 'rss.output.theme' or 
    45                 $row['key_'] == 'rss.output.barefrontpage' or 
    46                 $row['key_'] == 'rss.output.noreaditems' or 
    47                 $row['key_'] == 'rss.output.cachedir' or 
    48                 $row['key_'] == 'rss.config.showdevloglink' or 
    49                 $row['key_'] == 'rss.output.numitemsonpage') { 
     53        if (in_array($row['key_'], $OBSOLETE_CONFIG_OPTIONS)) { 
    5054            continue; 
    5155        }