Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

Commit

Permalink
Resolving paths properly when akelos is installed globally.
Browse files Browse the repository at this point in the history
  • Loading branch information
bermi committed Jun 19, 2011
1 parent fa34833 commit 9594972
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions makelos
Expand Up @@ -7,12 +7,16 @@ if (isset($argv[1]) && strstr($argv[1], 'test:')){
define('AK_ENVIRONMENT', 'testing');
}

if(is_file(dirname(__FILE__).DS.'config'.DS.'config.php')){
include(dirname(__FILE__).DS.'config'.DS.'config.php');
if(is_file(dirname(realpath(__FILE__)).DS.'config'.DS.'config.php')){
include(dirname(realpath(__FILE__)).DS.'config'.DS.'config.php');
}

if(defined('AK_FRAMEWORK_DIR')){
include AK_FRAMEWORK_DIR.DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php';
}elseif(!is_file('akelos_utils'.DS.'makelos'.DS.'makelos.php') || !include('akelos_utils'.DS.'makelos'.DS.'makelos.php')){
include 'vendor'.DS.'akelos'.DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php';
}
}elseif(!is_file(dirname(realpath(__FILE__)).DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php') ||
!include(dirname(realpath(__FILE__)).DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php')) {

if(is_file('vendor'.DS.'akelos'.DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php')){
include 'vendor'.DS.'akelos'.DS.'akelos_utils'.DS.'makelos'.DS.'makelos.php';
}
}

0 comments on commit 9594972

Please sign in to comment.