Fixing error in default view when database file is present.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3899 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-11-22 18:02:14 +00:00
parent 3343368dde
commit 4ebbdd9055

View file

@ -1,7 +1,7 @@
<?php
$output = "<p class=\"notice\">Your database configuration file is <?php echo file_exists(CONFIGS.'database.php') ?' present.' . \$filePresent = ' ' : ' not present.'; ?></p>\n";
$output .= "<?php if (!empty(\$filePresent)):?>\n";
$output .= "<?php \$db = ConnectionManager::getInstance(); ?>\n";
$output .= "<?php uses('model' . DS . 'connection_manager'); \$db = ConnectionManager::getInstance(); ?>\n";
$output .= "<?php \$connected = \$db->getDataSource('default'); ?>\n";
$output .= "<p class=\"notice\">Cake<?php echo \$connected->isConnected() ? ' is able to' : ' is not able to';?> connect to the database.</p>\n";
$output .= "<br />\n";