fixed up curly brackets and spaces around for, if, else

This commit is contained in:
Brenda Wallace 2009-09-13 18:31:44 +12:00
parent 36aa89d695
commit f5b7ea7396

View File

@ -334,7 +334,7 @@ function showLibs()
global $external_libraries; global $external_libraries;
$present_libraries=array(); $present_libraries=array();
$absent_libraries=array(); $absent_libraries=array();
foreach ($external_libraries as $external_library){ foreach ($external_libraries as $external_library) {
if (haveExternalLibrary($external_library)) { if (haveExternalLibrary($external_library)) {
$present_libraries[]=$external_library; $present_libraries[]=$external_library;
} else { } else {
@ -352,22 +352,21 @@ function showLibs()
<h2>Absent Libraries</h2> <h2>Absent Libraries</h2>
<ul id="absent_libraries"> <ul id="absent_libraries">
E_O_T; E_O_T;
foreach($absent_libraries as $library) foreach ($absent_libraries as $library) {
{
echo '<li>'; echo '<li>';
if($library['url']){ if ($library['url']) {
echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>'; echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>';
}else{ } else {
echo htmlentities($library['name']); echo htmlentities($library['name']);
} }
echo '<ul>'; echo '<ul>';
if($library['deb']){ if ($library['deb']) {
echo '<li class="deb package">deb: <a href="apt:' . urlencode($library['deb']) . '">' . htmlentities($library['deb']) . '</a></li>'; echo '<li class="deb package">deb: <a href="apt:' . urlencode($library['deb']) . '">' . htmlentities($library['deb']) . '</a></li>';
} }
if($library['rpm']){ if ($library['rpm']) {
echo '<li class="rpm package">rpm: ' . htmlentities($library['rpm']) . '</li>'; echo '<li class="rpm package">rpm: ' . htmlentities($library['rpm']) . '</li>';
} }
if($library['pear']){ if ($library['pear']) {
echo '<li class="pear package">pear: ' . htmlentities($library['pear']) . '</li>'; echo '<li class="pear package">pear: ' . htmlentities($library['pear']) . '</li>';
} }
echo '</ul>'; echo '</ul>';
@ -377,8 +376,7 @@ E_O_T;
<h2>Installed Libraries</h2> <h2>Installed Libraries</h2>
<ul id="present_libraries"> <ul id="present_libraries">
E_O_T; E_O_T;
foreach($present_libraries as $library) foreach ($present_libraries as $library) {
{
echo '<li>'; echo '<li>';
if ($library['url']) { if ($library['url']) {
echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>'; echo '<a href=">'.$library['url'].'">'.htmlentities($library['name']).'</a>';
@ -517,7 +515,7 @@ STR;
$fail = true; $fail = true;
} }
if($fail){ if ($fail) {
showForm(); showForm();
return; return;
} }
@ -603,8 +601,7 @@ function pgsql_db_installer($host, $database, $username, $password) {
if (empty($password)) { if (empty($password)) {
$sqlUrl = "pgsql://$username@$host/$database"; $sqlUrl = "pgsql://$username@$host/$database";
} } else {
else {
$sqlUrl = "pgsql://$username:$password@$host/$database"; $sqlUrl = "pgsql://$username:$password@$host/$database";
} }