From: lpsolit%gmail.com <> Date: Wed, 22 Feb 2006 21:28:45 +0000 (+0000) Subject: Bug 172415: Bugzilla should support URLs containing bug IDs with a leading # - Patch... X-Git-Tag: bugzilla-2.23.1~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3cdb97bbfa7fa359d30267530dbc6f213ba33c3;p=thirdparty%2Fbugzilla.git Bug 172415: Bugzilla should support URLs containing bug IDs with a leading # - Patch by Marc Schumann r=gerv a=justdave --- diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index 6165fd2bbe..302ac38b73 100755 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -1148,9 +1148,11 @@ sub ValidateBugID { my $dbh = Bugzilla->dbh; my $user = Bugzilla->user; - # Get rid of white-space around the ID. + # Get rid of leading '#' (number) mark, if present. + $id =~ s/^\s*#//; + # Remove whitespace $id = trim($id); - + # If the ID isn't a number, it might be an alias, so try to convert it. my $alias = $id; if (!detaint_natural($id)) {