licom.cgi: Remove debugging output and fix markup of HTTP and mailto: hrefs.
authorFlorian Forster <octo@verplant.org>
Tue, 12 Sep 2006 22:01:13 +0000 (00:01 +0200)
committerFlorian Forster <octo@verplant.org>
Tue, 12 Sep 2006 22:01:13 +0000 (00:01 +0200)
licom.cgi

index d00ab66..2a6f9ea 100755 (executable)
--- a/licom.cgi
+++ b/licom.cgi
@@ -737,14 +737,6 @@ sub action_update
 
                my $old_cn = $person->name ();
 
-               print <<HTML;
-<div><code>
-       \$lastname = $lastname<br />
-       \$firstname = $firstname<br />
-       \$old_cn = $old_cn
-</code></div>
-HTML
-
                $person->lastname  ($lastname)  if ($lastname  and $lastname  ne $person->lastname ());
                $person->firstname ($firstname) if ($firstname and $firstname ne $person->firstname ());
 
@@ -759,8 +751,6 @@ HTML
                                # ->del_members automatically deleted the
                                # group, if no more members exist. So this
                                # order is important.
-                               print "<div><code>\$cn = " . encode_entities ($cn) . "; "
-                               . "\$old_cn = " . encode_entities ($old_cn) . ";</code></div>\n";
                                $_->add_members ($cn);
                                $_->del_members ($old_cn);
                        }
@@ -1150,7 +1140,7 @@ function updateTextbox (name)
                if (arrTb[i].value != objStr)
                {
                        arrTb[i].value = objStr;
-                       arrTb[i].focus ();
+                       /* arrTb[i].focus (); */
                }
        }
 
@@ -1302,6 +1292,7 @@ sub markup_field
                if ($value =~ m#^([a-z]+)://(.+)$#)
                {
                        $value_uri = $1 . '://' . uri_escape_utf8 ($2);
+                       $value_uri =~ s#%2f#/#gi;
                }
                else
                {
@@ -1311,6 +1302,7 @@ sub markup_field
        }
        elsif ($field eq 'mail')
        {
+               $value_uri =~ s/%40/@/g;
                return (qq(<a href="mailto:$value_uri" class="mail">$value_html</a>));
        }
        return ($value_html);