Skip to content

Commit

Permalink
use "resource" instead of "request".
Browse files Browse the repository at this point in the history
git-svn-id: http://httparchive.googlecode.com/svn/trunk@1009 fc7d47d3-c008-acd5-f51f-d19787b8a02f
  • Loading branch information
stevesoudersorg@gmail.com committed Dec 17, 2012
1 parent 16e0ef7 commit 5319e76
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions viewsite.php
Expand Up @@ -521,22 +521,22 @@ function fixUrls($line) {
$iRow = 0;
$gFirstStart = 0;
$page = pageFromWPT($wptid, $wptrun);
$aReqs = $page['resources'];
foreach($aReqs as $req) {
$aResources = $page['resources'];
foreach($aResources as $resource) {
if ( !$gFirstStart ) {
$gFirstStart = intval($req['startedDateTime']);
$gFirstStart = intval($resource['startedDateTime']);
}
$iRow++;
$sRow = "<tr" . ( $iRow % 2 == 0 ? " class=odd" : "" ) . ">";
$sRow .= "<td class='tdnum '>$iRow</td> ";
$sRow .= "<td class='nobr ' style='font-size: 0.9em;'><a href='" . $req['url'] . "'>" . shortenUrl($req['url']) . "</a></td> ";
$sRow .= "<td class='nobr ' style='font-size: 0.9em;'><a href='" . $resource['url'] . "'>" . shortenUrl($resource['url']) . "</a></td> ";
for ( $i = 0; $i < $len; $i++ ) {
$column = $columns[$i];
if ( ('Req#' != $column['name']) && ('URL' != $column['name'])){
$class = ( array_key_exists('class', $column) ? $column['class'] : "tdnum" );
$suffix = ( array_key_exists('suffix', $column) ? $column['suffix'] : "" );
$hidden = ( array_key_exists('hidden', $column) ? $column['hidden'] : "" );
$sRow .= tdStat($req, $column['dbName'], $suffix, $class, $hidden);
$sRow .= tdStat($resource, $column['dbName'], $suffix, $class, $hidden);
}
}
$sRows .= $sRow;
Expand Down Expand Up @@ -606,10 +606,10 @@ function toggleCustomColDiag() {
</html>

<?php
function tdStat($req, $field, $suffix = "", $class = "tdnum", $bHidden = false) {
function tdStat($resource, $field, $suffix = "", $class = "tdnum", $bHidden = false) {
global $gFirstStart;

$value = ( array_key_exists($field, $req) ? $req[$field] : "" );
$value = ( array_key_exists($field, $resource) ? $resource[$field] : "" );
$snipmax = 12;

if ( "kB" === $suffix ) {
Expand Down

0 comments on commit 5319e76

Please sign in to comment.