2 $pharFile = \Phar::running();
4 $phorkieDir = __DIR__ . '/../';
6 //remove phar:// from the path
7 $phorkieDir = dirname(substr($pharFile, 7)) . '/';
10 $GLOBALS['phorkie']['cfg'] = array(
12 'gitdir' => $phorkieDir . 'repos/git/',
13 'workdir' => $phorkieDir . 'repos/work/',
14 'tpl' => __DIR__ . '/templates/',
18 'iconpng' => '',//phorkie browser icon (favicon)
22 'elasticsearch' => null,
23 'geshi' => 'MediaWiki/geshi/geshi/geshi.php',
24 'index' => 'new',//"new" or "list"
26 'defaultListPage' => 'last',//a number or "last"
27 'notificator' => array(
28 /* send out pingback/webmentions when a remote paste is forked */
31 /* array of urls that get called when
32 a paste is created, edited or deleted */
36 $GLOBALS['phorkie']['auth'] = array(
37 // 0 = public, no authentication, 1 = protect adds/edits/deletes,
38 // 2 = require authentication
40 'listedUsersOnly' => false,
41 'users' => array(), // Array of OpenIDs that may login
42 'anonymousName' => 'Anonymous', // Email for non-authenticated commits
43 'anonymousEmail' => 'anonymous@phorkie', // Email for non-authenticated commits
45 $GLOBALS['phorkie']['tools'] = array(
46 '\\phorkie\\Tool_Xmllint' => true,
47 '\\phorkie\\Tool_PHPlint' => true,
50 * Array of supported file types / languages.
51 * Key is the file extension
53 $GLOBALS['phorkie']['languages'] = array(
61 'mime' => 'text/diff',
66 'mime' => 'text/html',
71 'mime' => 'text/html',
76 'title' => 'JPEG image',
77 'mime' => 'image/jpeg',
86 'title' => 'Javascript',
87 'mime' => 'application/javascript',
88 'geshi' => 'javascript'
91 'title' => 'Javascript',
92 'mime' => 'application/javascript',
93 'geshi' => 'javascript',
97 'title' => 'Markdown',
98 'mime' => 'text/x-markdown',
99 'renderer' => '\\phorkie\\Renderer_Markdown'
103 'mime' => 'application/x-perl',
108 'mime' => 'text/x-php',
112 'title' => 'PNG image',
113 'mime' => 'image/png',
117 'title' => 'Ruby/Rails',
118 'mime' => 'text/x-ruby', /* Is this an acceptable mime type? */
122 'title' => 'reStructuredText',
123 'mime' => 'text/x-rst',
125 'renderer' => '\\phorkie\\Renderer_ReStructuredText',
128 'title' => 'Shell script (Bash)',
129 'mime' => 'text/x-shellscript',
134 'mime' => 'text/x-sql',
138 'title' => 'SVG image',
139 'mime' => 'image/svg+xml',
143 'title' => 'Text (plain)',
144 'mime' => 'text/plain',
148 'title' => 'TypoScript',
149 'mime' => 'text/x-typoscript',/* TODO: correct type */
150 'geshi' => 'typoscript'
154 'mime' => 'application/wsdl+xml',
159 'mime' => 'text/xml',
163 'title' => 'eXtensible Stylesheet Language',
164 'mime' => 'text/xml',
170 //needed for UTF-8 characters in file names
171 setlocale(LC_CTYPE, 'en_US.UTF_8');