Ignore:
Timestamp:
2012-05-29T04:25:41+02:00 (23 months ago)
Author:
moo
Message:

improve config handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/xcache.tpl.php

    r868 r902  
    3333        <th><?php echo _T('Size'); ?></th> 
    3434        <th><?php echo _T('Avail'); ?></th> 
    35         <th><?php echo _T(isset($free_graph_width) ? '% Free' : '% Used'); ?></th> 
     35        <th><?php echo _T($config['percent_graph_type'] == 'free' ? '% Free' : '% Used'); ?></th> 
    3636        <th><?php echo _T('Clear'); ?></th> 
    3737        <th><?php echo _T('Compiling'); ?></th> 
     
    5858        $pvalue = (int) ($ci['avail'] / $ci['size'] * 100); 
    5959        $pempty = 100 - $pvalue; 
    60         if (!isset($free_graph_width)) { 
     60        if ($config['percent_graph_type'] == 'used') { 
    6161            // swap 
    6262            $tmp = $pvalue; 
     
    6565        } 
    6666 
    67         $w = $graph_width; 
     67        $w = $config['percent_graph_width']; 
    6868        if (empty($ci['istotal'])) { 
    6969            $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']); 
     
    135135    <div class="legendtitle"><?php echo _T('Legends:'); ?></div> 
    136136    <div class="legend pvalue">&nbsp;&nbsp;</div> 
    137     <div class="legendtitle"><?php echo _T(isset($free_graph_width) ? '% Free' : '% Used'); ?></div> 
     137    <div class="legendtitle"><?php echo _T($config['percent_graph_type'] == 'free' ? '% Free' : '% Used'); ?></div> 
    138138    <div class="legend" style="background: rgb(0,0,255)">&nbsp;&nbsp;</div> 
    139     <div class="legendtitle"><?php echo _T(isset($free_graph_width) ? 'Free Blocks' : 'Used Blocks'); ?></div> 
     139    <div class="legendtitle"><?php echo _T($config['percent_graph_type'] == 'free' ? 'Free Blocks' : 'Used Blocks'); ?></div> 
    140140    <div class="legend" style="background: rgb(255,0,0)">&nbsp;&nbsp;</div> 
    141141    <div class="legendtitle"><?php echo _T('Hits'); ?></div> 
     
    145145if ($cachelist) { 
    146146    $isphp = $cachelist['type'] == $type_php; 
    147     if (function_exists("ob_filter_path_nicer")) { 
    148         ob_start("ob_filter_path_nicer"); 
    149     } 
     147    ob_start($config['path_nicer']); 
    150148    foreach (array('Cached' => $cachelist['cache_list'], 'Deleted' => $cachelist['deleted_list']) as $listname => $entries) { 
    151149        $a->reset(); 
     
    261259<?php 
    262260    } 
    263     if (function_exists("ob_filter_path_nicer")) { 
    264         ob_end_flush(); 
    265     } 
     261    ob_end_flush(); 
    266262} 
    267263if ($moduleinfo) { 
Note: See TracChangeset for help on using the changeset viewer.