Rev Author Line No. Line
4989 kaklik 1 <?php
2 // WebSVN - Subversion repository viewing via the web using PHP
3 // Copyright (C) 2004-2006 Tim Armes
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 //
19 // --
20 //
21 // config.php
22 //
23 // Configuration parameters
24  
25 // --- FOLLOW THE INSTRUCTIONS BELOW TO CONFIGURE YOUR SETUP ---
26  
27 // {{{ PLATFORM CONFIGURATION ---
28  
29 // Configure a UTF-8 aware locale to properly convert bytes to characters.
30 // Otherwise files and directories with non-ASCII encoding are deemed to fail
31 // with native commands.
32 // $config->setLocale('C.UTF-8');
33  
34 // Configure the path for Subversion to use for --config-dir
35 // (e.g. if accepting certificates is required when using repositories via https)
36 // $config->setSvnConfigDir('/tmp/websvn');
37  
38 // Configure these lines if your commands aren't on your path.
39 //
40 // $config->setSvnCommandPath('/path/to/svn/command/'); // e.g. c:\\program files\\subversion\\bin
41 // $config->setSvnAuthzCommandPath('/path/to/svnauthz/command/'); // e.g. c:\\program files\\subversion\\bin\tools
42 // $config->setDiffPath('/path/to/diff/command/');
43  
44 // For syntax colouring, if option enabled...
45 // $config->setEnscriptPath('/path/to/enscript/command/');
46 // $config->setSedPath('/path/to/sed/command/');
47  
48 // For delivered tarballs, if option enabled...
49 // $config->setTarPath('/path/to/tar/command/');
50  
51 // For delivered GZIP'd files and tarballs, if option enabled...
52 // $config->setGZipPath('/path/to/gzip/command/');
53  
54 // download directory/file zipped ...
55 // $config->setZipPath('/path/to/zip/command/');
56  
57 // Uncomment this line to trust server certificates
58 // This may useful if you use self-signed certificates and have no chance to accept the certificate once via cli
59 // $config->setTrustServerCert();
60  
61 // }}}
62  
63 // {{{ REPOSITORY SETUP ---
64  
65 // There are 2 methods for defining the repositiories available on the system.
66 // Either you list them by hand, in which case you can give each one the name of
67 // your choice, or you use the parent path function, in which case the name of
68 // the directory is used as the repository name.
69 //
70 // In all cases, you may optionally supply a group name to the repositories.
71 // This is useful in the case that you need to separate your projects. Grouped
72 // repositories are referred to using the convention GroupName.RepositoryName
73 //
74 // You may also optionally specify the URL that clients should use to check out
75 // a working copy. If used, it must be specified after the group, username, and
76 // password; if these arguments are not needed, then pass null instead. Consult
77 // the WebSvnConfig class in include/configclass.php for function details.
78 //
79 // Performance is much better on local repositories (e.g. accessed by file://).
80 // However, you can also provide an interface onto a remote repository. In this
81 // case you should supply the username and password needed to access it.
82 //
83 // To configure the repositories by hand, copy the appropriate line below,
84 // uncomment it and replace the name and URL of your repository.
85  
86 // Local repositories (without and with optional group):
87 // Note that the local URL to the repository depends on your platform:
88 // Unix-like: file:///path/to/rep
89 // Windows: file:///c:/svn/proj
90 //
91 // $config->addRepository('NameToDisplay', 'local URL');
92 // $config->addRepository('NameToDisplay', 'local URL', 'group');
93 $config->addRepository('MLAB', 'file:///data/svnData/MLAB');
94 $config->addRepository('library', 'file:///data/svnData/library');
95 $config->addRepository('svnkaklik', 'file:///data/svnData/svnkaklik');
96 $config->addRepository('MLAB_E', 'file:///data/svnData/MLAB_E');
97 $config->addRepository('8magsvn', 'file:///data/svnData/8magsvn');
98 //
99 // Remote repositories (without and with optional group):
100 // A remote URL looks like http://domain.tld/path/to/rep
101 //
102 // $config->addRepository('NameToDisplay', 'remote URL', null, 'username', 'password');
103 // $config->addRepository('NameToDisplay', 'remote URL', 'group', 'username', 'password');
104 //
105 // Display Part of a repository as if it was a repository.
106 //
107 // Local repositories (without and with optional group):
108 //
109 // $config->addRepositorySubpath('NameToDisplay', 'local URL', 'subpath');
110 // $config->addRepositorySubpath('NameToDisplay', 'local URL', 'subpath', 'group');
111 //
112 // Remote repositories (without and with optional group):
113 //
114 // $config->addRepositorySubpath('NameToDisplay', 'remote URL', 'subpath', null, 'username', 'password');
115 // $config->addRepositorySubpath('NameToDisplay', 'remote URL', 'subpath', 'group', 'username', 'password');
116 //
117 // To use the parent path method (without and with optional group), uncomment the next line
118 // and replace the path with your one. You can call the function several times if you have several parent paths.
119 // Note that in this case the path is a filesystem path and depends on your platform:
120 // Unix-like: /path/to/parent
121 // Windows: c:\\svn
122 //
123 // $config->parentPath('filesystem path');
124 // $config->parentPath('filesystem path', 'group');
125 //
126 // To exclude a repository from being added by the parentPath method uncomment the next line
127 // and replace the path with your one. You can call the function several times if you have several paths to exclude.
128 //
129 // $config->addExcludedPath('filesystem path of excluded rep');
130 //
131 // To add only a subset of repositories specified by the parent path you can call the function with a pattern.
132 //
133 // $config->parentPath('filesystem path', 'group', '/^beginwith/');
134  
135 // }}}
136  
137 // {{{ LOOK AND FEEL ---
138 //
139 // Add custom template paths or comment out templates to modify the list of user selectable templates.
140 // The first added template serves as a default.
141  
142 $config->addTemplatePath($locwebsvnreal.'/templates/calm/');
143 $config->addTemplatePath($locwebsvnreal.'/templates/BlueGrey/');
144 $config->addTemplatePath($locwebsvnreal.'/templates/Elegant/');
4992 kaklik 145 $config->addTemplatePath($locwebsvnreal.'/templates/MLAB/');
4989 kaklik 146  
147 // You may also specify a default template by uncommenting and changing the following line as necessary.
148 // If no default template is set the first added template is used.
149  
150 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/');
151  
152 // You may also specify a per repository fixed template by uncommenting and changing the following
153 // line as necessary. Use the convention 'groupname.myrep' if your repository is in a group.
154  
155 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'myrep');
4993 kaklik 156 $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'MLAB');
4992 kaklik 157 $config->setTemplatePath($locwebsvnreal.'/templates/MLAB/', 'library');
158 $config->setTemplatePath($locwebsvnreal.'/templates/BlueGrey/', '8magsvn');
4993 kaklik 159 $config->setTemplatePath($locwebsvnreal.'/templates/calm/', 'svnkaklik');
160 $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'MLAB_E');
4989 kaklik 161 // The index page containing the projects may either be displayed as a flat view (the default),
162 // where grouped repositories are displayed as 'GroupName.RepName' or as a tree view.
163 // In the case of a tree view, you may choose whether the entire tree is open by default.
164  
165 // $config->useTreeIndex(false); // Tree index, closed by default
166 // $config->useTreeIndex(true); // Tree index, open by default
167  
168 // By default, WebSVN displays a tree view onto the current directory. You can however
169 // choose to display a flat view of the current directory only, which may make the display
170 // load faster. Uncomment this line if you want that.
171  
172 // $config->useFlatView();
173  
174 // By default, WebSVN displays subdirectories first and than the files of a directory,
175 // both alphabetically sorted.
176 // To use alphabetic order independent of directories and files uncomment this line.
177  
178 // $config->setAlphabeticOrder(true);
179  
180 // By default, WebSVN loads parent path directories and then on user click other,
181 // This options loads the entire directory in one go and allows to browse without delay.
182 // By default all will be collapsed to root directory and can be expanded.
183 // The performance will be impacted as it takes time to load up all the things in the
184 // repository. Once loaded directory exapansion is instantaneous.
185 // The alphabetical order is applied to all directory and files.
186 // This means that grouping of all dirs together and all files together is NOT supported currently!
187 // The files and directories are shown as is with a mixture of files and folders.
188  
189 // $config->setLoadAllRepos(true);
190  
191 // By default, WebSVN displays the information of the last modification
192 // (revision, age and author) for each repository in an extra column.
193 // To disable that uncomment this line.
194  
195 // $config->setShowLastModInIndex(false);
196  
197 // By default, WebSVN displays the information of the last modification
198 // (revision, age and author) for each file and directory in an extra column.
199 // To disable that uncomment this line.
200  
201 // $config->setShowLastModInListing(false);
202  
203 // By default, WebSVN displays the age of the last modification.
204 // Alternativly the date of the last modification can be shown.
205 // To show dates instead of ages uncomment this line.
206  
207 // $config->setShowAgeInsteadOfDate(false);
208  
209 // By default, WebSVN displays the a form to select an other repository.
210 // If you have a lot of repositories this slows done the script considerably.
211 // To disable that uncomment this line.
212  
213 // $config->setShowRepositorySelectionForm(false);
214  
215 // By default, WebSVN does not ignore whitespaces when showing diffs.
216 // To enable ignoring whitespaces in diffs per default uncomment this line.
217  
218 // $config->setIgnoreWhitespacesInDiff(true);
219  
220 // }}}
221  
222 // {{{ LANGUAGE SETUP ---
223  
224 // Set the default language. If you want English then don't do anything here.
225 //
226 // $config->setDefaultLanguage('en');
227  
228 // Ignore the user supplied accepted languages to choose reasonable default language.
229 // If you want to force the default language - regardless of the client - uncomment the following line.
230 //
231 // $config->ignoreUserAcceptedLanguages();
232  
233 // }}}
234  
235 // {{{ MULTIVIEWS ---
236  
237 // Uncomment this line if you want to use MultiView to access the repository by, for example:
238 //
239 // http://servername/browse/repname/path/in/repository
240 //
241 // Note: The websvn directory will need to have Multiviews turned on in Apache, and you'll need to configure browse.php
242  
243 // $config->useMultiViews();
244  
245 // }}}
246  
247 // {{{ ACCESS RIGHTS ---
248  
249 // Uncomment this line if you want to use your Subversion access file to control access
250 // rights via WebSVN. For this to work, you'll need to set up the same Apache based authentication
251 // to the WebSVN (or browse) directory as you have for Subversion itself. More information can be
252 // found in install.txt
253  
254 // $config->useAccessFile('/path/to/accessfile'); // Global access file
255  
256 // You may also specify a per repository access file by uncommenting and copying the following
257 // line as necessary. Use the convention 'groupname.myrep' if your repository is in a group.
258  
259 // $config->useAccessFile('/path/to/accessfile', 'myrep'); // Access file for myrep
260  
4991 kaklik 261 // $config->useAccessFile('/data/svnData/MLAB/conf/authz', 'MLAB'); // Access file for MLAB
262 // $config->useAccessFile('/data/svnData/svnkaklik/conf/authz', 'svnkaklik'); // Access file for svnkaklik
4989 kaklik 263  
264 // Uncomment this line if you want to prevent search bots to index the WebSVN pages.
265  
266 // $config->setBlockRobots();
267  
268 // }}}
269  
270 // {{{ FILE CONTENT ---
271 //
272 // You may wish certain file types to be GZIP'd and delieved to the user when clicked apon.
273 // This is useful for binary files and the like that don't display well in a browser window!
274 // Copy, uncomment and modify this line for each extension to which this rule should apply.
275 // (Don't forget the . before the extension. You don't need an index between the []'s).
276 // If you'd rather that the files were delivered uncompressed with the associated MIME type,
277 // then read below.
278 //
279 // $zipped[] = '.dll';
280  
281 // Subversion controlled files have an svn:mime-type property that can
282 // be set on a file indicating its mime type. By default binary files
283 // are set to the generic appcliation/octet-stream, and other files
284 // don't have it set at all. WebSVN also has a built-in list of
285 // associations from file extension to MIME content type. (You can
286 // view this list in setup.php).
287 //
288 // Determining the content-type: By default, if the svn:mime-type
289 // property exists and is different from application/octet-stream, it
290 // is used. Otherwise, if the built-in list has a contentType entry
291 // for the extension of the file, that is used. Otherwise, if the
292 // svn:mime-type property exists has the generic binary value of
293 // application/octet-stream, the file will be served as a binary
294 // file. Otherwise, the file will be brought up as ASCII text in the
295 // browser window (although this text may optionally be colourised.
296 // See below).
297 //
298 // Uncomment this if you want to ignore any svn:mime-type property on your
299 // files.
300 //
301 // $config->ignoreSvnMimeTypes();
302 //
303 // Uncomment this if you want skip WebSVN's custom mime-type handling
304 //
305 // $config->ignoreWebSVNContentTypes();
306 //
307 // Following the examples below, you can add new associations, modify
308 // the default ones or even delete them entirely (to show them in
309 // ASCII via WebSVN).
310  
311 // $contentType['.c'] = 'text/plain'; // Create a new association
312 // $contentType['.doc'] = 'text/plain'; // Modify an existing one
313 // unset($contentType['.m']); // Remove a default association
314  
315 // If you want to selectively override one or more MIME types to display inline
316 // (e.g., the svn:mime-type property is something like text/plain or text/xml, or
317 // the file extension matches an entry in $contentType), you can choose to ignore
318 // one or more specific MIME types. This approach is finer-grained than ignoring
319 // all svn:mime-type properties, and displaying matching files inline such that
320 // they are highlighted correctly. (Regular expression matching is used.)
321  
322 $config->addInlineMimeType('text/plain');
323 // $config->addInlineMimeType('text/*');
324  
325 // }}}
326  
327 // {{{ TARBALLS ---
328  
329 // You need tar and gzip installed on your system. Set the paths above if necessary
330 //
331 // Uncomment the line below to offer a tarball download option across all your
332 // repositories.
333 //
334 $config->allowDownload();
335 //
336 // Set download modes
337 // $config->setDefaultFileDlMode('plain');
338 // $config->setDefaultDirectoryDlMode('gzip');
339 //
340 // To change the global option for individual repositories, uncomment and replicate
341 // the appropriate line below (replacing 'myrep' with the name of the repository).
342 // Use the convention 'groupname.myrep' if your repository is in a group.
343  
344 // $config->allowDownload('myrep'); // Specifically allow downloading for 'myrep'
345 // $config->disallowDownload('myrep'); // Specifically disallow downloading for 'myrep'
346  
347 // You can also choose the minimum directory level from which you'll allow downloading.
348 // A value of zero will allow downloading from the root. 1 will allow downloding of directories
349 // in the root, etc.
350 //
351 // If your project is arranged with trunk, tags and branches at the root level, then a value of 2
352 // would allow the downloading of directories within branches/tags while disallowing the download
353 // of the entire branches or tags directories. This would also stop downloading of the trunk, but
354 // see after for path exceptions.
355 //
356 // Change the line below to set the download level across all your repositories.
357  
358 $config->setMinDownloadLevel(2);
359  
360 // To change the level for individual repositories, uncomment and replicate
361 // the appropriate line below (replacing 'myrep' with the name of the repository).
362 // Use the convention 'groupname.myrep' if your repository is in a group.
363  
364 // $config->setMinDownloadLevel(2, 'myrep');
365  
366 // Finally, you may add or remove certain directories (and their contents) either globally
367 // or on a per repository basis. Uncomment and copy the following lines as necessary. Note
368 // that the these are searched in the order than you give them until a match is made (with the
369 // exception that all the per repository exceptions are tested before the global ones). This means
370 // that you must disallow /a/b/c/ before you allow /a/b/ otherwise the allowed match on /a/b/ will
371 // stop any further searching, thereby allowing downloads on /a/b/c/.
372  
373 // Global exceptions possibilties:
374 //
375 // $config->addAllowedDownloadException('/path/to/allowed/directory/');
376 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/');
377 //
378 // Per repository exception possibilties:
379 // Use the convention 'groupname.myrep' if your repository is in a group.
380 //
381 // $config->addAllowedDownloadException('/path/to/allowed/directory/', 'myrep');
382 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/', 'myrep');
383  
384 // }}}
385  
386 // {{{ COLOURISATION ---
387  
388 // Uncomment this line if you want to use Enscript to colourise your file listings
389 //
390 // You'll need Enscript version 1.6 or higher AND Sed installed to use this feature.
391 // Set the path above.
392 //
393 // If you have version 1.6.3 or newer use the following line.
394 //
395 // $config->useEnscript();
396 //
397 // If you have version 1.6.2 or older use the following line.
398 //
399 // $config->useEnscript(true);
400  
401 // Enscript need to be told what the contents of a file are so that it can be colourised
402 // correctly. WebSVN includes a predefined list of mappings from file extension to Enscript
403 // file type (viewable in setup.php).
404 //
405 // Here you should add and other extensions not already listed or redefine the default ones. eg:
406 //
407 // $extEnscript['.pas'] = 'pascal';
408 //
409 // Note that extensions are case sensitive.
410  
411 // Uncomment this line if you want to use GeSHi to colourise your file listings
412 //
413 // $config->useGeshi();
414 // $config->setGeshiPath('/usr/share/php-geshi'); // optional. Use if you have Geshi installed without PEAR/Composer
415  
416 // GeSHi need to be told what the contents of a file are so that it can be colourised
417 // correctly. WebSVN includes a predefined list of mappings from file extension to GeSHi
418 // languages (viewable in setup.php).
419 //
420 // Here you should add and other extensions not already listed or redefine the default ones. eg:
421 //
422 // $extGeshi['pascal'] = array('p', 'pas');
423 //
424 // Note that extensions are case sensitive.
425  
426 // }}}
427  
428 // {{{ Markdown Render
429  
430 // Uncomment this line if you want to enable Markdown Rendering of README.md file in the path.
431 // You will need the Parsedown.php (https://github.com/erusev/parsedown) library for this to work.
432 // This will look for README.md file on the path and render it.
433 // The name of "README.md" isn't configurable for now to simply follow GitHub's conventions.
434  
435 // $config->useParsedown();
436 // $config->setParsedownPath('/usr/share/php/Parsedown/'); // optional. Use if you have Parsedown installed without PEAR/Composer
437  
438 // }}}
439  
440 // {{{ RSSFEED ---
441  
442 // Uncomment this line to hide the RSS feed links across all repositories
443  
444 $config->setRssEnabled(false);
445  
446 // To override the global setting for individual repositories, uncomment and replicate
447 // the appropriate line below (replacing 'myrep' with the name of the repository).
448 // Use the convention 'groupname.myrep' if your repository is in a group.
449  
450 // $config->setRssEnabled(false, 'myrep');
451 // $config->setRssEnabled(true, 'myrep');
452  
453 // Uncomment this line to enable caching RSS feeds across all repositories
454 // This may create a large number of cache files which are currently not garbaged automatically
455  
456 // $config->setRssCachingEnabled(true);
457  
458 // To override the global setting for individual repositories, uncomment and replicate
459 // the appropriate line below (replacing 'myrep' with the name of the repository).
460 // Use the convention 'groupname.myrep' if your repository is in a group.
461  
462 // $config->setRssCachingEnabled(true, 'myrep');
463 // $config->setRssCachingEnabled(false, 'myrep');
464  
465 // Uncomment this line to change the maximum number of RSS entries to display across all repositories
466  
467 // $config->setRssMaxEntries(50);
468  
469 // To override the global setting for individual repositories, uncomment and replicate
470 // the line below (replacing 'myrep' with the name of the repository).
471 // Use the convention 'groupname.myrep' if your repository is in a group.
472  
473 // $config->setRssMaxEntries(50, 'myrep');
474  
475 // }}}
476  
477 // {{{ SHOW CHANGED FILES IN LOG ---
478  
479 // Uncomment this line to show changed files on log.php by default. The normal
480 // behavior is to do this only if the "Show changed files" link is clicked. This
481 // setting reverses the default action but still allows hiding changed files.
482  
483 // $config->setLogsShowChanges(true);
484  
485 // To override the global setting for individual repositories, uncomment and replicate
486 // the appropriate line below (replacing 'myrep' with the name of the repository).
487 // Use the convention 'groupname.myrep' if your repository is in a group.
488  
489 // $config->setLogsShowChanges(true, 'myrep');
490 // $config->setLogsShowChanges(false, 'myrep');
491  
492 // }}}
493  
494 // {{{ BUGTRAQ ---
495  
496 // Uncomment this line to use bugtraq: properties to show links to your BugTracker
497 // from log messages.
498  
499 // $config->setBugtraqEnabled(true);
500  
501 // To override the global setting for individual repositories, uncomment and replicate
502 // the appropriate line below (replacing 'myrep' with the name of the repository).
503 // Use the convention 'groupname.myrep' if your repository is in a group.
504  
505 // $config->setBugtraqEnabled(true, 'myrep');
506 // $config->setBugtraqEnabled(false, 'myrep');
507  
508 // Usually the information to extract the bugtraq information and generate links are
509 // stored in SVN properties starting with 'bugtraq:':
510 // namely 'bugtraq:message', 'bugtraq:logregex', 'bugtraq:url' and 'bugtraq:append'.
511 // To override the SVN properties globally or for individual repositories, uncomment
512 // the appropriate line below (replacing 'myrep' with the name of the repository).
513  
514 // $config->setBugtraqProperties('bug #%BUGID%', 'issues? (\d+)([, ] *(\d+))*'."\n".'(\d+)', 'http://www.example.com/issues/show_bug.cgi?id=%BUGID%', false);
515 // $config->setBugtraqProperties('bug #%BUGID%', 'issues? (\d+)([, ] *(\d+))*'."\n".'(\d+)', 'http://www.example.com/issues/show_bug.cgi?id=%BUGID%', false, 'myrep');
516  
517 // }}}
518  
519 // {{{ MISCELLANEOUS ---
520  
521 // Comment out this if you don't have the right to use it. Be warned that you may need it however!
522 set_time_limit(0);
523  
524 // Change the line below to specify a temporary directory other than the one PHP uses.
525  
526 // $config->setTempDir('temp');
527  
528 // Number of spaces to expand tabs to in diff/listing view across all repositories
529  
530 $config->expandTabsBy(8);
531  
532 // To override the global setting for individual repositories, uncomment and replicate
533 // the line below (replacing 'myrep' with the name of the repository).
534 // Use the convention 'groupname.myrep' if your repository is in a group.
535  
536 // $config->expandTabsBy(3, 'myrep'); // Expand Tabs by 3 for repository 'myrep'
537  
538 // Change the name of the breadcrumb root-phrase to that of the current repo?
539 // $config->setBreadcrumbRepoRootAsRepo(true);
540  
541 // }}}