diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2016-01-31 12:50:57 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2016-01-31 12:50:57 -0800 |
commit | cf1dc0b1bcd75da9f5594f45dd39b9e4feefa891 (patch) | |
tree | 54d1d7a46238ad55dce5ecd94aaed32f482645c2 | |
parent | custom_userhistory: HTML fixup. (diff) | |
download | bugzilla-cf1dc0b1bcd75da9f5594f45dd39b9e4feefa891.tar.gz bugzilla-cf1dc0b1bcd75da9f5594f45dd39b9e4feefa891.tar.bz2 bugzilla-cf1dc0b1bcd75da9f5594f45dd39b9e4feefa891.zip |
custom_userhistory: cleanup args.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | custom_userhistory.cgi | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/custom_userhistory.cgi b/custom_userhistory.cgi index ba9054d81..d7e9a8549 100755 --- a/custom_userhistory.cgi +++ b/custom_userhistory.cgi @@ -14,19 +14,19 @@ my $vars = {}; my $myuser = Bugzilla->login(LOGIN_REQUIRED); my $dbh = Bugzilla->switch_to_shadow_db(); my @bindValues; -my $query; +my ($query, $matchstr, $userid, $limit); print $cgi->header(); -my $matchstr = $cgi->param('matchstr'); -my $userid = $cgi->param('userid'); +$matchstr = $cgi->param('matchstr'); +$userid = $cgi->param('userid'); if(!defined($matchstr) and !defined($userid)) { print "No search parameters specified!<br/>"; exit(0); } exit 0 if !defined($matchstr) and !defined($userid); -my $limit = $cgi->param('limit'); +$limit = $cgi->param('limit'); $limit = 50 unless defined($limit) and $limit =~ /^\d+$/; trick_taint($matchstr) if defined($matchstr); @@ -34,7 +34,7 @@ trick_taint($userid) if defined($userid); trick_taint($limit); $userid = $matchstr ? login_to_id($matchstr) : $userid; -my $login_name = $matchstr ? $matchstr : Bugzilla::User->new($matchstr)->login; +$login_name = $matchstr ? $matchstr : Bugzilla::User->new($userid)->login; if(!$userid || !$login_name) { print "Bad user!<br/>"; |