Got rid of a bunch of ugly warnings

This commit is contained in:
Zach Copley 2009-09-15 16:31:09 -07:00
parent 38409f1683
commit 94466da35a
1 changed files with 20 additions and 20 deletions

View File

@ -223,7 +223,7 @@ function main()
return;
}
if ($_GET['checklibs']) {
if (!empty($_GET['checklibs'])) {
showLibs();
} else {
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
@ -243,7 +243,7 @@ function main()
*/
function haveExternalLibrary($external_library)
{
if (isset($external_library['include']) && ! include_once $external_library['include'] ) {
if (isset($external_library['include']) && ! @include_once $external_library['include'] ) {
return false;
}
if (isset($external_library['check_function']) && ! function_exists($external_library['check_function'])) {
@ -294,7 +294,7 @@ function checkPrereqs()
if (count($missingExtensions) == count($dbModules)) {
$req = implode(', ', $missingExtensions);
printf('<p class="error">Cannot find mysql or pgsql extension. You need one or the other: <code>%s</code></p>', $req);
printf('<p class="error">Cannot find mysql or pgsql extension. You need one or the other.');
$pass = false;
}
@ -365,19 +365,19 @@ function showLibs()
E_O_T;
foreach ($absent_libraries as $library) {
echo '<li>';
if ($library['url']) {
if (isset($library['url'])) {
echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>';
} else {
echo htmlentities($library['name']);
}
echo '<ul>';
if ($library['deb']) {
if (isset($library['deb'])) {
echo '<li class="deb package">deb: <a href="apt:' . urlencode($library['deb']) . '">' . htmlentities($library['deb']) . '</a></li>';
}
if ($library['rpm']) {
if (isset($library['rpm'])) {
echo '<li class="rpm package">rpm: ' . htmlentities($library['rpm']) . '</li>';
}
if ($library['pear']) {
if (isset($library['pear'])) {
echo '<li class="pear package">pear: ' . htmlentities($library['pear']) . '</li>';
}
echo '</ul>';