Skip to content
Permalink
Browse files

Update home.ctp, rename SQLDialect and remove database.default.php

  • Loading branch information...
ceeram committed Jan 29, 2013
1 parent fa5733e commit 5e6464953fcbd391a05d5d9bdabbc10d68992f09

This file was deleted.

Oops, something went wrong.
@@ -18,7 +18,7 @@
use Cake\Core\Configure;
use Cake\Utility\Debugger;
use Cake\Cache\Cache;
use Cake\Model\ConnectionManager;
use Cake\Model\Datasource\Database\Connection;
use Cake\Utility\Validation;
use Cake\Error;
@@ -97,31 +97,33 @@ endif;
<p>
<?php
$filePresent = null;
if (file_exists(APP . 'Config/database.php')):
if (file_exists(APP . 'Config/datasources.php')):
echo '<span class="notice success">';
echo __d('cake_dev', 'Your database configuration file is present.');
echo __d('cake_dev', 'Your datasources configuration file is present.');
$filePresent = true;
echo '</span>';
else:
echo '<span class="notice">';
echo __d('cake_dev', 'Your database configuration file is NOT present.');
echo __d('cake_dev', 'Your datasources configuration file is NOT present.');
echo '<br/>';
echo __d('cake_dev', 'Rename APP/Config/database.php.default to APP/Config/database.php');
echo __d('cake_dev', 'Rename APP/Config/datasources.default.php to APP/Config/datasources.php');
echo '</span>';
endif;
?>
</p>
<?php
if (isset($filePresent)):
try {
$connected = ConnectionManager::getDataSource('default');
require APP . 'Config/datasources.php';
$connection = new Connection(Configure::read('Datasource.default'));
$connected = $connection->connect();
} catch (Exception $connectionError) {
$connected = false;
}
?>
<p>
<?php
if ($connected && $connected->isConnected()):
if ($connected):
echo '<span class="notice success">';
echo __d('cake_dev', 'Cake is able to connect to the database.');
echo '</span>';
@@ -25,6 +25,6 @@
*/
class MissingDatasourceConfigException extends Exception {
protected $_messageTemplate = 'The datasource configuration "%s" was not found in database.php';
protected $_messageTemplate = 'The datasource configuration "%s" was not found in datasources.php';
}
@@ -30,7 +30,7 @@ abstract class Driver {
/**
* Returns correct connection resource or object that is internally used
* If first argument is passed,
* If first argument is passed,
*
* @return void
**/
@@ -1,6 +1,6 @@
<?php
/**
*
*
* PHP Version 5.4
*
* CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
@@ -17,7 +17,7 @@
*/
namespace Cake\Model\Datasource\Database;
trait SQLDialect {
trait SqlDialect {
/**
* String used to start a database identifier quoting to make it safe

0 comments on commit 5e64649

Please sign in to comment.
You can’t perform that action at this time.