projects
/
mirror
/
userdir-ldap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7551db8
)
fixed url parsing code
author
tausq
<>
Fri, 1 Oct 1999 01:44:20 +0000
(
01:44
+0000)
committer
tausq
<>
Fri, 1 Oct 1999 01:44:20 +0000
(
01:44
+0000)
web/machines.cgi
patch
|
blob
|
history
diff --git
a/web/machines.cgi
b/web/machines.cgi
index
1b2c022
..
61e50cd
100755
(executable)
--- a/
web/machines.cgi
+++ b/
web/machines.cgi
@@
-1,5
+1,5
@@
#!/usr/bin/perl
#!/usr/bin/perl
-# $Id: machines.cgi,v 1.
3 1999/09/30 06:21:28
tausq Exp $
+# $Id: machines.cgi,v 1.
4 1999/10/01 03:44:20
tausq Exp $
# (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
# (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
@@
-87,16
+87,17
@@
foreach $dn (sort {$entries->{$a}->{host}->[0] <=> $entries->{$b}->{host}->[0]}
$output{'sponsor-admin'} = sprintf("<a href=\"mailto:%s\">%s</a>", $output{'sponsor-admin'}, $output{'sponsor-admin'});
# URL
$output{'sponsor-admin'} = sprintf("<a href=\"mailto:%s\">%s</a>", $output{'sponsor-admin'}, $output{'sponsor-admin'});
# URL
- my
$sponsor
;
+ my
($sponsor, $url) = undef
;
$output{sponsor} = undef;
foreach $sponsor (@{$data->{sponsor}}) {
$output{sponsor} = undef;
foreach $sponsor (@{$data->{sponsor}}) {
- print "<!-- $sponsor -->\n";
- $sponsor =~ /(.*)\s*(http.*)?/i;
+ $sponsor =~ m#((http|ftp)://\S+)#i;
+ $url = $1;
+ $sponsor =~ s/$url//;
$output{sponsor} .= "<br>" if ($output{sponsor});
$output{sponsor} .= "<br>" if ($output{sponsor});
- if ($
2
) {
- $output{sponsor} .= sprintf("<a href=\"%s\">%s</a>", $
1, $2
);
+ if ($
url
) {
+ $output{sponsor} .= sprintf("<a href=\"%s\">%s</a>", $
url, $sponsor
);
} else {
} else {
- $output{sponsor} .= $
1
;
+ $output{sponsor} .= $
sponsor
;
}
}
}
}