cvs: php-gcov-web /www compile_results.php site.api.php
| From: | Nuno Lopes | Date: | Sun, 27 May 2007 14:58:37 +0000 |
| Subject: | cvs: php-gcov-web /www compile_results.php site.api.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-35511@lists.php.net to get a copy of this message | ||
nlopess Sun May 27 14:58:37 2007 UTC
Modified files:
/php-gcov-web/www compile_results.php site.api.php
Log:
dont link absoulte paths (e.g. /usr/include/..) to PHP's cvs
highlight the errors
# Patch by Johannes. Thanks :)
http://cvs.php.net/viewvc.cgi/php-gcov-web/www/compile_results.php?r1=1.4&r2=1.5&diff_format=u
Index: php-gcov-web/www/compile_results.php
diff -u php-gcov-web/www/compile_results.php:1.4 php-gcov-web/www/compile_results.php:1.5
--- php-gcov-web/www/compile_results.php:1.4 Fri Dec 29 20:18:44 2006
+++ php-gcov-web/www/compile_results.php Sun May 27 14:58:37 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: compile_results.php,v 1.4 2006/12/29 20:18:44 nlopess Exp $ */
+/* $Id: compile_results.php,v 1.5 2007/05/27 14:58:37 nlopess Exp $ */
if (!defined('IN_GCOV_CODE')) exit;
@@ -54,7 +54,7 @@
foreach ($fileentry as $entry) {
$function = htmlspecialchars($entry[0]);
$line = htmlspecialchars($entry[1]);
- $type = htmlspecialchars($entry[2]);
+ $type = make_error_highlight($entry[2]);
$msg = htmlspecialchars($entry[3]);
$lxrlink = make_lxr_link($path, $line);
$cvslink = make_cvs_link($path, $line);
http://cvs.php.net/viewvc.cgi/php-gcov-web/www/site.api.php?r1=1.9&r2=1.10&diff_format=u
Index: php-gcov-web/www/site.api.php
diff -u php-gcov-web/www/site.api.php:1.9 php-gcov-web/www/site.api.php:1.10
--- php-gcov-web/www/site.api.php:1.9 Fri Dec 29 23:01:04 2006
+++ php-gcov-web/www/site.api.php Sun May 27 14:58:37 2007
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: site.api.php,v 1.9 2006/12/29 23:01:04 nlopess Exp $ */
+/* $Id: site.api.php,v 1.10 2007/05/27 14:58:37 nlopess Exp $ */
// File: Core Site API File
// Desc: contains core display functions, it is essential for all pages to include this file.
@@ -284,8 +284,22 @@
}
+function make_error_highlight($type)
+{
+ if ($type === 'error') {
+ return '<b>error</b>';
+ } else {
+ return htmlspecialchars($type);
+ }
+}
+
+
function make_lxr_link($path, $line)
{
+ if ($path{0} === '/') {
+ return '';
+ }
+
if (strpos($path, 'Zend/') !== false) {
$path = str_replace('Zend/','ZendEngine2/', $path);
$link = "http://lxr.php.net/source/{$path}#{$line}";
@@ -299,6 +313,10 @@
function make_cvs_link($path, $line)
{
+ if ($path{0} === '/') {
+ return $line;
+ }
+
if (strpos($path, 'Zend/') !== false) {
$module = $GLOBALS['version'] === 'PHP_4_4' ? 'Zend' :
'ZendEngine2';
$path = str_replace('Zend/', '', $path);