1 |
--- smeserver-subversion-1.3/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm.SVNAutoVersioning 2008-01-25 15:26:39.000000000 +0100 |
2 |
+++ smeserver-subversion-1.3/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm 2008-01-25 17:53:00.000000000 +0100 |
3 |
@@ -53,8 +53,8 @@ |
4 |
getExtraParams |
5 |
print_save_or_add_button |
6 |
validate_name |
7 |
- validate_description |
8 |
validate_radio |
9 |
+ validate_description |
10 |
wherenext |
11 |
); |
12 |
|
13 |
@@ -503,9 +503,13 @@ |
14 |
$q->param(-name=>'authentification_required', |
15 |
-value=>$rec->prop('AuthentificationRequired')); |
16 |
$q->param(-name=>'access_type', |
17 |
- -value=>$rec->prop('AccessType')), |
18 |
+ -value=>$rec->prop('AccessType')); |
19 |
$q->param(-name=>'force_ssl', |
20 |
-value=>$rec->prop('ForceSSL')); |
21 |
+ $q->param(-name=>'autoversioning', |
22 |
+ -value=>$rec->prop('SVNAutoVersioning') || 'no'); |
23 |
+ $q->param(-name=>'mime', |
24 |
+ -value=>$rec->prop('ModMimeUsePathInfo') || 'no'); |
25 |
|
26 |
} |
27 |
} else { |
28 |
@@ -654,6 +658,18 @@ |
29 |
return $self->error($msg); |
30 |
} |
31 |
|
32 |
+ $msg = $self->validate_radio($self->cgi->param('autoversioning')); |
33 |
+ unless ($msg eq "OK") |
34 |
+ { |
35 |
+ return $self->error($msg); |
36 |
+ } |
37 |
+ |
38 |
+ $msg = $self->validate_radio($self->cgi->param('mime')); |
39 |
+ unless ($msg eq "OK") |
40 |
+ { |
41 |
+ return $self->error($msg); |
42 |
+ } |
43 |
+ |
44 |
my $g_list; |
45 |
my @groups = $self->cgi->param('groups'); |
46 |
foreach my $g (@groups) { |
47 |
@@ -684,6 +700,8 @@ |
48 |
ForceSSL => $self->cgi->param('force_ssl'), |
49 |
AccessType => $self->cgi->param('access_type'), |
50 |
AuthentificationRequired => $self->cgi->param('authentification_required'), |
51 |
+ SVNAutoVersioning => $self->cgi->param('autoversioning'), |
52 |
+ ModMimeUseProfilePath => $self->cgi->param('mime'), |
53 |
type => 'repository', |
54 |
}) ) |
55 |
{ |
56 |
@@ -734,6 +752,18 @@ |
57 |
return $self->error($msg); |
58 |
} |
59 |
|
60 |
+ $msg = $self->validate_radio($self->cgi->param('autoversioning')); |
61 |
+ unless ($msg eq "OK") |
62 |
+ { |
63 |
+ return $self->error($msg); |
64 |
+ } |
65 |
+ |
66 |
+ $msg = $self->validate_radio($self->cgi->param('mime')); |
67 |
+ unless ($msg eq "OK") |
68 |
+ { |
69 |
+ return $self->error($msg); |
70 |
+ } |
71 |
+ |
72 |
my $g_list; |
73 |
my @groups = $self->cgi->param('groups'); |
74 |
foreach my $g (@groups) { |
75 |
@@ -764,6 +794,8 @@ |
76 |
ForceSSL => $self->cgi->param('force_ssl'), |
77 |
AccessType => $self->cgi->param('access_type'), |
78 |
AuthentificationRequired => $self->cgi->param('authentification_required'), |
79 |
+ SVNAutoVersioning => $self->cgi->param('autoversioning'), |
80 |
+ ModMimeUseProfilePath => $self->cgi->param('mime'), |
81 |
type => 'repository', |
82 |
); |
83 |
|
84 |
@@ -896,42 +928,47 @@ |
85 |
|
86 |
} |
87 |
|
88 |
-=head2 validate_description() |
89 |
+=head2 validate_radio() |
90 |
|
91 |
-Checks that the name supplied does not contain any unacceptable chars. |
92 |
-Returns OK on success or a localised error message otherwise. |
93 |
+Checks wether a value is checked for a radio button |
94 |
|
95 |
=cut |
96 |
|
97 |
-sub validate_description { |
98 |
+sub validate_radio { |
99 |
|
100 |
- my ($self, $description) = @_; |
101 |
+ my ($self, $acctName) = @_; |
102 |
+ |
103 |
+# $self->debug(TRUE); |
104 |
+# $self->debug_msg("$acctName") ; |
105 |
+ |
106 |
+ unless($acctName ne '') { |
107 |
+ |
108 |
+ return $self->localise('ERROR_RADIO_VALUE_NOT_CHECKED', acctName => $acctName); |
109 |
|
110 |
- unless ($description =~ /^([a-z]\X+[\_\.\-a-z0-9]*)$/) |
111 |
- { |
112 |
- return $self->localise('DESCRIPTION_HAS_INVALID_CHARS', |
113 |
- {repoDescription => $description}); |
114 |
} |
115 |
+ |
116 |
+ $self->debug(FALSE); |
117 |
+ |
118 |
return "OK"; |
119 |
|
120 |
} |
121 |
|
122 |
-=head2 validate_radio() |
123 |
+=head2 validate_description() |
124 |
|
125 |
-Checks wether a value is checked for a radio button |
126 |
+#Checks that the name supplied does not contain any unacceptable chars. |
127 |
+#Returns OK on success or a localised error message otherwise. |
128 |
|
129 |
=cut |
130 |
|
131 |
-sub validate_radio { |
132 |
- |
133 |
- my ($self, $acctName) = @_; |
134 |
- |
135 |
- unless($acctName ne '') { |
136 |
+sub validate_description { |
137 |
|
138 |
- return $self->localise('ERROR_RADIO_VALUE_NOT_CHECKED', acctName => $acctName); |
139 |
- |
140 |
- } |
141 |
+# my ($self, $description) = @_; |
142 |
|
143 |
+# unless ($description =~ /^([a-z]\X+[\_\.\-a-z0-9]*)$/) |
144 |
+# { |
145 |
+# return $self->localise('DESCRIPTION_HAS_INVALID_CHARS', |
146 |
+# {repoDescription => $description}); |
147 |
+# } |
148 |
return "OK"; |
149 |
|
150 |
} |
151 |
@@ -958,8 +995,7 @@ |
152 |
my $acct_type = $accountdb->get($acct)->prop('type'); |
153 |
|
154 |
return $self->localise('ACCT_CLASHES_WITH_PSEUDONYM', |
155 |
- {acctName => $name, acctType => |
156 |
-$acct_type, acct => $acct}); |
157 |
+ {acctName => $name, acctType => $acct_type, acct => $acct}); |
158 |
} |
159 |
} |
160 |
elsif (defined getpwnam($name) || defined getgrnam($name)) |
161 |
--- smeserver-subversion-1.3/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/subversion.SVNAutoVersioning 2008-01-25 15:26:39.000000000 +0100 |
162 |
+++ smeserver-subversion-1.3/root/etc/e-smith/locale/en-us/etc/e-smith/web/functions/subversion 2008-01-25 17:45:10.000000000 +0100 |
163 |
@@ -155,6 +155,18 @@ |
164 |
</trans> |
165 |
</entry> |
166 |
<entry> |
167 |
+ <base>SVN_AUTOVERSIONING</base> |
168 |
+ <trans> |
169 |
+ Enable auto-versioning |
170 |
+ </trans> |
171 |
+ </entry> |
172 |
+ <entry> |
173 |
+ <base>MOD_MIME_USE_PATH_INFO</base> |
174 |
+ <trans> |
175 |
+ Automatically determine MIME type |
176 |
+ </trans> |
177 |
+ </entry> |
178 |
+ <entry> |
179 |
<base>GROUPS</base> |
180 |
<trans> |
181 |
Groups |
182 |
--- smeserver-subversion-1.3/root/etc/e-smith/web/functions/subversion.SVNAutoVersioning 2008-01-25 15:26:39.000000000 +0100 |
183 |
+++ smeserver-subversion-1.3/root/etc/e-smith/web/functions/subversion 2008-01-25 17:51:14.000000000 +0100 |
184 |
@@ -105,7 +105,7 @@ |
185 |
<subroutine src="print_repository_name_field()" /> |
186 |
<field |
187 |
type="text" |
188 |
- id="description" |
189 |
+ id="description" |
190 |
validation="validate_description"> |
191 |
<label>DESCRIPTION</label> |
192 |
</field> |
193 |
@@ -135,6 +135,22 @@ |
194 |
</field> |
195 |
|
196 |
<field |
197 |
+ type="radio" |
198 |
+ id="autoversioning" |
199 |
+ options="'yes', 'no'" |
200 |
+ validation="validate_radio"> |
201 |
+ <label>SVN_AUTOVERSIONING</label> |
202 |
+ </field> |
203 |
+ |
204 |
+ <field |
205 |
+ type="radio" |
206 |
+ id="mime" |
207 |
+ options="'yes', 'no'" |
208 |
+ validation="validate_radio"> |
209 |
+ <label>MOD_MIME_USE_PATH_INFO</label> |
210 |
+ </field> |
211 |
+ |
212 |
+ <field |
213 |
type="select" |
214 |
id="groups" |
215 |
options="group_list()" |
216 |
--- smeserver-subversion-1.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28SubversionContent.SVNAutoVersioning 2006-12-09 15:31:59.000000000 +0100 |
217 |
+++ smeserver-subversion-1.3/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/28SubversionContent 2008-01-25 17:45:10.000000000 +0100 |
218 |
@@ -29,12 +29,6 @@ |
219 |
my $modDAVSVNStatus = lc($modDAVSVN->prop("status")) or |
220 |
die "Property 'status' not found in key 'modDAVSVN'\n"; |
221 |
|
222 |
-# my $modAuthzSVN = $db_config->get("modAuthzSVN") or |
223 |
-# die "Key 'modAuthzSVN' not found in Configuration database\n"; |
224 |
- |
225 |
-# my $modAuthzSVNStatus = lc($modAuthzSVN->prop("status")) or |
226 |
-# die "Property 'status' not found in key 'modAuthzSVN'\n"; |
227 |
- |
228 |
$OUT = ""; |
229 |
|
230 |
if ( $modDAVSVNStatus eq 'enabled' ) { |
231 |
@@ -209,17 +203,16 @@ |
232 |
$OUT .= "\n"; |
233 |
$OUT .= " <Location /$key>\n"; |
234 |
|
235 |
- # Only allow when really allowed: |
236 |
- # - a secure connection is available and authentification is required |
237 |
- # - authentification is not required and no SSL is forced |
238 |
- # - a secure connection is unavailable |
239 |
-# if ( ($port eq "443") || ( ($pass eq 0) && ($forceSSL eq 0) ) || ($haveSSL ne 'yes') ) { |
240 |
+ $OUT .= "\n"; |
241 |
+ $OUT .= " DAV svn\n"; |
242 |
+ $OUT .= " SVNPath /home/e-smith/files/repositories/$key\n"; |
243 |
|
244 |
- $OUT .= "\n"; |
245 |
- $OUT .= " DAV svn\n"; |
246 |
- $OUT .= " SVNPath /home/e-smith/files/repositories/$key\n"; |
247 |
+ my $SVNAutoVersioning = $properties{'SVNAutoVersioning'} || off; |
248 |
+ my $ModMimeUsePathInfo = $properties{'ModMimeUsePathInfo'} || off; |
249 |
|
250 |
-# } |
251 |
+ $OUT .= "\n"; |
252 |
+ $OUT .= " SVNAutoVersioning $SVNAutoVersioning\n"; |
253 |
+ $OUT .= " ModMimeUsePathInfo $ModMimeUsePathInfo\n"; |
254 |
|
255 |
$OUT .= "\n"; |
256 |
$OUT .= " Options None\n"; |