2 $pharFile = \Phar::running();
4 $phorkieDir = __DIR__ . '/../';
5 $wwwDir = $phorkieDir . 'www/';
7 //remove phar:// from the path
8 $phorkieDir = dirname(substr($pharFile, 7)) . '/';
12 $GLOBALS['phorkie']['cfg'] = array(
15 'public' => '%BASEURL%' . 'repos/git/',
18 'cachedir' => $phorkieDir . 'cache/',
19 'gitdir' => $wwwDir . 'repos/git/',
20 'workdir' => $wwwDir . 'repos/work/',
21 'tpl' => __DIR__ . '/templates/',
25 'iconpng' => '',//phorkie browser icon (favicon)
29 'elasticsearch' => null,
30 'index' => 'new',//"new" or "list"
32 'defaultListPage' => 'last',//a number or "last"
33 'notificator' => array(
34 /* send out pingback/webmentions when a remote paste is forked */
37 /* array of urls that get called when
38 a paste is created, edited or deleted */
42 $GLOBALS['phorkie']['auth'] = array(
43 // 0 = public, no authentication, 1 = protect adds/edits/deletes,
44 // 2 = require authentication
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
51 $GLOBALS['phorkie']['tools'] = array(
52 '\\phorkie\\Tool_Xmllint' => true,
53 '\\phorkie\\Tool_PHPlint' => true,
56 * Array of supported file types / languages.
57 * Key is the file extension
59 $GLOBALS['phorkie']['languages'] = array(
61 'title' => 'Configuration',
73 'mime' => 'text/diff',
78 'mime' => 'text/html',
83 'mime' => 'text/html',
88 'title' => 'JPEG image',
89 'mime' => 'image/jpeg',
98 'title' => 'Javascript',
99 'mime' => 'application/javascript',
100 'geshi' => 'javascript'
103 'title' => 'Javascript',
104 'mime' => 'application/javascript',
105 'geshi' => 'javascript',
109 'title' => 'Markdown',
110 'mime' => 'text/x-markdown',
111 'renderer' => '\\phorkie\\Renderer_Markdown'
115 'mime' => 'application/x-perl',
120 'mime' => 'text/x-php',
124 'title' => 'PNG image',
125 'mime' => 'image/png',
129 'title' => 'Ruby/Rails',
130 'mime' => 'text/x-ruby', /* Is this an acceptable mime type? */
134 'title' => 'reStructuredText',
135 'mime' => 'text/x-rst',
137 'renderer' => '\\phorkie\\Renderer_ReStructuredText',
140 'title' => 'Shell script (Bash)',
141 'mime' => 'text/x-shellscript',
146 'mime' => 'text/x-sql',
150 'title' => 'SVG image',
151 'mime' => 'image/svg+xml',
155 'title' => 'Text (plain)',
156 'mime' => 'text/plain',
160 'title' => 'TypoScript',
161 'mime' => 'text/x-typoscript',/* TODO: correct type */
162 'geshi' => 'typoscript'
166 'mime' => 'application/wsdl+xml',
171 'mime' => 'text/xml',
175 'title' => 'eXtensible Stylesheet Language',
176 'mime' => 'text/xml',
182 //needed for UTF-8 characters in file names
183 setlocale(LC_CTYPE, 'en_US.UTF_8');