1 | 1 | simandl | <?php |
2 | | | // WebSVN - Subversion repository viewing via the web using PHP |
3 | | | // Copyright (C) 2004-2006 Tim Armes |
4 | | | // |
5 | | | // This program is free software; you can redistribute it and/or modify |
6 | | | // it under the terms of the GNU General Public License as published by |
7 | | | // the Free Software Foundation; either version 2 of the License, or |
8 | | | // (at your option) any later version. |
9 | | | // |
10 | | | // This program is distributed in the hope that it will be useful, |
11 | | | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | | | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | | | // GNU General Public License for more details. |
14 | | | // |
15 | | | // You should have received a copy of the GNU General Public License |
16 | | | // along with this program; if not, write to the Free Software |
17 | | | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
18 | | | // |
19 | | | // -- |
20 | | | // |
21 | | | // config.php |
22 | | | // |
23 | | | // Configuration parameters |
24 | | | |
25 | | | // --- FOLLOW THE INSTRUCTIONS BELOW TO CONFIGURE YOUR SETUP --- |
26 | | | |
27 | | | // {{{ PLATFORM CONFIGURATION --- |
28 | | | |
29 | | | // Uncomment the next line if you're running a windows server |
30 | | | // |
31 | | | // $config->setServerIsWindows(); |
32 | | | |
33 | | | // Configure these lines if your commands aren't on your path. |
34 | | | // |
35 | | | // $config->setSVNCommandPath('Path/to/svn and svnlook/ e.g. c:\\program files\\subversion\\bin'); |
36 | | | // $config->setDiffPath('Path/to/diff/command/'); |
37 | | | |
38 | | | // For syntax colouring, if option enabled... |
39 | | | // $config->setEnscriptPath('Path/to/enscript/command/'); |
40 | | | // $config->setSedPath('Path/to/sed/command/'); |
41 | | | |
42 | | | // For delivered tarballs, if option enabled... |
43 | | | // $config->setTarPath('Path/to/tar/command/'); |
44 | | | |
45 | | | // For delivered GZIP'd files and tarballs, if option enabled... |
46 | | | // $config->setGZipPath('Path/to/gzip/command/'); |
47 | | | |
48 | | | // }}} |
49 | | | |
50 | | | // {{{ REPOSITORY SETUP --- |
51 | | | |
52 | | | // There are 2 methods for defining the repositiories available on the system. Either you list |
53 | | | // them by hand, in which case you can give each one the name of your choice, or you use the |
54 | | | // parent path function, in which case the name of the directory is used as the repository name. |
55 | | | // |
56 | | | // In all cases, you may optionally supply a group name to the repositories. This is useful in the |
57 | | | // case that you need to separate your projects. Grouped Repositories are referred to using the |
58 | | | // convention GroupName.RepositoryName |
59 | | | // |
60 | | | // Performance is much better on local repositories (e.g. accessed by file:///). However, you |
61 | | | // can also provide an interface onto a remote repository. In this case you should supply the |
62 | | | // username and password needed to access it. |
63 | | | // |
64 | | | // To configure the repositories by hand, copy the appropriate line below, uncomment it and |
65 | | | // replace the name and URL of your repository. |
66 | | | |
67 | | | // Local repositories (without and with optional group): |
68 | | | // |
69 | | | // $config->addRepository('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)'); |
70 | | | // $config->addRepository('NameToDisplay', 'URL to repository (e.g. file:///c:/svn/proj)', 'group'); |
71 | | | // |
72 | | | // Remote repositories (without and with optional group): |
73 | | | // |
74 | | | // $config->addRepository('NameToDisplay', 'URL (e.g. http://path/to/rep)', NULL, 'username', 'password'); |
75 | | | // $config->addRepository('NameToDisplay', 'URL (e.g. http://path/to/rep)', 'group', 'username', 'password'); |
76 | | | // |
77 | | | // To use the parent path method (without and with optional group), uncomment the next line |
78 | | | // and replace the path with your one. You can call the function several times if you have several parent paths. |
79 | | | // Note that in this case the path is a filesystem path. |
80 | | | // |
81 | | | // $config->parentPath('Path/to/parent (e.g. c:\\svn)'); |
82 | | | // $config->parentPath('Path/to/parent (e.g. c:\\svn)', 'group'); |
83 | | | // |
84 | | | // To add only a subset of repositories specified by the parent path you can call the function with a pattern. |
85 | | | // |
86 | | | // $config->parentPath('Path/to/parent (e.g. c:\\svn)', 'group', '/^beginwith/'); |
87 | | | |
88 | | | // }}} |
89 | | | |
90 | | | // {{{ LOOK AND FEEL --- |
91 | | | // |
92 | | | // Uncomment ONLY the template file that you want. |
93 | | | |
94 | | | $config->setTemplatePath("$locwebsvnreal/templates/calm/"); |
95 | | | // $config->setTemplatePath("$locwebsvnreal/templates/BlueGrey/"); |
96 | | | |
97 | | | // You may also specify a per repository template file by uncommenting and changing the following |
98 | | | // line as necessary. Use the convention "groupname.myrep" if your repository is in a group. |
99 | | | |
100 | | | // $config->setTemplatePath('$locwebsvnreal/templates/Standard/', 'myrep'); // Access file for myrep |
101 | | | |
102 | | | // The index page containing the projects may either be displayed as a flat view (the default), |
103 | | | // where grouped repositories are displayed as "GroupName.RepName" or as a tree view. |
104 | | | // In the case of a tree view, you may choose whether the entire tree is open by default. |
105 | | | |
106 | | | // $config->useTreeIndex(false); // Tree index, closed by default |
107 | | | // $config->useTreeIndex(true); // Tree index, open by default |
108 | | | |
109 | | | // By default, WebSVN displays a tree view onto the current directory. You can however |
110 | | | // choose to display a flat view of the current directory only, which may make the display |
111 | | | // load faster. Uncomment this line if you want that. |
112 | | | |
113 | | | // $config->useFlatView(); |
114 | | | |
115 | | | // By default, WebSVN displays the information of the last modification |
116 | | | // (revision, age and author) for each entry in an extra column. |
117 | | | // To disable that uncomment this line. |
118 | | | |
119 | | | // $config->setShowLastModInListing(false); |
120 | | | |
121 | | | // By default, WebSVN displays the a form to select an other repository. |
122 | | | // To disable that uncomment this line. |
123 | | | |
124 | | | // $config->setShowRepositorySelectionForm(false); |
125 | | | |
126 | | | // }}} |
127 | | | |
128 | | | // {{{ LANGUAGE SETUP --- |
129 | | | |
130 | | | // WebSVN uses the iconv module to convert messages from your system's character set to the |
131 | | | // UTF-8 output encoding. If you find that your log messages aren't displayed correctly then |
132 | | | // you'll need to change the value here. |
133 | | | // |
134 | | | // You may also specify the character encoding of the repository contents if different from |
135 | | | // the system encoding. This is typically the case for windows users, whereby the command |
136 | | | // line returns, for example, CP850 encoded strings, whereas the source files are encoded |
137 | | | // as iso-8859-1 by Windows based text editors. When display text file, WebSVN will convert |
138 | | | // them from the content encoding to the output encoding (UTF-8). |
139 | | | // |
140 | | | // WebSVN does its best to automate all this, so only use the following if it doesn't work |
141 | | | // "out of the box". Uncomment and change one of the examples below. |
142 | | | // |
143 | | | // $config->setInputEncoding('CP850'); // Encoding of result returned by svn command line, etc. |
144 | | | // $config->setContentEncoding('iso-8859-1'); // Content encoding of all your repositories |
145 | | | |
146 | | | // You may also specify a content encoding on a per repository basis. Uncomment and copy this |
147 | | | // line as necessary. |
148 | | | // |
149 | | | // $config->setContentEncoding('iso-8859-1', 'MyEnc'); |
150 | | | |
151 | | | // Note for Windows users: To enable iconv you'll need to enable the extension in your php.ini file |
152 | | | // AND copy iconv.dll (not php_iconv.dll) to your Windows system folder. In most cases the correct |
153 | | | // encoding is set when you call $config->setServerIsWindows();. |
154 | | | |
155 | | | // Note for *nix users. You'll need to have iconv compiled into your binary. The default input and |
156 | | | // output encodings are taken from your locale informations. Override these if they aren't correct. |
157 | | | |
158 | | | // Set the default language. If you want English then don't do anything here. |
159 | | | // |
160 | | | // $config->setDefaultLanguage('en'); |
161 | | | |
162 | | | // }}} |
163 | | | |
164 | | | // {{{ MULTIVIEWS --- |
165 | | | |
166 | | | // Uncomment this line if you want to use MultiView to access the repository by, for example: |
167 | | | // |
168 | | | // http://servername/wsvn/repname/path/in/repository |
169 | | | // |
170 | | | // Note: The websvn directory will need to have Multiviews turned on in Apache, and you'll need to configure |
171 | | | // wsvn.php |
172 | | | |
173 | | | // $config->useMultiViews(); |
174 | | | |
175 | | | // }}} |
176 | | | |
177 | | | // {{{ ACCESS RIGHTS --- |
178 | | | |
179 | | | // Uncomment this line if you want to use your Subversion access file to control access |
180 | | | // rights via WebSVN. For this to work, you'll need to set up the same Apache based authentication |
181 | | | // to the WebSVN (or wsvn) directory as you have for Subversion itself. More information can be |
182 | | | // found in install.txt |
183 | | | |
184 | | | // $config->useAuthenticationFile('/path/to/accessfile'); // Global access file |
185 | | | |
186 | | | // You may also specify a per repository access file by uncommenting and copying the following |
187 | | | // line as necessary. Use the convention 'groupname.myrep' if your repository is in a group. |
188 | | | |
189 | | | // $config->useAuthenticationFile('/path/to/accessfile', 'myrep'); // Access file for myrep |
190 | | | |
191 | | | // }}} |
192 | | | |
193 | | | // {{{ FILE CONTENT --- |
194 | | | // |
195 | | | // You may wish certain file types to be GZIP'd and delieved to the user when clicked apon. |
196 | | | // This is useful for binary files and the like that don't display well in a browser window! |
197 | | | // Copy, uncomment and modify this line for each extension to which this rule should apply. |
198 | | | // (Don't forget the . before the extension. You don't need an index between the []'s). |
199 | | | // If you'd rather that the files were delivered uncompressed with the associated MIME type, |
200 | | | // then read below. |
201 | | | // |
202 | | | // $zipped[] = '.dll'; |
203 | | | |
204 | | | // Subversion controlled files have an svn:mime-type property that can |
205 | | | // be set on a file indicating its mime type. By default binary files |
206 | | | // are set to the generic appcliation/octet-stream, and other files |
207 | | | // don't have it set at all. WebSVN also has a built-in list of |
208 | | | // associations from file extension to MIME content type. (You can |
209 | | | // view this list in setup.php). |
210 | | | // |
211 | | | // Determining the content-type: By default, if the svn:mime-type |
212 | | | // property exists and is different from application/octet-stream, it |
213 | | | // is used. Otherwise, if the built-in list has a contentType entry |
214 | | | // for the extension of the file, that is used. Otherwise, if the |
215 | | | // svn:mime-type property exists has the generic binary value of |
216 | | | // application/octet-stream, the file will be served as a binary |
217 | | | // file. Otherwise, the file will be brought up as ASCII text in the |
218 | | | // browser window (although this text may optionally be colourised. |
219 | | | // See below). |
220 | | | // |
221 | | | // Uncomment this if you want to ignore any svn:mime-type property on your |
222 | | | // files. |
223 | | | // |
224 | | | // $config->ignoreSvnMimeTypes(); |
225 | | | // |
226 | | | // Uncomment this if you want skip WebSVN's custom mime-type handling |
227 | | | // |
228 | | | // $config->ignoreWebSVNContentTypes(); |
229 | | | // |
230 | | | // Following the examples below, you can add new associations, modify |
231 | | | // the default ones or even delete them entirely (to show them in |
232 | | | // ASCII via WebSVN). |
233 | | | |
234 | | | // $contentType['.c'] = 'text/plain'; // Create a new association |
235 | | | // $contentType['.doc'] = 'text/plain'; // Modify an existing one |
236 | | | // unset($contentType['.m']); // Remove a default association |
237 | | | |
238 | | | // }}} |
239 | | | |
240 | | | // {{{ TARBALLS --- |
241 | | | |
242 | | | // You need tar and gzip installed on your system. Set the paths above if necessary |
243 | | | // |
244 | | | // Uncomment the line below to offer a tarball download option across all your |
245 | | | // repositories. |
246 | | | // |
247 | | | // $config->allowDownload(); |
248 | | | // |
249 | | | // Change the line below to set the temporary directory where to store generated tarball. |
250 | | | // |
251 | | | // $config->setTarballTmpDir('temp'); |
252 | | | // |
253 | | | // To change the global option for individual repositories, uncomment and replicate |
254 | | | // the required line below (replacing 'myrep' for the name of the repository to be changed). |
255 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
256 | | | |
257 | | | // $config->allowDownload('myrep'); // Specifically allow downloading for 'myrep' |
258 | | | // $config->disallowDownload('myrep'); // Specifically disallow downloading for 'myrep' |
259 | | | |
260 | | | // You can also choose the minimum directory level from which you'll allow downloading. |
261 | | | // A value of zero will allow downloading from the root. 1 will allow downloding of directories |
262 | | | // in the root, etc. |
263 | | | // |
264 | | | // If your project is arranged with trunk, tags and branches at the root level, then a value of 2 |
265 | | | // would allow the downloading of directories within branches/tags while disallowing the download |
266 | | | // of the entire branches or tags directories. This would also stop downloading of the trunk, but |
267 | | | // see after for path exceptions. |
268 | | | // |
269 | | | // Change the line below to set the download level across all your repositories. |
270 | | | |
271 | | | $config->setMinDownloadLevel(2); |
272 | | | |
273 | | | // To change the level for individual repositories, uncomment and replicate |
274 | | | // the required line below (replacing 'myrep' for the name of the repository to be changed). |
275 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
276 | | | |
277 | | | // $config->setMinDownloadLevel(2, 'myrep'); |
278 | | | |
279 | | | // Finally, you may add or remove certain directories (and their contents) either globally |
280 | | | // or on a per repository basis. Uncomment and copy the following lines as necessary. Note |
281 | | | // that the these are searched in the order than you give them until a match is made (with the |
282 | | | // exception that all the per repository exceptions are tested before the global ones). This means |
283 | | | // that you must disallow /a/b/c/ before you allow /a/b/ otherwise the allowed match on /a/b/ will |
284 | | | // stop any further searching, thereby allowing downloads on /a/b/c/. |
285 | | | |
286 | | | // Global exceptions possibilties: |
287 | | | // |
288 | | | // $config->addAllowedDownloadException('/path/to/allowed/directory/'); |
289 | | | // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/'); |
290 | | | // |
291 | | | // Per repository exception possibilties: |
292 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
293 | | | // |
294 | | | // $config->addAllowedDownloadException('/path/to/allowed/directory/', 'myrep'); |
295 | | | // $config->addDisAllowedDownloadException('/path/to/disallowed/directory/', 'myrep'); |
296 | | | |
297 | | | // }}} |
298 | | | |
299 | | | // {{{ COLOURISATION --- |
300 | | | |
301 | | | // Uncomment this line if you want to use Enscript to colourise your file listings |
302 | | | // |
303 | | | // You'll need Enscript version 1.6 or higher AND Sed installed to use this feature. |
304 | | | // Set the path above. |
305 | | | // |
306 | | | // $config->useEnscript(); |
307 | | | |
308 | | | // Enscript need to be told what the contents of a file are so that it can be colourised |
309 | | | // correctly. WebSVN includes a predefined list of mappings from file extension to Enscript |
310 | | | // file type (viewable in setup.php). |
311 | | | // |
312 | | | // Here you should add and other extensions not already listed or redefine the default ones. eg: |
313 | | | // |
314 | | | // $extEnscript['.pas'] = 'pascal'; |
315 | | | // |
316 | | | // Note that extensions are case sensitive. |
317 | | | |
318 | | | // Uncomment this line if you want to use GeSHi to colourise your file listings |
319 | | | // |
320 | | | $config->useGeshi(); |
321 | | | |
322 | | | // }}} |
323 | | | |
324 | | | // {{{ RSSFEED --- |
325 | | | |
326 | | | // Uncomment this line if you wish to hide the RSS feed links across all repositories |
327 | | | // |
328 | | | // $config->hideRSS(); |
329 | | | // |
330 | | | // To change the global option for individual repositories, uncomment and replicate |
331 | | | // the required line below (replacing 'myrep' for the name of the repository to be changed). |
332 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
333 | | | |
334 | | | // $config->hideRSS('myrep'); // Specifically hide RSS links for 'myrep' |
335 | | | // $config->showRSS('myrep'); // Specifically show RSS links for 'myrep' |
336 | | | |
337 | | | // }}} |
338 | | | |
339 | | | // {{{ BUGTRAQ --- |
340 | | | |
341 | | | // Uncomment this line if you wish to use bugtraq: properties to show links to your BugTracker |
342 | | | // from the log messages. |
343 | | | // |
344 | | | // $config->useBugtraqProperties(); |
345 | | | // |
346 | | | // To change the global option for individual repositories, uncomment and replicate |
347 | | | // the required line below (replacing 'myrep' for the name of the repository to be changed). |
348 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
349 | | | |
350 | | | // $config->useBugtraqProperties('myrep'); // Specifically use bugtraq properties for 'myrep' |
351 | | | // $config->ignoreBugtraqProperties('myrep'); // Specifically ignore bugtraq properties for 'myrep' |
352 | | | |
353 | | | // }}} |
354 | | | |
355 | | | // {{{ MISCELLANEOUS --- |
356 | | | |
357 | | | // Comment out this if you don't have the right to use it. Be warned that you may need it however! |
358 | | | set_time_limit(0); |
359 | | | |
360 | | | // Number of spaces to expand tabs to in diff/listing view across all repositories |
361 | | | |
362 | | | $config->expandTabsBy(8); |
363 | | | |
364 | | | // To change the global option for individual repositories, uncomment and replicate |
365 | | | // the required line below (replacing 'myrep' for the name of the repository to be changed). |
366 | | | // Use the convention 'groupname.myrep' if your repository is in a group. |
367 | | | |
368 | | | // $config->expandTabsBy(3, 'myrep'); // Expand Tabs by 3 for repository 'myrep' |
369 | | | |
370 | | | // }}} |