diff options
author | oetting <jacob@oettinger.dk> | 2008-06-21 09:55:56 +0000 |
---|---|---|
committer | oetting <jacob@oettinger.dk> | 2008-06-21 09:55:56 +0000 |
commit | 90374bc8e031a49e27bcce25f81a98f3cf9fd749 (patch) | |
tree | a2a80e45d21ec9519cd336ac6926217adff6197b | |
parent | c0ea77f8ff5a31dc327b5ff6f81600c34e19c4c0 (diff) | |
download | webgrind-90374bc8e031a49e27bcce25f81a98f3cf9fd749.zip webgrind-90374bc8e031a49e27bcce25f81a98f3cf9fd749.tar.gz webgrind-90374bc8e031a49e27bcce25f81a98f3cf9fd749.tar.bz2 |
Fixed issue #10 Links to sub calls now work
Fixed issue #11 Line numbers in fileviewer
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | templates/fileviewer.phtml | 2 | ||||
-rw-r--r-- | templates/index.phtml | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -99,7 +99,7 @@ switch(get('op')){ $invo = $reader->getCalledFromInfo($functionNr, $i); $foundInvocations += $invo['callCount']; $callerInfo = $reader->getFunctionInfo($invo['functionNr']); - $invo['callerFile'] = $callerInfo['file']; + $invo['file'] = $callerInfo['file']; $invo['callerFunctionName'] = $callerInfo['functionName']; $result['calledFrom'][] = $invo; } @@ -108,7 +108,7 @@ switch(get('op')){ for($i=0;$i<$function['subCallInfoCount'];$i++){ $invo = $reader->getSubCallInfo($functionNr, $i); $callInfo = $reader->getFunctionInfo($invo['functionNr']); - $invo['callerFile'] = $callInfo['file']; + $invo['file'] = $function['file']; // Sub call to $callInfo['file'] but from $function['file'] $invo['callerFunctionName'] = $callInfo['functionName']; $result['subCalls'][] = $invo; } diff --git a/templates/fileviewer.phtml b/templates/fileviewer.phtml index c10b505..9064ee9 100644 --- a/templates/fileviewer.phtml +++ b/templates/fileviewer.phtml @@ -34,7 +34,7 @@ <?php $syntax = explode('<br />', str_replace(array('<code>', '</code>'), '', highlight_file($file, true))); - foreach ($syntax as $num => $string): ?> + foreach ($syntax as $num => $string): $num++;?> <span class="num" <?php if ($num==$line):?>id="line_emph"<?php endif; ?>><?php echo $num ?></span> <?php echo $string; ?> <br /> diff --git a/templates/index.phtml b/templates/index.phtml index be6440d..03d50ec 100644 --- a/templates/index.phtml +++ b/templates/index.phtml @@ -136,7 +136,7 @@ <td>'+data.callerFunctionName+' @ '+data.line+'</td> \ <td class="nr">'+data.callCount+'</td> \ <td class="nr">'+data.summedCallCost+'</td> \ - <td><a title="Open file and show line" href="'+sprintf(fileUrlFormat,data.callerFile,data.line)+'" target="_blank"><img src="img/file_line.png" alt="O"/></a></td> \ + <td><a title="Open file and show line" href="'+sprintf(fileUrlFormat,data.file,data.line)+'" target="_blank"><img src="img/file_line.png" alt="O"/></a></td> \ </tr>'; } |