Bug fixes.

Fixed a couple of bugs in admin/tools/settings/add.connection.php,
core/db.class.php and visual/themes/default/layout_inc/navigation.php.