htdocs: Say that we have problems to call the demo client instead to show "No errors found"

This commit is contained in:
Tim Gerundt 2012-09-18 15:21:14 +02:00
parent b35110ba21
commit 9fd127617e
1 changed files with 20 additions and 14 deletions

View File

@ -63,7 +63,7 @@
$context = stream_context_create($opts); $context = stream_context_create($opts);
return file_get_contents('http://cppcheck.sourceforge.net/cgi-bin/democlient.cgi', false, $context); return @file_get_contents('http://cppcheck.sourceforge.net/cgi-bin/democlient.cgi', false, $context);
} }
/** /**
@ -114,6 +114,8 @@
echo "<h3>Output</h3>\n"; echo "<h3>Output</h3>\n";
$output = get_democlient_output($code); $output = get_democlient_output($code);
if (!$output === false) {
$results = parse_democlient_output($output); $results = parse_democlient_output($output);
if (!empty($results)) { if (!empty($results)) {
@ -133,6 +135,10 @@
} }
} }
else { else {
echo "<p>Problem with demo client. Please try again.</p>\n";
}
}
else { //if NO code posted...
echo "<p>Use the <a href=\"/demo/\">online demo</a> page to create the report.</p>\n"; echo "<p>Use the <a href=\"/demo/\">online demo</a> page to create the report.</p>\n";
} }
?> ?>