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