| Nuno Lopes 2006-12-21, 7:00 pm |
| nlopess Thu Dec 21 20:11:53 2006 UTC
Added files:
/php-gcov-web/www system.php
Modified files:
/php-gcov-web/cron system.php
Log:
migrate the system data to the new structure
http://cvs.php.net/viewvc.cgi/php-g...3&diff_format=u
Index: php-gcov-web/cron/system.php
diff -u php-gcov-web/cron/system.php:1.2 php-gcov-web/cron/system.php:1.3
--- php-gcov-web/cron/system.php:1.2 Tue Dec 19 15:52:09 2006
+++ php-gcov-web/cron/system.php Thu Dec 21 20:11:53 2006
@@ -18,14 +18,10 @@
+----------------------------------------------------------------------+
*/
-/* $Id: system.php,v 1.2 2006/12/19 15:52:09 nlopess Exp $ */
+/* $Id: system.php,v 1.3 2006/12/21 20:11:53 nlopess Exp $ */
-// File that generates the system.inc file
// This file gathers the essential information regarding the configuration for the build
-// For client the information is gathered here for use in the XML generation
-// for server the information is gathered here and output to the system.inc file
-
// Configure Section
$config = file("$phpdir/config.nice");
$config = array_slice($config, 4); //remove inital comments
@@ -39,23 +35,6 @@
// Todo: this section need to be revised for systems without the uname command
$osinfo = `uname -srm`;
-// Valgrind (calculated but not displayed)
-// Todo: This section is diabled since it needs tweaking for Windows installations
-//$valgrind = @explode("\n", `valgrind --version`);
-//$valgrindinfo = $valgrind[0];
-
-// If master server, updated system.inc in addition to gathering the information
-if($is_master)
-{
- $write = "<h2>Configure Used:</h2>\n";
- $write .= "<pre>".$configureinfo."</pre>\n";
-
- $write .= "<h2>Compiler Used:</h2>\n";
- $write .= '<p>'.$compilerinfo. "</p>\n";
-
- $write .= "<h2>Operating System:</h2>\n";
- $write .= '<p>'.$osinfo."</p>\n";
-
- file_put_contents("$outdir/system.inc", $write . html_footer());
-}
-?>
+$system_data = array($configureinfo, $compilerinfo, $osinfo);
+
+file_put_contents("$outdir/system.inc", serialize($system_data));
http://cvs.php.net/viewvc.cgi/php-g...=markup&rev=1.1
Index: php-gcov-web/www/system.php
+++ php-gcov-web/www/system.php
<?php
/*
+----------------------------------------------------------------------+
| PHP QA GCOV Website |
+----------------------------------------------------------------------+
| Copyright (c) 2005-2006 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Nuno Lopes <nlopess@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id: system.php,v 1.1 2006/12/21 20:11:53 nlopess Exp $ */
if (!defined('IN_GCOV_CODE')) exit;
$inputfile = "./$version/system.inc";
$raw_data = @file_get_contents($inputfile);
$data = unserialize($raw_data);
if (!$raw_data) {
$content = "<p>This data isn't available at this time.</p>\n";
return;
}
$configureinfo = htmlspecialchars($data[0]);
$compilerinfo = htmlspecialchars($data[1]);
$osinfo = htmlspecialchars($data[2]);
$content .= <<< HTML
<h2>Configure</h2>
<pre>$configureinfo</pre>
<h2>Compiler</h2>
<pre>$compilerinfo</pre>
<h2>Operating System</h2>
<pre>$osinfo</pre>
HTML;
$content .= footer_timestamp(@filemtime($inputfile))
;
|