Changeset 1011


Ignore:
Timestamp:
Jan 21, 2006, 9:32:09 PM (18 years ago)
Author:
nikrou
Message:

bug 268 fixed: display debug content correctly

Location:
branches/branch-1_5
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_5/include/functions.inc.php

    r894 r1011  
    431431function pwg_query($query)
    432432{
    433   global $conf,$page;
     433  global $conf,$page,$debug;
    434434 
    435435  $start = get_moment();
     
    453453    $output.= "\n".$query;
    454454    $output.= "\n".'(this query time : ';
    455     $output.= number_format($time, 3, '.', ' ').' s)</b>';
     455    $output.= '<b>'.number_format($time, 3, '.', ' ').' s)</b>';
    456456    $output.= "\n".'(total SQL time  : ';
    457457    $output.= number_format($page['queries_time'], 3, '.', ' ').' s)';
    458     $output.= '</pre>';
     458    $output.= "</pre>\n";
    459459   
    460     echo $output;
     460    $debug .= $output;
    461461  }
    462462 
     
    472472  $now2 = $now[1].'.'.$now2[1];
    473473  $time = number_format( $now2 - $t2, 3, '.', ' ').' s';
     474  $debug .= '<p>';
    474475  $debug.= '['.$time.', ';
    475476  $debug.= $count_queries.' queries] : '.$string;
    476   $debug.= "\n";
     477  $debug.= "</p>\n";
    477478}
    478479
  • branches/branch-1_5/include/page_tail.php

    r993 r1011  
    5555}
    5656
     57if ($conf['show_queries'])
     58{
     59  $template->assign_block_vars(
     60    'debug',
     61    array('QUERIES_LIST' => $debug)
     62  );
     63}
     64
    5765//--------------------------------------------------------------------- contact
    5866
  • branches/branch-1_5/template/yoga/footer.tpl

    r859 r1011  
    1818</div> <!-- the_page -->
    1919
     20<!-- BEGIN debug -->
     21  {debug.QUERIES_LIST}
     22<!-- END debug -->
    2023</body>
    2124</html>
Note: See TracChangeset for help on using the changeset viewer.