diff options
author | Camil Staps | 2016-07-27 23:52:00 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-27 23:52:00 +0200 |
commit | 7f877370163648460f6ffd8abb3ee9caa774441c (patch) | |
tree | a41d3d8dbf310ffdbc484cf0a3992126845e9d8e | |
parent | Changelog cleanup (diff) |
Moved private information to conf.private.php
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | conf.php | 17 | ||||
-rw-r--r-- | conf.private.example.php | 13 |
4 files changed, 18 insertions, 17 deletions
@@ -1,2 +1,3 @@ files/** docs/** +conf.private.php @@ -46,8 +46,8 @@ BusinessAdmin assumes a MySQL database is setup properly. This can be: There are two files concerned when setting the configuration options. -In conf.php you can enter your MySQL details (host, database, username, -password, server port). +In conf.private.php you can enter your MySQL details (host, database, username, +password, server port). You can use conf.private.example.php as an example. In classes/constants.php, you should at least set the following options: @@ -31,21 +31,6 @@ session_start(); error_reporting(0); ini_set('display_errors', 0); -//------------------------------------------------------------------------------ -// Start editing below this line -//------------------------------------------------------------------------------ - -// Database settings (should be mysql) -$db_host = 'localhost'; -$db_name = 'my_database'; -$db_user = 'my_database_user'; -$db_pass = 'my_password'; -$db_port = '3306'; - -//------------------------------------------------------------------------------ -// Don't edit below this line -//------------------------------------------------------------------------------ - /** * Autoload a class if it isn't loaded yet * @@ -59,6 +44,8 @@ function __autoload($pClass) { set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)); +require_once('./conf.private.php'); + try { $_pdo = new PDO("mysql:host=$db_host;port=$db_port;dbname=$db_name;charset=utf8", $db_user, $db_pass); $_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); diff --git a/conf.private.example.php b/conf.private.example.php new file mode 100644 index 0000000..90b4c51 --- /dev/null +++ b/conf.private.example.php @@ -0,0 +1,13 @@ +<?php +// Database settings (should be mysql) +$db_host = 'localhost'; +$db_name = 'my_database'; +$db_user = 'my_database_user'; +$db_pass = 'my_password'; +$db_port = '3306'; + +// Braintree settings +define('BRAINTREE_ENABLED', true); +define('BRAINTREE_MERCHANT', ...); +define('BRAINTREE_KEY_PUBLIC', ...); +define('BRAINTREE_KEY_PRIVATE', ...); |