|
From: Paul S. O. <ps...@us...> - 2002-06-08 16:45:44
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv30127/includes
Modified Files:
page_tail.php
Log Message:
Some transfers from 2.0.x plus move debugging to template var which will please some people
Index: page_tail.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_tail.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** page_tail.php 4 Apr 2002 21:50:29 -0000 1.28
--- page_tail.php 8 Jun 2002 16:45:41 -0000 1.29
***************
*** 35,42 ****
);
$template->assign_vars(array(
'PHPBB_VERSION' => '2' . $board_config['version'],
'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
! 'ADMIN_LINK' => $admin_link)
);
--- 35,54 ----
);
+ //
+ // Output page creation time
+ //
+ if ( DEBUG )
+ {
+ $mtime = microtime();
+ $mtime = explode(' ', $mtime);
+ $totaltime = ( $mtime[1] + $mtime[0] ) - $starttime;
+ $gzip_text = ( $board_config['gzip_compress'] ) ? 'GZIP compression enabled' : 'GZIP compression disabled';
+ }
+
$template->assign_vars(array(
'PHPBB_VERSION' => '2' . $board_config['version'],
'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
! 'ADMIN_LINK' => $admin_link,
! 'DEBUG_OUTPUT' => ( DEBUG ) ? sprintf('<br /><br />phpBB Created this page in %f seconds : ' . $db->sql_num_queries() . ' queries executed : ' . $gzip_text, $totaltime) : '')
);
***************
*** 49,66 ****
//
- // Output page creation time
- //
- $mtime = microtime();
- $mtime = explode(' ',$mtime);
- $mtime = $mtime[1] + $mtime[0];
- $endtime = $mtime;
- $totaltime = ($endtime - $starttime);
-
- $gzip_text = ($board_config['gzip_compress']) ? "GZIP compression enabled" : "GZIP compression disabled";
- $debug_mode = (DEBUG) ? " : Debug Mode" : "";
-
- printf("<br /><center><font size=\"-2\">phpBB Created this page in %f seconds : " . $db->num_queries . " queries executed : $gzip_text".$debug_mode."</font></center>", $totaltime);
-
- //
// Compress buffered output if required and send to browser
//
--- 61,64 ----
***************
*** 79,86 ****
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
! echo '\x1f\x8b\x08\x00\x00\x00\x00\x00';
echo $gzip_contents;
! echo pack('V', $gzip_crc);
! echo pack('V', $gzip_size);
}
--- 77,84 ----
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
! echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
! echo pack("V", $gzip_crc);
! echo pack("V", $gzip_size);
}
|