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 'gitdir' => $wwwDir . 'repos/git/',
19 'workdir' => $wwwDir . 'repos/work/',
20 'tpl' => __DIR__ . '/templates/',
24 'iconpng' => '',//phorkie browser icon (favicon)
28 'elasticsearch' => null,
29 'index' => 'new',//"new" or "list"
31 'defaultListPage' => 'last',//a number or "last"
32 'notificator' => array(
33 /* send out pingback/webmentions when a remote paste is forked */
36 /* array of urls that get called when
37 a paste is created, edited or deleted */
41 $GLOBALS['phorkie']['auth'] = array(
42 // 0 = public, no authentication, 1 = protect adds/edits/deletes,
43 // 2 = require authentication
45 'listedUsersOnly' => false,
46 'users' => array(), // Array of OpenIDs that may login
47 'anonymousName' => 'Anonymous', // Email for non-authenticated commits
48 'anonymousEmail' => 'anonymous@phorkie', // Email for non-authenticated commits
50 $GLOBALS['phorkie']['tools'] = array(
51 '\\phorkie\\Tool_Xmllint' => true,
52 '\\phorkie\\Tool_PHPlint' => true,
55 * Array of supported file types / languages.
56 * Key is the file extension
58 $GLOBALS['phorkie']['languages'] = array(
60 'title' => 'Configuration',
72 'mime' => 'text/diff',
77 'mime' => 'text/html',
82 'mime' => 'text/html',
87 'title' => 'JPEG image',
88 'mime' => 'image/jpeg',
97 'title' => 'Javascript',
98 'mime' => 'application/javascript',
99 'geshi' => 'javascript'
102 'title' => 'Javascript',
103 'mime' => 'application/javascript',
104 'geshi' => 'javascript',
108 'title' => 'Markdown',
109 'mime' => 'text/x-markdown',
110 'renderer' => '\\phorkie\\Renderer_Markdown'
114 'mime' => 'application/x-perl',
119 'mime' => 'text/x-php',
123 'title' => 'PNG image',
124 'mime' => 'image/png',
128 'title' => 'Ruby/Rails',
129 'mime' => 'text/x-ruby', /* Is this an acceptable mime type? */
133 'title' => 'reStructuredText',
134 'mime' => 'text/x-rst',
136 'renderer' => '\\phorkie\\Renderer_ReStructuredText',
139 'title' => 'Shell script (Bash)',
140 'mime' => 'text/x-shellscript',
145 'mime' => 'text/x-sql',
149 'title' => 'SVG image',
150 'mime' => 'image/svg+xml',
154 'title' => 'Text (plain)',
155 'mime' => 'text/plain',
159 'title' => 'TypoScript',
160 'mime' => 'text/x-typoscript',/* TODO: correct type */
161 'geshi' => 'typoscript'
165 'mime' => 'application/wsdl+xml',
170 'mime' => 'text/xml',
174 'title' => 'eXtensible Stylesheet Language',
175 'mime' => 'text/xml',
181 //needed for UTF-8 characters in file names
182 setlocale(LC_CTYPE, 'en_US.UTF_8');