Fixed empty list in synchronization, if there is no DB available

This commit is contained in:
Tomas Srnka
2009-11-26 00:04:43 +00:00
parent 352f9e38be
commit 53e18f0889
65 changed files with 35756 additions and 35175 deletions

View File

@@ -1158,15 +1158,19 @@ if (isset($_REQUEST['synchronize_db'])) {
</tr>
<tr class="even" id="'.$type.'tr7" style="display: none;">
<td>'. $GLOBALS['strDatabase']. '</td>
<td>
<select name="'.$type.'_db_sel">
';
foreach ($databases as $db) {
if ($db['SCHEMA_NAME'] != 'mysql'
&& $db['SCHEMA_NAME'] != 'information_schema') {
echo ' <option>' . $db['SCHEMA_NAME'] . '</option>'."\n";
}
}
<td>';
if (count($databases)==2) {
echo $GLOBALS["strNoDatabaseAvailable"]; // TODO: move to LANG file
} else {
echo '
<select name="'.$type.'_db_sel">
';
foreach ($databases as $db) {
if ($db['SCHEMA_NAME'] != 'mysql'
&& $db['SCHEMA_NAME'] != 'information_schema')
echo ' <option>' . $db['SCHEMA_NAME'] . '</option>'."\n";
}
}
echo '
</select>
</td>