cvs: php-gcov-web(SOC06) /www viewer.php
| From: | Nuno Lopes | Date: | Thu, 07 Sep 2006 11:31:28 +0000 |
| Subject: | cvs: php-gcov-web(SOC06) /www viewer.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-32371@lists.php.net to get a copy of this message | ||
nlopess Thu Sep 7 11:31:28 2006 UTC
Modified files: (Branch: SOC06)
/php-gcov-web/www viewer.php
Log:
simplify code a bit. minor WS fixes
http://cvs.php.net/viewvc.cgi/php-gcov-web/www/viewer.php?r1=1.1.2.9&r2=1.1.2.10&diff_format=u
Index: php-gcov-web/www/viewer.php
diff -u php-gcov-web/www/viewer.php:1.1.2.9 php-gcov-web/www/viewer.php:1.1.2.10
--- php-gcov-web/www/viewer.php:1.1.2.9 Thu Sep 7 11:25:25 2006
+++ php-gcov-web/www/viewer.php Thu Sep 7 11:31:28 2006
@@ -266,14 +266,10 @@
else // Treat the file contents as regular text file
{
// Open file handle
- $fh = @fopen($filepath, 'r');
+ $content = @file_get_contents($filepath);
// Read file contents
if($func_array[$func]['option'] == 'text')
- $content = '<pre>'.@fread($fh, filesize($filepath)).'</pre>';
- else
- $content = @fread($fh, filesize($filepath));
-
- @fclose($fh);
+ $content = '<pre>'.$content.'</pre>';
}
// Determine title based on success or failure
@@ -309,8 +305,8 @@
{
$appvars['page']['title'] = 'PHP: '.$version.' Graphs';
- $appvars['page']['head'] = 'Graphs';
- $appvars['page']['headtitle'] = $version;
+ $appvars['page']['head'] = 'Graphs';
+ $appvars['page']['headtitle'] = $version;
$content .= <<< HTML
<p>Select the period of time you wish to view as a graphical progression.</p>