Rev 4992 Rev 4993
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 $config->addTemplatePath($locwebsvnreal.'/templates/MLAB/'); 145 $config->addTemplatePath($locwebsvnreal.'/templates/MLAB/');
146   146  
147 // You may also specify a default template by uncommenting and changing the following line as necessary. 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. 148 // If no default template is set the first added template is used.
149   149  
150 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/'); 150 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/');
151   151  
152 // You may also specify a per repository fixed template by uncommenting and changing the following 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. 153 // line as necessary. Use the convention 'groupname.myrep' if your repository is in a group.
154   154  
155 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'myrep'); 155 // $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'myrep');
156 $config->setTemplatePath($locwebsvnreal.'/templates/MLAB/', 'MLAB'); 156 $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'MLAB');
157 $config->setTemplatePath($locwebsvnreal.'/templates/MLAB/', 'library'); 157 $config->setTemplatePath($locwebsvnreal.'/templates/MLAB/', 'library');
158 $config->setTemplatePath($locwebsvnreal.'/templates/BlueGrey/', '8magsvn'); 158 $config->setTemplatePath($locwebsvnreal.'/templates/BlueGrey/', '8magsvn');
159 $config->setTemplatePath($locwebsvnreal.'/templates/Standard/', 'svnkaklik'); 159 $config->setTemplatePath($locwebsvnreal.'/templates/calm/', 'svnkaklik');
160 $config->setTemplatePath($locwebsvnreal.'/templates/MLAB/', 'MLAB_E'); 160 $config->setTemplatePath($locwebsvnreal.'/templates/Elegant/', 'MLAB_E');
161 // The index page containing the projects may either be displayed as a flat view (the default), 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. 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. 163 // In the case of a tree view, you may choose whether the entire tree is open by default.
164   164  
165 // $config->useTreeIndex(false); // Tree index, closed by default 165 // $config->useTreeIndex(false); // Tree index, closed by default
166 // $config->useTreeIndex(true); // Tree index, open by default 166 // $config->useTreeIndex(true); // Tree index, open by default
167   167  
168 // By default, WebSVN displays a tree view onto the current directory. You can however 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 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. 170 // load faster. Uncomment this line if you want that.
171   171  
172 // $config->useFlatView(); 172 // $config->useFlatView();
173   173  
174 // By default, WebSVN displays subdirectories first and than the files of a directory, 174 // By default, WebSVN displays subdirectories first and than the files of a directory,
175 // both alphabetically sorted. 175 // both alphabetically sorted.
176 // To use alphabetic order independent of directories and files uncomment this line. 176 // To use alphabetic order independent of directories and files uncomment this line.
177   177  
178 // $config->setAlphabeticOrder(true); 178 // $config->setAlphabeticOrder(true);
179   179  
180 // By default, WebSVN loads parent path directories and then on user click other, 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. 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. 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 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. 184 // repository. Once loaded directory exapansion is instantaneous.
185 // The alphabetical order is applied to all directory and files. 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! 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. 187 // The files and directories are shown as is with a mixture of files and folders.
188   188  
189 // $config->setLoadAllRepos(true); 189 // $config->setLoadAllRepos(true);
190   190  
191 // By default, WebSVN displays the information of the last modification 191 // By default, WebSVN displays the information of the last modification
192 // (revision, age and author) for each repository in an extra column. 192 // (revision, age and author) for each repository in an extra column.
193 // To disable that uncomment this line. 193 // To disable that uncomment this line.
194   194  
195 // $config->setShowLastModInIndex(false); 195 // $config->setShowLastModInIndex(false);
196   196  
197 // By default, WebSVN displays the information of the last modification 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. 198 // (revision, age and author) for each file and directory in an extra column.
199 // To disable that uncomment this line. 199 // To disable that uncomment this line.
200   200  
201 // $config->setShowLastModInListing(false); 201 // $config->setShowLastModInListing(false);
202   202  
203 // By default, WebSVN displays the age of the last modification. 203 // By default, WebSVN displays the age of the last modification.
204 // Alternativly the date of the last modification can be shown. 204 // Alternativly the date of the last modification can be shown.
205 // To show dates instead of ages uncomment this line. 205 // To show dates instead of ages uncomment this line.
206   206  
207 // $config->setShowAgeInsteadOfDate(false); 207 // $config->setShowAgeInsteadOfDate(false);
208   208  
209 // By default, WebSVN displays the a form to select an other repository. 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. 210 // If you have a lot of repositories this slows done the script considerably.
211 // To disable that uncomment this line. 211 // To disable that uncomment this line.
212   212  
213 // $config->setShowRepositorySelectionForm(false); 213 // $config->setShowRepositorySelectionForm(false);
214   214  
215 // By default, WebSVN does not ignore whitespaces when showing diffs. 215 // By default, WebSVN does not ignore whitespaces when showing diffs.
216 // To enable ignoring whitespaces in diffs per default uncomment this line. 216 // To enable ignoring whitespaces in diffs per default uncomment this line.
217   217  
218 // $config->setIgnoreWhitespacesInDiff(true); 218 // $config->setIgnoreWhitespacesInDiff(true);
219   219  
220 // }}} 220 // }}}
221   221  
222 // {{{ LANGUAGE SETUP --- 222 // {{{ LANGUAGE SETUP ---
223   223  
224 // Set the default language. If you want English then don't do anything here. 224 // Set the default language. If you want English then don't do anything here.
225 // 225 //
226 // $config->setDefaultLanguage('en'); 226 // $config->setDefaultLanguage('en');
227   227  
228 // Ignore the user supplied accepted languages to choose reasonable default language. 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. 229 // If you want to force the default language - regardless of the client - uncomment the following line.
230 // 230 //
231 // $config->ignoreUserAcceptedLanguages(); 231 // $config->ignoreUserAcceptedLanguages();
232   232  
233 // }}} 233 // }}}
234   234  
235 // {{{ MULTIVIEWS --- 235 // {{{ MULTIVIEWS ---
236   236  
237 // Uncomment this line if you want to use MultiView to access the repository by, for example: 237 // Uncomment this line if you want to use MultiView to access the repository by, for example:
238 // 238 //
239 // http://servername/browse/repname/path/in/repository 239 // http://servername/browse/repname/path/in/repository
240 // 240 //
241 // Note: The websvn directory will need to have Multiviews turned on in Apache, and you'll need to configure browse.php 241 // Note: The websvn directory will need to have Multiviews turned on in Apache, and you'll need to configure browse.php
242   242  
243 // $config->useMultiViews(); 243 // $config->useMultiViews();
244   244  
245 // }}} 245 // }}}
246   246  
247 // {{{ ACCESS RIGHTS --- 247 // {{{ ACCESS RIGHTS ---
248   248  
249 // Uncomment this line if you want to use your Subversion access file to control access 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 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 251 // to the WebSVN (or browse) directory as you have for Subversion itself. More information can be
252 // found in install.txt 252 // found in install.txt
253   253  
254 // $config->useAccessFile('/path/to/accessfile'); // Global access file 254 // $config->useAccessFile('/path/to/accessfile'); // Global access file
255   255  
256 // You may also specify a per repository access file by uncommenting and copying the following 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. 257 // line as necessary. Use the convention 'groupname.myrep' if your repository is in a group.
258   258  
259 // $config->useAccessFile('/path/to/accessfile', 'myrep'); // Access file for myrep 259 // $config->useAccessFile('/path/to/accessfile', 'myrep'); // Access file for myrep
260   260  
261 // $config->useAccessFile('/data/svnData/MLAB/conf/authz', 'MLAB'); // Access file for MLAB 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 262 // $config->useAccessFile('/data/svnData/svnkaklik/conf/authz', 'svnkaklik'); // Access file for svnkaklik
263   263  
264 // Uncomment this line if you want to prevent search bots to index the WebSVN pages. 264 // Uncomment this line if you want to prevent search bots to index the WebSVN pages.
265   265  
266 // $config->setBlockRobots(); 266 // $config->setBlockRobots();
267   267  
268 // }}} 268 // }}}
269   269  
270 // {{{ FILE CONTENT --- 270 // {{{ FILE CONTENT ---
271 // 271 //
272 // You may wish certain file types to be GZIP'd and delieved to the user when clicked apon. 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! 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. 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). 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, 276 // If you'd rather that the files were delivered uncompressed with the associated MIME type,
277 // then read below. 277 // then read below.
278 // 278 //
279 // $zipped[] = '.dll'; 279 // $zipped[] = '.dll';
280   280  
281 // Subversion controlled files have an svn:mime-type property that can 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 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 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 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 285 // associations from file extension to MIME content type. (You can
286 // view this list in setup.php). 286 // view this list in setup.php).
287 // 287 //
288 // Determining the content-type: By default, if the svn:mime-type 288 // Determining the content-type: By default, if the svn:mime-type
289 // property exists and is different from application/octet-stream, it 289 // property exists and is different from application/octet-stream, it
290 // is used. Otherwise, if the built-in list has a contentType entry 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 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 292 // svn:mime-type property exists has the generic binary value of
293 // application/octet-stream, the file will be served as a binary 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 294 // file. Otherwise, the file will be brought up as ASCII text in the
295 // browser window (although this text may optionally be colourised. 295 // browser window (although this text may optionally be colourised.
296 // See below). 296 // See below).
297 // 297 //
298 // Uncomment this if you want to ignore any svn:mime-type property on your 298 // Uncomment this if you want to ignore any svn:mime-type property on your
299 // files. 299 // files.
300 // 300 //
301 // $config->ignoreSvnMimeTypes(); 301 // $config->ignoreSvnMimeTypes();
302 // 302 //
303 // Uncomment this if you want skip WebSVN's custom mime-type handling 303 // Uncomment this if you want skip WebSVN's custom mime-type handling
304 // 304 //
305 // $config->ignoreWebSVNContentTypes(); 305 // $config->ignoreWebSVNContentTypes();
306 // 306 //
307 // Following the examples below, you can add new associations, modify 307 // Following the examples below, you can add new associations, modify
308 // the default ones or even delete them entirely (to show them in 308 // the default ones or even delete them entirely (to show them in
309 // ASCII via WebSVN). 309 // ASCII via WebSVN).
310   310  
311 // $contentType['.c'] = 'text/plain'; // Create a new association 311 // $contentType['.c'] = 'text/plain'; // Create a new association
312 // $contentType['.doc'] = 'text/plain'; // Modify an existing one 312 // $contentType['.doc'] = 'text/plain'; // Modify an existing one
313 // unset($contentType['.m']); // Remove a default association 313 // unset($contentType['.m']); // Remove a default association
314   314  
315 // If you want to selectively override one or more MIME types to display inline 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 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 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 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 319 // all svn:mime-type properties, and displaying matching files inline such that
320 // they are highlighted correctly. (Regular expression matching is used.) 320 // they are highlighted correctly. (Regular expression matching is used.)
321   321  
322 $config->addInlineMimeType('text/plain'); 322 $config->addInlineMimeType('text/plain');
323 // $config->addInlineMimeType('text/*'); 323 // $config->addInlineMimeType('text/*');
324   324  
325 // }}} 325 // }}}
326   326  
327 // {{{ TARBALLS --- 327 // {{{ TARBALLS ---
328   328  
329 // You need tar and gzip installed on your system. Set the paths above if necessary 329 // You need tar and gzip installed on your system. Set the paths above if necessary
330 // 330 //
331 // Uncomment the line below to offer a tarball download option across all your 331 // Uncomment the line below to offer a tarball download option across all your
332 // repositories. 332 // repositories.
333 // 333 //
334 $config->allowDownload(); 334 $config->allowDownload();
335 // 335 //
336 // Set download modes 336 // Set download modes
337 // $config->setDefaultFileDlMode('plain'); 337 // $config->setDefaultFileDlMode('plain');
338 // $config->setDefaultDirectoryDlMode('gzip'); 338 // $config->setDefaultDirectoryDlMode('gzip');
339 // 339 //
340 // To change the global option for individual repositories, uncomment and replicate 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). 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. 342 // Use the convention 'groupname.myrep' if your repository is in a group.
343   343  
344 // $config->allowDownload('myrep'); // Specifically allow downloading for 'myrep' 344 // $config->allowDownload('myrep'); // Specifically allow downloading for 'myrep'
345 // $config->disallowDownload('myrep'); // Specifically disallow downloading for 'myrep' 345 // $config->disallowDownload('myrep'); // Specifically disallow downloading for 'myrep'
346   346  
347 // You can also choose the minimum directory level from which you'll allow downloading. 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 348 // A value of zero will allow downloading from the root. 1 will allow downloding of directories
349 // in the root, etc. 349 // in the root, etc.
350 // 350 //
351 // If your project is arranged with trunk, tags and branches at the root level, then a value of 2 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 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 353 // of the entire branches or tags directories. This would also stop downloading of the trunk, but
354 // see after for path exceptions. 354 // see after for path exceptions.
355 // 355 //
356 // Change the line below to set the download level across all your repositories. 356 // Change the line below to set the download level across all your repositories.
357   357  
358 $config->setMinDownloadLevel(2); 358 $config->setMinDownloadLevel(2);
359   359  
360 // To change the level for individual repositories, uncomment and replicate 360 // To change the level for individual repositories, uncomment and replicate
361 // the appropriate line below (replacing 'myrep' with the name of the repository). 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. 362 // Use the convention 'groupname.myrep' if your repository is in a group.
363   363  
364 // $config->setMinDownloadLevel(2, 'myrep'); 364 // $config->setMinDownloadLevel(2, 'myrep');
365   365  
366 // Finally, you may add or remove certain directories (and their contents) either globally 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 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 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 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 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/. 371 // stop any further searching, thereby allowing downloads on /a/b/c/.
372   372  
373 // Global exceptions possibilties: 373 // Global exceptions possibilties:
374 // 374 //
375 // $config->addAllowedDownloadException('/path/to/allowed/directory/'); 375 // $config->addAllowedDownloadException('/path/to/allowed/directory/');
376 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/'); 376 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/');
377 // 377 //
378 // Per repository exception possibilties: 378 // Per repository exception possibilties:
379 // Use the convention 'groupname.myrep' if your repository is in a group. 379 // Use the convention 'groupname.myrep' if your repository is in a group.
380 // 380 //
381 // $config->addAllowedDownloadException('/path/to/allowed/directory/', 'myrep'); 381 // $config->addAllowedDownloadException('/path/to/allowed/directory/', 'myrep');
382 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/', 'myrep'); 382 // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/', 'myrep');
383   383  
384 // }}} 384 // }}}
385   385  
386 // {{{ COLOURISATION --- 386 // {{{ COLOURISATION ---
387   387  
388 // Uncomment this line if you want to use Enscript to colourise your file listings 388 // Uncomment this line if you want to use Enscript to colourise your file listings
389 // 389 //
390 // You'll need Enscript version 1.6 or higher AND Sed installed to use this feature. 390 // You'll need Enscript version 1.6 or higher AND Sed installed to use this feature.
391 // Set the path above. 391 // Set the path above.
392 // 392 //
393 // If you have version 1.6.3 or newer use the following line. 393 // If you have version 1.6.3 or newer use the following line.
394 // 394 //
395 // $config->useEnscript(); 395 // $config->useEnscript();
396 // 396 //
397 // If you have version 1.6.2 or older use the following line. 397 // If you have version 1.6.2 or older use the following line.
398 // 398 //
399 // $config->useEnscript(true); 399 // $config->useEnscript(true);
400   400  
401 // Enscript need to be told what the contents of a file are so that it can be colourised 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 402 // correctly. WebSVN includes a predefined list of mappings from file extension to Enscript
403 // file type (viewable in setup.php). 403 // file type (viewable in setup.php).
404 // 404 //
405 // Here you should add and other extensions not already listed or redefine the default ones. eg: 405 // Here you should add and other extensions not already listed or redefine the default ones. eg:
406 // 406 //
407 // $extEnscript['.pas'] = 'pascal'; 407 // $extEnscript['.pas'] = 'pascal';
408 // 408 //
409 // Note that extensions are case sensitive. 409 // Note that extensions are case sensitive.
410   410  
411 // Uncomment this line if you want to use GeSHi to colourise your file listings 411 // Uncomment this line if you want to use GeSHi to colourise your file listings
412 // 412 //
413 // $config->useGeshi(); 413 // $config->useGeshi();
414 // $config->setGeshiPath('/usr/share/php-geshi'); // optional. Use if you have Geshi installed without PEAR/Composer 414 // $config->setGeshiPath('/usr/share/php-geshi'); // optional. Use if you have Geshi installed without PEAR/Composer
415   415  
416 // GeSHi need to be told what the contents of a file are so that it can be colourised 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 417 // correctly. WebSVN includes a predefined list of mappings from file extension to GeSHi
418 // languages (viewable in setup.php). 418 // languages (viewable in setup.php).
419 // 419 //
420 // Here you should add and other extensions not already listed or redefine the default ones. eg: 420 // Here you should add and other extensions not already listed or redefine the default ones. eg:
421 // 421 //
422 // $extGeshi['pascal'] = array('p', 'pas'); 422 // $extGeshi['pascal'] = array('p', 'pas');
423 // 423 //
424 // Note that extensions are case sensitive. 424 // Note that extensions are case sensitive.
425   425  
426 // }}} 426 // }}}
427   427  
428 // {{{ Markdown Render 428 // {{{ Markdown Render
429   429  
430 // Uncomment this line if you want to enable Markdown Rendering of README.md file in the path. 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. 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. 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. 433 // The name of "README.md" isn't configurable for now to simply follow GitHub's conventions.
434   434  
435 // $config->useParsedown(); 435 // $config->useParsedown();
436 // $config->setParsedownPath('/usr/share/php/Parsedown/'); // optional. Use if you have Parsedown installed without PEAR/Composer 436 // $config->setParsedownPath('/usr/share/php/Parsedown/'); // optional. Use if you have Parsedown installed without PEAR/Composer
437   437  
438 // }}} 438 // }}}
439   439  
440 // {{{ RSSFEED --- 440 // {{{ RSSFEED ---
441   441  
442 // Uncomment this line to hide the RSS feed links across all repositories 442 // Uncomment this line to hide the RSS feed links across all repositories
443   443  
444 $config->setRssEnabled(false); 444 $config->setRssEnabled(false);
445   445  
446 // To override the global setting for individual repositories, uncomment and replicate 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). 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. 448 // Use the convention 'groupname.myrep' if your repository is in a group.
449   449  
450 // $config->setRssEnabled(false, 'myrep'); 450 // $config->setRssEnabled(false, 'myrep');
451 // $config->setRssEnabled(true, 'myrep'); 451 // $config->setRssEnabled(true, 'myrep');
452   452  
453 // Uncomment this line to enable caching RSS feeds across all repositories 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 454 // This may create a large number of cache files which are currently not garbaged automatically
455   455  
456 // $config->setRssCachingEnabled(true); 456 // $config->setRssCachingEnabled(true);
457   457  
458 // To override the global setting for individual repositories, uncomment and replicate 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). 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. 460 // Use the convention 'groupname.myrep' if your repository is in a group.
461   461  
462 // $config->setRssCachingEnabled(true, 'myrep'); 462 // $config->setRssCachingEnabled(true, 'myrep');
463 // $config->setRssCachingEnabled(false, 'myrep'); 463 // $config->setRssCachingEnabled(false, 'myrep');
464   464  
465 // Uncomment this line to change the maximum number of RSS entries to display across all repositories 465 // Uncomment this line to change the maximum number of RSS entries to display across all repositories
466   466  
467 // $config->setRssMaxEntries(50); 467 // $config->setRssMaxEntries(50);
468   468  
469 // To override the global setting for individual repositories, uncomment and replicate 469 // To override the global setting for individual repositories, uncomment and replicate
470 // the line below (replacing 'myrep' with the name of the repository). 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. 471 // Use the convention 'groupname.myrep' if your repository is in a group.
472   472  
473 // $config->setRssMaxEntries(50, 'myrep'); 473 // $config->setRssMaxEntries(50, 'myrep');
474   474  
475 // }}} 475 // }}}
476   476  
477 // {{{ SHOW CHANGED FILES IN LOG --- 477 // {{{ SHOW CHANGED FILES IN LOG ---
478   478  
479 // Uncomment this line to show changed files on log.php by default. The normal 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 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. 481 // setting reverses the default action but still allows hiding changed files.
482   482  
483 // $config->setLogsShowChanges(true); 483 // $config->setLogsShowChanges(true);
484   484  
485 // To override the global setting for individual repositories, uncomment and replicate 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). 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. 487 // Use the convention 'groupname.myrep' if your repository is in a group.
488   488  
489 // $config->setLogsShowChanges(true, 'myrep'); 489 // $config->setLogsShowChanges(true, 'myrep');
490 // $config->setLogsShowChanges(false, 'myrep'); 490 // $config->setLogsShowChanges(false, 'myrep');
491   491  
492 // }}} 492 // }}}
493   493  
494 // {{{ BUGTRAQ --- 494 // {{{ BUGTRAQ ---
495   495  
496 // Uncomment this line to use bugtraq: properties to show links to your BugTracker 496 // Uncomment this line to use bugtraq: properties to show links to your BugTracker
497 // from log messages. 497 // from log messages.
498   498  
499 // $config->setBugtraqEnabled(true); 499 // $config->setBugtraqEnabled(true);
500   500  
501 // To override the global setting for individual repositories, uncomment and replicate 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). 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. 503 // Use the convention 'groupname.myrep' if your repository is in a group.
504   504  
505 // $config->setBugtraqEnabled(true, 'myrep'); 505 // $config->setBugtraqEnabled(true, 'myrep');
506 // $config->setBugtraqEnabled(false, 'myrep'); 506 // $config->setBugtraqEnabled(false, 'myrep');
507   507  
508 // Usually the information to extract the bugtraq information and generate links are 508 // Usually the information to extract the bugtraq information and generate links are
509 // stored in SVN properties starting with 'bugtraq:': 509 // stored in SVN properties starting with 'bugtraq:':
510 // namely 'bugtraq:message', 'bugtraq:logregex', 'bugtraq:url' and 'bugtraq:append'. 510 // namely 'bugtraq:message', 'bugtraq:logregex', 'bugtraq:url' and 'bugtraq:append'.
511 // To override the SVN properties globally or for individual repositories, uncomment 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). 512 // the appropriate line below (replacing 'myrep' with the name of the repository).
513   513  
514 // $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);
515 // $config->setBugtraqProperties('bug #%BUGID%', 'issues? (\d+)([, ] *(\d+))*'."\n".'(\d+)', 'http://www.example.com/issues/show_bug.cgi?id=%BUGID%', false, 'myrep'); 515 // $config->setBugtraqProperties('bug #%BUGID%', 'issues? (\d+)([, ] *(\d+))*'."\n".'(\d+)', 'http://www.example.com/issues/show_bug.cgi?id=%BUGID%', false, 'myrep');
516   516  
517 // }}} 517 // }}}
518   518  
519 // {{{ MISCELLANEOUS --- 519 // {{{ MISCELLANEOUS ---
520   520  
521 // Comment out this if you don't have the right to use it. Be warned that you may need it however! 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); 522 set_time_limit(0);
523   523  
524 // Change the line below to specify a temporary directory other than the one PHP uses. 524 // Change the line below to specify a temporary directory other than the one PHP uses.
525   525  
526 // $config->setTempDir('temp'); 526 // $config->setTempDir('temp');
527   527  
528 // Number of spaces to expand tabs to in diff/listing view across all repositories 528 // Number of spaces to expand tabs to in diff/listing view across all repositories
529   529  
530 $config->expandTabsBy(8); 530 $config->expandTabsBy(8);
531   531  
532 // To override the global setting for individual repositories, uncomment and replicate 532 // To override the global setting for individual repositories, uncomment and replicate
533 // the line below (replacing 'myrep' with the name of the repository). 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. 534 // Use the convention 'groupname.myrep' if your repository is in a group.
535   535  
536 // $config->expandTabsBy(3, 'myrep'); // Expand Tabs by 3 for repository 'myrep' 536 // $config->expandTabsBy(3, 'myrep'); // Expand Tabs by 3 for repository 'myrep'
537   537  
538 // Change the name of the breadcrumb root-phrase to that of the current repo? 538 // Change the name of the breadcrumb root-phrase to that of the current repo?
539 // $config->setBreadcrumbRepoRootAsRepo(true); 539 // $config->setBreadcrumbRepoRootAsRepo(true);
540   540  
541 // }}} 541 // }}}