From dddd728bdc6808bfc62a6fd9e5add43c0101be2b Mon Sep 17 00:00:00 2001 From: Eric Hocking Date: Sat, 29 Mar 2014 19:00:25 -0400 Subject: [PATCH 1/6] Move config to an includes folder Move config to an includes folder, and update code to use die instead of exit --- config.php => inc/config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename config.php => inc/config.php (99%) diff --git a/config.php b/inc/config.php similarity index 99% rename from config.php rename to inc/config.php index 0ac4d12..4fc0654 100644 --- a/config.php +++ b/inc/config.php @@ -39,8 +39,8 @@ // // Die when called directly in browser // -if ( !defined('INCLUDED') ) - exit(); +if ( !defined('IN_USEBB') ) + die('Hacking Attempt'); // // Initialize a new database configuration holder array From 7282c907c53dd85bf00b10e35f08d1537256fb2a Mon Sep 17 00:00:00 2001 From: Eric Hocking Date: Sat, 29 Mar 2014 19:07:18 -0400 Subject: [PATCH 2/6] Create init.php Init.php will load the UseBB core --- inc/init.php | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 inc/init.php diff --git a/inc/init.php b/inc/init.php new file mode 100644 index 0000000..7a31eaa --- /dev/null +++ b/inc/init.php @@ -0,0 +1,7 @@ +
Please make sure IN_USEBB is defined."); +} From db4c919c147f4e40e52e083bf931cbde304d7373 Mon Sep 17 00:00:00 2001 From: Eric Hocking Date: Sat, 29 Mar 2014 19:09:47 -0400 Subject: [PATCH 3/6] Update init.php Attempt to determine the location of UseBB automatically --- inc/init.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/inc/init.php b/inc/init.php index 7a31eaa..a75c799 100644 --- a/inc/init.php +++ b/inc/init.php @@ -5,3 +5,21 @@ { die("Direct initialization of this file is not allowed.

Please make sure IN_USEBB is defined."); } + + +/* Defines the root directory for UseBB. + + Uncomment the below line and set the path manually + if you experience problems. + + Always add a trailing slash to the end of the path. + + * Path to your copy of UseBB + */ +//define('USEBB_ROOT', "./"); + +// Attempt autodetection +if(!defined('USEBB_ROOT')) +{ + define('USEBB_ROOT', dirname(dirname(__FILE__))."/"); +} From 0cb5075b65baef89ba49846416350a614d7669fb Mon Sep 17 00:00:00 2001 From: Eric Hocking Date: Tue, 11 Nov 2014 00:35:59 -0500 Subject: [PATCH 4/6] Create U --- inc/Core.php | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 inc/Core.php diff --git a/inc/Core.php b/inc/Core.php new file mode 100644 index 0000000..6583a0c --- /dev/null +++ b/inc/Core.php @@ -0,0 +1,10 @@ + Date: Tue, 11 Nov 2014 09:14:45 -0500 Subject: [PATCH 5/6] Make the version a constant. --- inc/Core.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/Core.php b/inc/Core.php index 6583a0c..765a252 100644 --- a/inc/Core.php +++ b/inc/Core.php @@ -5,6 +5,11 @@ class Core { //the version of UseBB we are running -public $version = "2.0.0-dev"; +const Version = "2.0.0-dev"; + +static public function getVersion() +{ + return Core::Version; +} } From 07a7f506d369970b2c571a6d19832366de145d2d Mon Sep 17 00:00:00 2001 From: Eric Hocking Date: Tue, 11 Nov 2014 09:19:26 -0500 Subject: [PATCH 6/6] Create the MySQLI class. --- inc/db/MySQLI.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 inc/db/MySQLI.php diff --git a/inc/db/MySQLI.php b/inc/db/MySQLI.php new file mode 100644 index 0000000..76ea83f --- /dev/null +++ b/inc/db/MySQLI.php @@ -0,0 +1,15 @@ +