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