diff options
Diffstat (limited to 'httemplate/search/svc_Smart.html')
-rw-r--r-- | httemplate/search/svc_Smart.html | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/httemplate/search/svc_Smart.html b/httemplate/search/svc_Smart.html index 4d8f3e20e..706471ba0 100644 --- a/httemplate/search/svc_Smart.html +++ b/httemplate/search/svc_Smart.html @@ -1,29 +1,28 @@ +% if ( $cgi->param('search_svc') =~ /\.[a-z]{2,8}$/i +% && $cgi->param('search_svc') !~ /\@/ +% ) +% { + +% # looks (enough) like a domain + <% $cgi->redirect('svc_domain.cgi?domain='. uri_escape( $cgi->param('search_svc') ) ) %> + +% } elsif ( $cgi->param('search_svc') =~ /\w/ ) { % -% -%if ( $cgi->param('search_svc') =~ /\.[a-z]{2,8}$/i ) { -% -% # looks (enough) like a domain -% -% -<% $cgi->redirect('svc_domain.cgi?domain='. uri_escape( $cgi->param('search_svc') ) ) %> -% -% -%} elsif ( $cgi->param('search_svc') =~ /\w/ ) { -% -% #looks (enough) like a username -% -% -<% $cgi->redirect('svc_acct.cgi?username_type=Exact;username='. uri_escape( $cgi->param('search_svc') ) ) %> -% -% -%} else { -% -% -<% include('/elements/header.html', 'Unrecognized service string') %> +% if ( $cgi->param('search_svc') =~ /^(.+)\@(.+)$/ ) { + +% #looks (enough) like a username@domain + <% $cgi->redirect('svc_acct.cgi?username_type=Exact;username='. uri_escape($1). ';domain='. uri_escape($2) ) %> + +% } else { + +% #looks (enough) like a username + <% $cgi->redirect('svc_acct.cgi?username_type=Exact;username='. uri_escape( $cgi->param('search_svc') ) ) %> + +% } + +% } else { + + <% include('/elements/header.html', 'Unrecognized service string') %> <% include('/elements/footer.html') %> -% -% -%} -% -% +% } |