From 997f3342d41d51e50cc58763d97a16f40a0e63a6 Mon Sep 17 00:00:00 2001 From: Rougin Gutib Date: Tue, 13 Oct 2015 16:02:16 +0800 Subject: [PATCH] Updated CHANGELOG.md and code structure --- CHANGELOG.md | 4 ++-- bin/codeigniter.php | 2 +- src/SparkPlug.php | 9 +++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa5961c..e9342f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,12 @@ All Notable changes to `Spark Plug` will be documented in this file -## [0.1.2](https://github.com/rougin/transcribe/compare/v0.1.0...v0.1.2) - 2015-09-18 +## [0.1.2](https://github.com/rougin/spark-plug/compare/v0.1.0...v0.1.2) - 2015-09-18 ### Fixed - Issues on defined constants -## [0.1.1](https://github.com/rougin/transcribe/compare/v0.1.0...v0.1.1) - 2015-09-15 +## [0.1.1](https://github.com/rougin/spark-plug/compare/v0.1.0...v0.1.1) - 2015-09-15 ### Added - Namespaces diff --git a/bin/codeigniter.php b/bin/codeigniter.php index 16f867a..1981ff8 100644 --- a/bin/codeigniter.php +++ b/bin/codeigniter.php @@ -1,5 +1,5 @@ getCodeIgniter(); diff --git a/src/SparkPlug.php b/src/SparkPlug.php index 5b34a5a..0f9555b 100644 --- a/src/SparkPlug.php +++ b/src/SparkPlug.php @@ -176,8 +176,13 @@ protected function setPaths() foreach ($iterator as $file) { $core = 'core' . DIRECTORY_SEPARATOR . 'CodeIgniter.php'; - if (strpos($file->getPathname(), $core) !== FALSE) { - define('BASEPATH', str_replace($core, '', $file->getPathname())); + if (strpos($file->getPathname(), $core) !== FALSE) { + if ( ! defined('BASEPATH')) { + define( + 'BASEPATH', + str_replace($core, '', $file->getPathname()) + ); + } break; }