Skip to content

Commit

Permalink
Merge c761754 into f383724
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpoer committed Jul 29, 2016
2 parents f383724 + c761754 commit fdf5ea7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions bootstrap.php
Expand Up @@ -202,7 +202,18 @@
define('DATA_DIR', CONFIG_DIR . '/data');
define('RELATIONSHIPS_DIR', CONFIG_DIR . '/relationships');

require_once __DIR__ . '/vendor/autoload.php';
/*
* if Tidbit is running independently, the dependencies are in the /vendor
* directory, but if Tidbit is part of a larger composer managed system, the
* dependencies are a couple directories higher. If neither are found, bail
*/
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require_once __DIR__ . '/vendor/autoload.php';
} elseif (file_exists(__DIR__ . '../../autoload.php')) {
require_once __DIR__ . '../../autoload.php';
} else {
exitWithError('Unable to locate composer\'s autoload.php file');
}

// load general config
require_once CONFIG_DIR . '/config.php';
Expand Down Expand Up @@ -322,7 +333,7 @@
$modules[$m] *= $factor;
}

// Multiple favorites with $factor too
// Multiple favorites with $factor too
if (isset($opts['with-favorites'])) {
foreach ($sugarFavoritesModules as $m => $n) {
$sugarFavoritesModules[$m] *= $factor;
Expand Down

0 comments on commit fdf5ea7

Please sign in to comment.