/[smecontribs]/rpms/smeserver-subversion/contribs7/smeserver-subversion-1.2-validateDescriptionAllowAccents.patch
ViewVC logotype

Annotation of /rpms/smeserver-subversion/contribs7/smeserver-subversion-1.2-validateDescriptionAllowAccents.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Fri Jan 25 17:28:56 2008 UTC (16 years, 5 months ago) by snetram
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Removed old patches

1 snetram 1.1 --- smeserver-subversion-1.2/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm.validateDescriptionAllowAccents 2007-12-25 14:57:22.000000000 +0100
2     +++ smeserver-subversion-1.2/root/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/subversion.pm 2007-12-25 15:41:29.000000000 +0100
3     @@ -41,7 +41,6 @@
4    
5     our @ISA = qw(esmith::FormMagick Exporter);
6    
7     -#our @EXPORT = qw();
8     our @EXPORT = qw(
9     print_repository_table
10     print_repository_name_field
11     @@ -54,12 +53,11 @@
12     getExtraParams
13     print_save_or_add_button
14     validate_name
15     + validate_description
16     validate_radio
17     wherenext
18     );
19    
20     -#our $VERSION = sprintf'%d.%03d', q$Revision: 30 $ =~ /: (\d+).(\d+)/;
21     -
22     our $configdb = esmith::ConfigDB->open
23     or die "Can't open the Config database : $!\n" ;
24    
25     @@ -143,12 +141,6 @@
26     my $modDAVSVNStatus = 0 ;
27     $modDAVSVNStatus = 1 if ( ( $modDAVSVN->prop('status') || 'disabled' ) eq 'enabled' ) ;
28    
29     -# my $modAuthzSVN = $configdb->get('modAuthzSVN')
30     -# or ($self->error('ERR_NO_MODAUTHZSVN_RECORD') and return undef) ;
31     -
32     -# my $modAuthzSVNStatus = 0 ;
33     -# $modAuthzSVNStatus = 1 if ( ( $modAuthzSVN->prop('status') || 'disabled' ) eq 'enabled' ) ;
34     -
35     my $SysConfig = $configdb->get('sysconfig') ;
36     my $SMEVersion = ( $SysConfig->prop('ReleaseVersion') || 0 ) ;
37     $SMEVersion =~ s/^(\d+)\..*$/$1/ ;
38     @@ -191,18 +183,6 @@
39     . "</a>", "sme-noborders-content" ),"\n",
40     ),"\n";
41    
42     -# print $q->Tr(
43     -# esmith::cgi::genCell( $q,
44     -# "<img align=\"right\" src=\"/server-common/subversion_light_" . $modAuthzSVNStatus . ".jpg\" ALT=\"" .
45     -# $self->localise('STATUS_MODAUTHZSVN_' . $modAuthzSVNStatus) . "\">" ),
46     -# esmith::cgi::genCell( $q,
47     -# $self->localise('SERVICE_MODAUTHZSVN_' . $modAuthzSVNStatus) , "sme-noborders-label" ),
48     -# esmith::cgi::genCell( $q, "<a class=\"button-like\""
49     -# . "href=\"subversion?page=6&Next=First&Current=" . $modAuthzSVNStatus . "\">"
50     -# . $self->localise('BUTTON_LABEL_SERVICE_' . $modAuthzSVNStatus )
51     -# . "</a>", "sme-noborders-content" ),"\n",
52     -# ),"\n";
53     -
54     print $q->end_table(),"\n";
55    
56     return undef;
57     @@ -520,12 +500,8 @@
58     -value=>join(FS, split(FS, $rec->prop('Groups'))));
59     $q->param(-name=>'users',
60     -value=>join(FS, split(FS, $rec->prop('Users'))));
61     -# $q->param(-name=>'authentification_file',
62     -# -value=>$rec->prop('AuthentificationFile'));
63     $q->param(-name=>'authentification_required',
64     -value=>$rec->prop('AuthentificationRequired'));
65     -# $q->param(-name=>'authorization_required',
66     -# -value=>$rec->prop('AuthorizationRequired')),
67     $q->param(-name=>'access_type',
68     -value=>$rec->prop('AccessType')),
69     $q->param(-name=>'force_ssl',
70     @@ -557,7 +533,6 @@
71     sub group_list
72     {
73     my @groups = $accountdb->groups();
74     -# my %groups = ( admin => 'Admin', shared => 'Everyone', none => ' None');
75     my %groups = ();
76     foreach my $g (@groups) {
77     $groups{$g->key()} = $g->prop('Description')." (".$g->key.")";
78     @@ -575,10 +550,8 @@
79     sub user_list
80     {
81     my @users = $accountdb->users();
82     -# my %users = ( admin => 'Admin', shared => 'Everyone' , none => ' None');
83     my %users = ();
84     foreach my $u (@users) {
85     -# $users{$u->key()} = $u->prop('FirstName')." ". $u->prop('LastName')." ".$u->prop('Description')." (". $u->key.")";
86     $users{$u->key()} = $u->prop('LastName').", ". $u->prop('FirstName')." (". $u->key.")";
87     }
88     return \%users;
89     @@ -613,8 +586,6 @@
90     return \%props;
91     }
92    
93     -
94     -
95     =head1 THE ROUTINES THAT ACTUALLY DO THE WORK
96    
97     =cut
98     @@ -712,9 +683,7 @@
99     Removable => 'yes',
100     ForceSSL => $self->cgi->param('force_ssl'),
101     AccessType => $self->cgi->param('access_type'),
102     -# AuthorizationRequired => $self->cgi->param('authorization_required'),
103     AuthentificationRequired => $self->cgi->param('authentification_required'),
104     -# AuthentificationFile => $self->cgi->param('authentification_file'),
105     type => 'repository',
106     }) )
107     {
108     @@ -794,9 +763,7 @@
109     Users => $u_list,
110     ForceSSL => $self->cgi->param('force_ssl'),
111     AccessType => $self->cgi->param('access_type'),
112     -# AuthorizationRequired => $self->cgi->param('authorization_required'),
113     AuthentificationRequired => $self->cgi->param('authentification_required'),
114     -# AuthentificationFile => $self->cgi->param('authentification_file'),
115     type => 'repository',
116     );
117    
118     @@ -929,6 +896,26 @@
119    
120     }
121    
122     +=head2 validate_description()
123     +
124     +Checks that the name supplied does not contain any unacceptable chars.
125     +Returns OK on success or a localised error message otherwise.
126     +
127     +=cut
128     +
129     +sub validate_description {
130     +
131     + my ($self, $description) = @_;
132     +
133     + unless ($description =~ /^([a-z]\X+[\_\.\-a-z0-9]*)$/)
134     + {
135     + return $self->localise('ACCT_NAME_HAS_INVALID_CHARS',
136     + {acctName => $description});
137     + }
138     + return "OK";
139     +
140     +}
141     +
142     =head2 validate_radio()
143    
144     Checks wether a value is checked for a radio button

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed