Line 28... |
Line 28... |
28 |
// |
28 |
// |
29 |
// User changes should be done in config.ini |
29 |
// User changes should be done in config.ini |
30 |
|
30 |
|
31 |
// Include the configuration class |
31 |
// Include the configuration class |
32 |
require_once 'include/configclass.inc'; |
32 |
require_once 'include/configclass.inc'; |
- |
|
33 |
|
- |
|
34 |
// Create the config |
- |
|
35 |
$config = new Config; |
- |
|
36 |
|
- |
|
37 |
// Set up the default character encodings |
33 |
require_once 'include/svnlook.inc'; |
38 |
if (function_exists('iconv_get_encoding')) |
- |
|
39 |
{ |
- |
|
40 |
$config->setInputEncoding(iconv_get_encoding('input_encoding')); |
- |
|
41 |
} |
34 |
|
42 |
|
35 |
// Define the language array |
43 |
// Define the language array |
36 |
$lang = array(); |
44 |
$lang = array(); |
37 |
$langNames = array(); |
45 |
$langNames = array(); |
38 |
|
46 |
|
39 |
// Include a default language file. |
- |
|
40 |
require 'languages/english.inc'; |
- |
|
41 |
|
- |
|
42 |
// Set up locwebsvnhttp |
47 |
// Set up locwebsvnhttp |
43 |
// Note: we will use nothing in MultiViews mode so that the URLs use the root |
48 |
// Note: we will use nothing in MultiViews mode so that the URLs use the root |
44 |
// directory by default. |
49 |
// directory by default. |
45 |
if (empty($locwebsvnhttp)) |
50 |
if (empty($locwebsvnhttp)) |
46 |
$locwebsvnhttp = defined('WSVN_MULTIVIEWS') ? '' : '.'; |
51 |
$locwebsvnhttp = defined('WSVN_MULTIVIEWS') ? '' : '.'; |
Line 48... |
Line 53... |
48 |
if (empty($locwebsvnreal)) |
53 |
if (empty($locwebsvnreal)) |
49 |
$locwebsvnreal = '.'; |
54 |
$locwebsvnreal = '.'; |
50 |
|
55 |
|
51 |
$vars['locwebsvnhttp'] = $locwebsvnhttp; |
56 |
$vars['locwebsvnhttp'] = $locwebsvnhttp; |
52 |
|
57 |
|
53 |
// Make sure that the input locale is set up correctly |
58 |
// Include a default language file (must go before config.inc) |
54 |
setlocale(LC_ALL, ''); |
59 |
require 'languages/english.inc'; |
55 |
|
60 |
|
56 |
// Create the config |
61 |
// Get the user's personalised config (requires the locwebsvnhttp stuff above) |
57 |
$config = new Config; |
62 |
require_once 'config.inc'; |
58 |
|
63 |
|
- |
|
64 |
// Load PHP_Compat if we're going to use it. This needs to be done after including config.inc (which contains |
- |
|
65 |
// the setting) but before svnlook.inc (which requires util.inc, which contains PHP4-incompatible functions) |
59 |
// Set up the default character encodings |
66 |
if ($config->isPHPCompatEnabled()) { |
60 |
if (function_exists('iconv_get_encoding')) |
67 |
require_once($config->getPHPCompatFile()); |
61 |
{ |
- |
|
62 |
$config->setInputEncoding(iconv_get_encoding('input_encoding')); |
68 |
require_once 'include/php5compat.inc'; |
63 |
} |
69 |
} |
64 |
|
70 |
|
- |
|
71 |
require_once 'include/svnlook.inc'; |
- |
|
72 |
|
- |
|
73 |
// Make sure that the input locale is set up correctly |
- |
|
74 |
setlocale(LC_ALL, ''); |
- |
|
75 |
|
65 |
// {{{ Content-Type's |
76 |
// {{{ Content-Type's |
66 |
// Set up the default content-type extension handling |
77 |
// Set up the default content-type extension handling |
67 |
|
78 |
|
68 |
$contentType = array ( |
79 |
$contentType = array ( |
69 |
|
80 |
|
Line 184... |
Line 195... |
184 |
'.mpeg' => 'video/mpeg', // MPEG video |
195 |
'.mpeg' => 'video/mpeg', // MPEG video |
185 |
'.qt' => 'video/quicktime', // QuickTime Video |
196 |
'.qt' => 'video/quicktime', // QuickTime Video |
186 |
'.mov' => 'video/quicktime', // QuickTime Video |
197 |
'.mov' => 'video/quicktime', // QuickTime Video |
187 |
'.avi' => 'video/msvideo', // Microsoft Windows Video |
198 |
'.avi' => 'video/msvideo', // Microsoft Windows Video |
188 |
'.movie' => 'video/x-sgi-movie', // SGI Movieplayer format |
199 |
'.movie' => 'video/x-sgi-movie', // SGI Movieplayer format |
189 |
'.wrl' => 'x-world/x-vrml' // VRML Worlds |
200 |
'.wrl' => 'x-world/x-vrml', // VRML Worlds |
- |
|
201 |
'.odt' => 'application/vnd.oasis.opendocument.text', // OpenDocument Text |
- |
|
202 |
'.ott' => 'application/vnd.oasis.opendocument.text-template', // OpenDocument Text Template |
- |
|
203 |
'.ods' => 'application/vnd.oasis.opendocument.spreadsheet', // OpenDocument Spreadsheet |
- |
|
204 |
'.ots' => 'application/vnd.oasis.opendocument.spreadsheet-template', // OpenDocument Spreadsheet Template |
- |
|
205 |
'.odp' => 'application/vnd.oasis.opendocument.presentation', // OpenDocument Presentation |
- |
|
206 |
'.otp' => 'application/vnd.oasis.opendocument.presentation-template', // OpenDocument Presentation Template |
- |
|
207 |
'.odg' => 'application/vnd.oasis.opendocument.graphics', // OpenDocument Drawing |
- |
|
208 |
'.otg' => 'application/vnd.oasis.opendocument.graphics-template', // OpenDocument Drawing Template |
- |
|
209 |
'.odc' => 'application/vnd.oasis.opendocument.chart', // OpenDocument Chart |
- |
|
210 |
'.otc' => 'application/vnd.oasis.opendocument.chart-template', // OpenDocument Chart Template |
- |
|
211 |
'.odf' => 'application/vnd.oasis.opendocument.formula', // OpenDocument Formula |
- |
|
212 |
'.otf' => 'application/vnd.oasis.opendocument.formula-template', // OpenDocument Formula Template |
- |
|
213 |
'.odi' => 'application/vnd.oasis.opendocument.image', // OpenDocument Image |
- |
|
214 |
'.oti' => 'application/vnd.oasis.opendocument.image-template', // OpenDocument Image Template |
- |
|
215 |
'.odm' => 'application/vnd.oasis.opendocument.text-master', // OpenDocument Master Document |
- |
|
216 |
'.oth' => 'application/vnd.oasis.opendocument.text-web', // HTML Document Template |
- |
|
217 |
'.odb' => 'application/vnd.oasis.opendocument.database', // OpenDocument Database |
190 |
|
218 |
|
191 |
); |
219 |
); |
192 |
|
220 |
|
193 |
// }}} |
221 |
// }}} |
194 |
|
222 |
|
Line 271... |
Line 299... |
271 |
|
299 |
|
272 |
// Default 'zipped' array |
300 |
// Default 'zipped' array |
273 |
|
301 |
|
274 |
$zipped = array (); |
302 |
$zipped = array (); |
275 |
|
303 |
|
276 |
// Get the user's personalised config |
- |
|
277 |
|
- |
|
278 |
require_once 'config.inc'; |
- |
|
279 |
|
- |
|
280 |
// Set up the version info |
304 |
// Set up the version info |
281 |
|
305 |
|
282 |
initSvnVersion($major,$minor); |
306 |
initSvnVersion($major,$minor); |
283 |
|
307 |
|
284 |
// Get the language choice as defained as the default by config.inc |
308 |
// Get the language choice as defained as the default by config.inc |