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