add cachedir setting to dist and default config file
[phorkie.git] / data / config.default.php
1 <?php
2 $pharFile = \Phar::running();
3 if ($pharFile == '') {
4     $phorkieDir = __DIR__ . '/../';
5     $wwwDir = $phorkieDir . 'www/';
6 } else {
7     //remove phar:// from the path
8     $phorkieDir = dirname(substr($pharFile, 7)) . '/';
9     $wwwDir = $phorkieDir;
10 }
11
12 $GLOBALS['phorkie']['cfg'] = array(
13     'debug'         => false,
14     'git'           => array(
15         'public'    => '%BASEURL%' . 'repos/git/',
16         'private'   => null,
17     ),
18     'cachedir'      => $phorkieDir . 'cache/',
19     'gitdir'        => $wwwDir . 'repos/git/',
20     'workdir'       => $wwwDir . 'repos/work/',
21     'tpl'           => __DIR__ . '/templates/',
22     'baseurl'       => null,
23     'avatars'       => true,
24     'css'           => '',
25     'iconpng'       => '',//phorkie browser icon (favicon)
26     'title'         => 'phorkie',
27     'topbar'        => '',
28     'setupcheck'    => true,
29     'elasticsearch' => null,
30     'index'         => 'new',//"new" or "list"
31     'perPage'       => 10,
32     'defaultListPage' => 'last',//a number or "last"
33     'notificator'   => array(
34         /* send out pingback/webmentions when a remote paste is forked */
35         'linkback'  => true,
36         'webhook'   => array(
37             /* array of urls that get called when
38                a paste is created, edited or deleted */
39         )
40     ),
41 );
42 $GLOBALS['phorkie']['auth'] = array(
43     // 0 = public, no authentication, 1 = protect adds/edits/deletes,
44     // 2 = require authentication
45     'securityLevel'   => 0,
46     'listedUsersOnly' => false,
47     'users'           => array(),             // Array of OpenIDs that may login
48     'anonymousName'   => 'Anonymous',         // Email for non-authenticated commits
49     'anonymousEmail'  => 'anonymous@phorkie', // Email for non-authenticated commits
50 );
51 $GLOBALS['phorkie']['tools'] = array(
52     '\\phorkie\\Tool_Xmllint' => true,
53     '\\phorkie\\Tool_PHPlint' => true,
54 );
55 /**
56  * Array of supported file types / languages.
57  * Key is the file extension
58  */
59 $GLOBALS['phorkie']['languages'] = array(
60     'conf' => array(
61         'title' => 'Configuration',
62         'mime'  => 'text/ini',
63         'geshi' => 'ini',
64         'show'  => false
65     ),
66     'css' => array(
67         'title' => 'CSS',
68         'mime'  => 'text/css',
69         'geshi' => 'css'
70     ),
71     'diff' => array(
72         'title' => 'Diff',
73         'mime'  => 'text/diff',
74         'geshi' => 'diff'
75     ),
76     'htm' => array(
77         'title' => 'HTML',
78         'mime'  => 'text/html',
79         'geshi' => 'xml'
80     ),
81     'html' => array(
82         'title' => 'HTML',
83         'mime'  => 'text/html',
84         'geshi' => 'xml',
85         'show'  => false
86     ),
87     'jpg' => array(
88         'title' => 'JPEG image',
89         'mime'  => 'image/jpeg',
90         'show'  => false
91     ),
92     'ini' => array(
93         'title' => 'Ini',
94         'mime'  => 'text/ini',
95         'geshi' => 'ini'
96     ),
97     'js' => array(
98         'title' => 'Javascript',
99         'mime'  => 'application/javascript',
100         'geshi' => 'javascript'
101     ),
102     'json' => array(
103         'title' => 'Javascript',
104         'mime'  => 'application/javascript',
105         'geshi' => 'javascript',
106         'show'  => false
107     ),
108     'md' => array(
109         'title' => 'Markdown',
110         'mime'  => 'text/x-markdown',
111         'renderer' => '\\phorkie\\Renderer_Markdown'
112     ),
113     'pl' => array(
114         'title' => 'Perl',
115         'mime'  => 'application/x-perl',
116         'geshi' => 'pl'
117     ),
118     'php' => array(
119         'title' => 'PHP',
120         'mime'  => 'text/x-php',
121         'geshi' => 'php'
122     ),
123     'png' => array(
124         'title' => 'PNG image',
125         'mime'  => 'image/png',
126         'show'  => false
127     ),
128     'rb' => array(
129         'title' => 'Ruby/Rails',
130         'mime'  => 'text/x-ruby', /* Is this an acceptable mime type? */
131         'geshi' => 'rails'
132     ),
133     'rst' => array(
134         'title' => 'reStructuredText',
135         'mime'  => 'text/x-rst',
136         'geshi' => 'rst',
137         'renderer' => '\\phorkie\\Renderer_ReStructuredText',
138     ),
139     'sh' => array(
140         'title' => 'Shell script (Bash)',
141         'mime'  => 'text/x-shellscript',
142         'geshi' => 'bash'
143     ),
144     'sql' => array(
145         'title' => 'SQL',
146         'mime'  => 'text/x-sql',
147         'geshi' => 'sql'
148     ),
149     'svg' => array(
150         'title' => 'SVG image',
151         'mime'  => 'image/svg+xml',
152         'show'  => false
153     ),
154     'txt' => array(
155         'title' => 'Text (plain)',
156         'mime'  => 'text/plain',
157         'geshi' => 'txt'
158     ),
159     'ts' => array(
160         'title' => 'TypoScript',
161         'mime'  => 'text/x-typoscript',/* TODO: correct type */
162         'geshi' => 'typoscript'
163     ),
164     'wsdl' => array(
165         'title' => 'WSDL',
166         'mime'  => 'application/wsdl+xml',
167         'geshi' => 'xml'
168     ),
169     'xml' => array(
170         'title' => 'XML',
171         'mime'  => 'text/xml',
172         'geshi' => 'xml'
173     ),
174     'xsl' => array(
175         'title' => 'eXtensible Stylesheet Language',
176         'mime'  => 'text/xml',
177         'geshi' => 'xml',
178         'show'  => false
179     ),
180 );
181
182 //needed for UTF-8 characters in file names
183 setlocale(LC_CTYPE, 'en_US.UTF_8');
184 ?>