OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-registry Date: 24-Nov-2005 12:08:42
Branch: HEAD Handle: 2005112411084200
Modified files:
openpkg-registry registry-ui.pl
Log:
relocate function; correct identation
Summary:
Revision Changes Path
1.5 +25 -25 openpkg-registry/registry-ui.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-registry/registry-ui.pl
============================================================================
$ cvs diff -u -r1.4 -r1.5 registry-ui.pl
--- openpkg-registry/registry-ui.pl 24 Nov 2005 09:39:57 -0000 1.4
+++ openpkg-registry/registry-ui.pl 24 Nov 2005 11:08:42 -0000 1.5
@@ -84,30 +84,6 @@
);
}
-sub identifyusername()
-{
- my $username;
- $username = undef;
-
- if ($cfg->{identification}->{mode} eq "ase") {
- die "FIXME ase not implemented";
- }
- elsif ($cfg->{identification}->{mode} eq "basicauth") {
- $username = $ENV{'REMOTE_USER'};
- }
- elsif ($cfg->{identification}->{mode} eq "naive") {
- $username = $cgi->cookie("username");
- }
- elsif ($cfg->{identification}->{mode} eq "constant") {
- $username = $cfg->{identification}->{default};
- }
- else {
- die "misconfigured identification
mode=\"".$cfg->{identification}->{mode}."\"";
- }
- $username = undef if ($username =~ m|^[ ]+$|);
- return $username;
-}
-
# first check for pages which do not require database access
#
if ($cgi->param("page") eq "css") {
@@ -803,7 +779,7 @@
-default => $cfg->{identification}->{default},
) . "\n";
$html .= $cgi->end_form;
- }
+ }
elsif ($cfg->{identification}->{mode} eq "constant") {
# nop
}
@@ -1405,3 +1381,27 @@
return $js;
}
+sub identifyusername()
+{
+ my $username;
+ $username = undef;
+
+ if ($cfg->{identification}->{mode} eq "ase") {
+ die "FIXME ase not implemented";
+ }
+ elsif ($cfg->{identification}->{mode} eq "basicauth") {
+ $username = $ENV{'REMOTE_USER'};
+ }
+ elsif ($cfg->{identification}->{mode} eq "naive") {
+ $username = $cgi->cookie("username");
+ }
+ elsif ($cfg->{identification}->{mode} eq "constant") {
+ $username = $cfg->{identification}->{default};
+ }
+ else {
+ die "misconfigured identification
mode=\"".$cfg->{identification}->{mode}."\"";
+ }
+ $username = undef if ($username =~ m|^[ ]+$|);
+ return $username;
+}
+
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]