Only display the vacation information if the user has logged in with a
[mirror/userdir-ldap-cgi.git] / search.cgi
index 7a54100..79586f3 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: search.cgi,v 1.6 2000/03/26 22:13:25 tausq Exp $
+# $Id: search.cgi,v 1.9 2004/11/18 14:32:00 joey Exp $
 # (c) 1999 Randolph Chung. Licensed under the GPL. <tausq@debian.org>
 
 use lib '.';
@@ -122,7 +122,7 @@ if (!$dosearch) {
     
     # Assemble name, attach web page link if present.
     $name = $data->{cn}->[0]." ".$data->{mn}->[0]." ".$data->{sn}->[0];
-    if (my $url = $data->{labeledurl}->[0]) {
+    if (my $url = $data->{labeleduri}->[0]) {
       $name = "<a href=\"$url\">$name</a>";
     }
     
@@ -134,7 +134,7 @@ if (!$dosearch) {
 
     # ICQ 
     if ($data->{icquin}->[0]) {
-      $icquin = sprintf("<a href=\"http://wwp.icq.com/?icqnumber=%s\">%s</a>", $data->{icquin}->[0], $data->{icquin}->[0]);
+      $icquin = sprintf("<a href=\"http://wwp.icq.com/%s\">%s</a>", $data->{icquin}->[0], $data->{icquin}->[0]);
     }
     
     # Format PGP/GPG key fingerprints
@@ -166,8 +166,8 @@ if (!$dosearch) {
     $login = $data->{uid}->[0]."\@debian.org";
     $login = "<a href=\"mailto:$login\">$login</a>";
     
-    # See if the user has a vacation message
-    $vacation = $data->{onvacation}->[0];
+    # See if the user has a vacation message, non-public
+    $vacation = $data->{onvacation}->[0] if ($authtoken && $id);
 
     # OK, now generate output... (i.e. put the output into the buffer )
     $outsub{searchresults} .= '<table border=2 cellpadding=2 cellspacing=0 bgcolor="#DDDDDD" width="80%">';