diff options
Diffstat (limited to 'data/config.default.php')
| -rw-r--r-- | data/config.default.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/data/config.default.php b/data/config.default.php index eb98efd..22bbc4a 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -1,8 +1,16 @@ <?php +$pharFile = \Phar::running(); +if ($pharFile == '') { + $phorkieDir = __DIR__ . '/../'; +} else { + //remove phar:// from the path + $phorkieDir = dirname(substr($pharFile, 7)) . '/'; +} + $GLOBALS['phorkie']['cfg'] = array( 'debug' => false, - 'gitdir' => __DIR__ . '/../repos/git/', - 'workdir' => __DIR__ . '/../repos/work/', + 'gitdir' => $phorkieDir . 'repos/git/', + 'workdir' => $phorkieDir . 'repos/work/', 'tpl' => __DIR__ . '/templates/', 'baseurl' => null, 'avatars' => true, |
