add cachedir setting to dist and default config file
[phorkie.git] / data / config.default.php
index 8f796f4109b992afca7a901e1acae8873fe9de2e..253650d6eae3d2c26317205ec2e37f278c1f6821 100644 (file)
@@ -1,10 +1,25 @@
 <?php
+$pharFile = \Phar::running();
+if ($pharFile == '') {
+    $phorkieDir = __DIR__ . '/../';
+    $wwwDir = $phorkieDir . 'www/';
+} else {
+    //remove phar:// from the path
+    $phorkieDir = dirname(substr($pharFile, 7)) . '/';
+    $wwwDir = $phorkieDir;
+}
+
 $GLOBALS['phorkie']['cfg'] = array(
     'debug'         => false,
-    'gitdir'        => __DIR__ . '/../repos/git/',
-    'workdir'       => __DIR__ . '/../repos/work/',
+    'git'           => array(
+        'public'    => '%BASEURL%' . 'repos/git/',
+        'private'   => null,
+    ),
+    'cachedir'      => $phorkieDir . 'cache/',
+    'gitdir'        => $wwwDir . 'repos/git/',
+    'workdir'       => $wwwDir . 'repos/work/',
     'tpl'           => __DIR__ . '/templates/',
-    'baseurl'       => '/',
+    'baseurl'       => null,
     'avatars'       => true,
     'css'           => '',
     'iconpng'       => '',//phorkie browser icon (favicon)
@@ -12,7 +27,6 @@ $GLOBALS['phorkie']['cfg'] = array(
     'topbar'        => '',
     'setupcheck'    => true,
     'elasticsearch' => null,
-    'geshi'         => 'MediaWiki/geshi/geshi/geshi.php',
     'index'         => 'new',//"new" or "list"
     'perPage'       => 10,
     'defaultListPage' => 'last',//a number or "last"
@@ -43,6 +57,12 @@ $GLOBALS['phorkie']['tools'] = array(
  * Key is the file extension
  */
 $GLOBALS['phorkie']['languages'] = array(
+    'conf' => array(
+        'title' => 'Configuration',
+        'mime'  => 'text/ini',
+        'geshi' => 'ini',
+        'show'  => false
+    ),
     'css' => array(
         'title' => 'CSS',
         'mime'  => 'text/css',