--- smeserver-subversion-1.3/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm.SVNAutoVersioning 2008-01-25 15:26:39.000000000 +0100
+++ smeserver-subversion-1.3/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm 2008-01-25 17:53:00.000000000 +0100
@@ -53,8 +53,8 @@
getExtraParams
print_save_or_add_button
validate_name
- validate_description
validate_radio
+ validate_description
wherenext
);
@@ -503,9 +503,13 @@
$q->param(-name=>'authentification_required',
-value=>$rec->prop('AuthentificationRequired'));
$q->param(-name=>'access_type',
- -value=>$rec->prop('AccessType')),
+ -value=>$rec->prop('AccessType'));
$q->param(-name=>'force_ssl',
-value=>$rec->prop('ForceSSL'));
+ $q->param(-name=>'autoversioning',
+ -value=>$rec->prop('SVNAutoVersioning') || 'on');
+ $q->param(-name=>'mime',
+ -value=>$rec->prop('ModMimeUsePathInfo') || 'off');
}
} else {
@@ -654,6 +658,18 @@
return $self->error($msg);
}
+ $msg = $self->validate_radio($self->cgi->param('autoversioning'));
+ unless ($msg eq "OK")
+ {
+ return $self->error($msg);
+ }
+
+ $msg = $self->validate_radio($self->cgi->param('mime'));
+ unless ($msg eq "OK")
+ {
+ return $self->error($msg);
+ }
+
my $g_list;
my @groups = $self->cgi->param('groups');
foreach my $g (@groups) {
@@ -684,6 +700,8 @@
ForceSSL => $self->cgi->param('force_ssl'),
AccessType => $self->cgi->param('access_type'),
AuthentificationRequired => $self->cgi->param('authentification_required'),
+ SVNAutoVersioning => $self->cgi->param('autoversioning'),
+ ModMimeUseProfilePath => $self->cgi->param('mime'),
type => 'repository',
}) )
{
@@ -734,6 +752,18 @@
return $self->error($msg);
}
+ $msg = $self->validate_radio($self->cgi->param('autoversioning'));
+ unless ($msg eq "OK")
+ {
+ return $self->error($msg);
+ }
+
+ $msg = $self->validate_radio($self->cgi->param('mime'));
+ unless ($msg eq "OK")
+ {
+ return $self->error($msg);
+ }
+
my $g_list;
my @groups = $self->cgi->param('groups');
foreach my $g (@groups) {
@@ -764,6 +794,8 @@
ForceSSL => $self->cgi->param('force_ssl'),
AccessType => $self->cgi->param('access_type'),
AuthentificationRequired => $self->cgi->param('authentification_required'),
+ SVNAutoVersioning => $self->cgi->param('autoversioning'),
+ ModMimeUseProfilePath => $self->cgi->param('mime'),
type => 'repository',
);
@@ -896,42 +928,47 @@
}
-=head2 validate_description()
+=head2 validate_radio()
-Checks that the name supplied does not contain any unacceptable chars.
-Returns OK on success or a localised error message otherwise.
+Checks wether a value is checked for a radio button
=cut
-sub validate_description {
+sub validate_radio {
- my ($self, $description) = @_;
+ my ($self, $acctName) = @_;
+
+# $self->debug(TRUE);
+# $self->debug_msg("$acctName") ;
+
+ unless($acctName ne '') {
+
+ return $self->localise('ERROR_RADIO_VALUE_NOT_CHECKED', acctName => $acctName);
- unless ($description =~ /^([a-z]\X+[\_\.\-a-z0-9]*)$/)
- {
- return $self->localise('DESCRIPTION_HAS_INVALID_CHARS',
- {repoDescription => $description});
}
+
+ $self->debug(FALSE);
+
return "OK";
}
-=head2 validate_radio()
+=head2 validate_description()
-Checks wether a value is checked for a radio button
+#Checks that the name supplied does not contain any unacceptable chars.
+#Returns OK on success or a localised error message otherwise.
=cut
-sub validate_radio {
-
- my ($self, $acctName) = @_;
-
- unless($acctName ne '') {
+sub validate_description {
- return $self->localise('ERROR_RADIO_VALUE_NOT_CHECKED', acctName => $acctName);
-
- }
+# my ($self, $description) = @_;
+# unless ($description =~ /^([a-z]\X+[\_\.\-a-z0-9]*)$/)
+# {
+# return $self->localise('DESCRIPTION_HAS_INVALID_CHARS',
+# {repoDescription => $description});
+# }
return "OK";
}
@@ -958,8 +995,7 @@
my $acct_type = $accountdb->get($acct)->prop('type');
return $self->localise('ACCT_CLASHES_WITH_PSEUDONYM',
- {acctName => $name, acctType =>
-$acct_type, acct => $acct});
+ {acctName => $name, acctType => $acct_type, acct => $acct});
}
}
elsif (defined getpwnam($name) || defined getgrnam($name))
--- 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
+++ 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
@@ -155,6 +155,18 @@
+ SVN_AUTOVERSIONING
+
+ Enable auto-versioning
+
+
+
+ MOD_MIME_USE_PATH_INFO
+
+ Automatically determine MIME type
+
+
+
GROUPS
Groups
--- smeserver-subversion-1.3/root/etc/e-smith/web/functions/subversion.SVNAutoVersioning 2008-01-25 15:26:39.000000000 +0100
+++ smeserver-subversion-1.3/root/etc/e-smith/web/functions/subversion 2008-01-25 17:51:14.000000000 +0100
@@ -105,7 +105,7 @@
@@ -135,6 +135,22 @@
+
+
+
+
+
+
+
+ prop("status")) or
die "Property 'status' not found in key 'modDAVSVN'\n";
-# my $modAuthzSVN = $db_config->get("modAuthzSVN") or
-# die "Key 'modAuthzSVN' not found in Configuration database\n";
-
-# my $modAuthzSVNStatus = lc($modAuthzSVN->prop("status")) or
-# die "Property 'status' not found in key 'modAuthzSVN'\n";
-
$OUT = "";
if ( $modDAVSVNStatus eq 'enabled' ) {
@@ -209,17 +203,16 @@
$OUT .= "\n";
$OUT .= " \n";
- # Only allow when really allowed:
- # - a secure connection is available and authentification is required
- # - authentification is not required and no SSL is forced
- # - a secure connection is unavailable
-# if ( ($port eq "443") || ( ($pass eq 0) && ($forceSSL eq 0) ) || ($haveSSL ne 'yes') ) {
+ $OUT .= "\n";
+ $OUT .= " DAV svn\n";
+ $OUT .= " SVNPath /home/e-smith/files/repositories/$key\n";
- $OUT .= "\n";
- $OUT .= " DAV svn\n";
- $OUT .= " SVNPath /home/e-smith/files/repositories/$key\n";
+ my $SVNAutoVersioning = $properties{'SVNAutoVersioning'} || 'off';
+ my $ModMimeUsePathInfo = $properties{'ModMimeUsePathInfo'} || 'off';
-# }
+ $OUT .= "\n";
+ $OUT .= " SVNAutoVersioning $SVNAutoVersioning\n";
+ $OUT .= " ModMimeUsePathInfo $ModMimeUsePathInfo\n";
$OUT .= "\n";
$OUT .= " Options None\n";