Skip to content

Commit

Permalink
Fixed error on post installation process
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Jun 22, 2015
1 parent 360169f commit 435ecda
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@ public static function getDataType($type)
*/
public static function ignite(Event $event = null)
{
/**
* Setup the directory paths
*/

define('APPPATH', realpath('application') . '/');
define('VENDOR', realpath('vendor') . '/');

$directory = new \RecursiveDirectoryIterator(getcwd(), \FilesystemIterator::SKIP_DOTS);
foreach (new \RecursiveIteratorIterator($directory, \RecursiveIteratorIterator::SELF_FIRST) as $path) {
if (strpos($path->__toString(), 'core/CodeIgniter.php') !== FALSE) {
$basepath = str_replace('core/CodeIgniter.php', '', $path->__toString());
define('BASEPATH', $basepath);

break;
}
}

/**
* Get the templates
*/
Expand All @@ -71,7 +88,6 @@ public static function ignite(Event $event = null)
$autoload = file_get_contents(APPPATH . 'config/autoload.php');
$codeigniterCore = file_get_contents(BASEPATH . 'core/CodeIgniter.php');
$htaccess = file_get_contents($miscellaneous . 'Htaccess.txt');
$myPagination = file_get_contents($miscellaneous . 'Pagination.txt');
$paginationConfiguration = file_get_contents($miscellaneous . 'PaginationConfiguration.txt');

/**
Expand Down

0 comments on commit 435ecda

Please sign in to comment.