Changeset 577 for trunk

Show
Ignore:
Timestamp:
09/02/08 16:21:31 (3 months ago)
Author:
sidtheduck
Message:

+ New debug output for admin section

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/plog-admin/plog-admin.php

    r572 r577  
    9090<div id="content"> 
    9191'.$string.' 
    92 </div><!-- /content --> 
     92</div><!-- /content -->'; 
    9393 
    94 </body> 
     94if (defined('PLOGGER_DEBUG') && PLOGGER_DEBUG == '1') { 
     95        $output .= trace('Queries: '.$GLOBALS['query_count'], false); 
     96        foreach ($GLOBALS['queries'] as $q) { 
     97                $output .= trace($q, false); 
     98        } 
     99        $output .= trace(plog_timer('end'), false); 
     100} 
     101 
     102$output .= "\n\n".'</body> 
    95103</html>'; 
    96104 
  • trunk/plog-load-config.php

    r576 r577  
    146146} 
    147147 
    148 function trace($output){ 
     148function trace($output, $echo = true){ 
    149149        if (defined('PLOGGER_DEBUG')) { 
    150150                if (PLOGGER_DEBUG == '1') { 
    151151                        //echo('*'.vname($output).':'.$output.'*'); 
    152                         echo('*'.$output.'*<br />'); 
     152                        if ($echo === false) { 
     153                                return '*'.$output.'*<br />'; 
     154                        } else { 
     155                                echo '*'.$output.'*<br />'; 
     156                        } 
    153157                } 
    154158        }