]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 303669: Bugzilla mis-uses perl subroutine prototypes
authormkanat%kerio.com <>
Tue, 9 Aug 2005 12:58:58 +0000 (12:58 +0000)
committermkanat%kerio.com <>
Tue, 9 Aug 2005 12:58:58 +0000 (12:58 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave

27 files changed:
Bugzilla/Bug.pm
Bugzilla/BugMail.pm
Bugzilla/Classification.pm
Bugzilla/Component.pm
Bugzilla/DB.pm
Bugzilla/Field.pm
Bugzilla/Group.pm
Bugzilla/Milestone.pm
Bugzilla/Product.pm
Bugzilla/Template.pm
Bugzilla/Token.pm
Bugzilla/User.pm
Bugzilla/Util.pm
Bugzilla/Version.pm
buglist.cgi
checksetup.pl
docs/makedocs.pl
editclassifications.cgi
editcomponents.cgi
editflagtypes.cgi
editgroups.cgi
editkeywords.cgi
editproducts.cgi
editvalues.cgi
process_bug.cgi
sanitycheck.cgi
userprefs.cgi

index c7e7637485442955e062be65650840e303b7d9c9..d20af1268e81fe536d18963402fb2910f35d2b92 100755 (executable)
@@ -339,7 +339,7 @@ sub actual_time {
     return $self->{'actual_time'};
 }
 
-sub any_flags_requesteeble () {
+sub any_flags_requesteeble {
     my ($self) = @_;
     return $self->{'any_flags_requesteeble'} 
         if exists $self->{'any_flags_requesteeble'};
@@ -351,7 +351,7 @@ sub any_flags_requesteeble () {
     return $self->{'any_flags_requesteeble'};
 }
 
-sub attachments () {
+sub attachments {
     my ($self) = @_;
     return $self->{'attachments'} if exists $self->{'attachments'};
     return [] if $self->{'error'};
@@ -359,7 +359,7 @@ sub attachments () {
     return $self->{'attachments'};
 }
 
-sub assigned_to () {
+sub assigned_to {
     my ($self) = @_;
     return $self->{'assigned_to'} if exists $self->{'assigned_to'};
     $self->{'assigned_to_id'} = 0 if $self->{'error'};
@@ -367,7 +367,7 @@ sub assigned_to () {
     return $self->{'assigned_to'};
 }
 
-sub blocked () {
+sub blocked {
     my ($self) = @_;
     return $self->{'blocked'} if exists $self->{'blocked'};
     return [] if $self->{'error'};
@@ -378,7 +378,7 @@ sub blocked () {
 # Even bugs in an error state always have a bug_id.
 sub bug_id { $_[0]->{'bug_id'}; }
 
-sub cc () {
+sub cc {
     my ($self) = @_;
     return $self->{'cc'} if exists $self->{'cc'};
     return [] if $self->{'error'};
@@ -396,7 +396,7 @@ sub cc () {
     return $self->{'cc'};
 }
 
-sub dependson () {
+sub dependson {
     my ($self) = @_;
     return $self->{'dependson'} if exists $self->{'dependson'};
     return [] if $self->{'error'};
@@ -405,7 +405,7 @@ sub dependson () {
     return $self->{'dependson'};
 }
 
-sub flag_types () {
+sub flag_types {
     my ($self) = @_;
     return $self->{'flag_types'} if exists $self->{'flag_types'};
     return [] if $self->{'error'};
@@ -430,7 +430,7 @@ sub flag_types () {
     return $self->{'flag_types'};
 }
 
-sub keywords () {
+sub keywords {
     my ($self) = @_;
     return $self->{'keywords'} if exists $self->{'keywords'};
     return () if $self->{'error'};
@@ -456,7 +456,7 @@ sub longdescs {
     return $self->{'longdescs'};
 }
 
-sub milestoneurl () {
+sub milestoneurl {
     my ($self) = @_;
     return $self->{'milestoneurl'} if exists $self->{'milestoneurl'};
     return '' if $self->{'error'};
@@ -464,7 +464,7 @@ sub milestoneurl () {
     return $self->{'milestoneurl'};
 }
 
-sub qa_contact () {
+sub qa_contact {
     my ($self) = @_;
     return $self->{'qa_contact'} if exists $self->{'qa_contact'};
     return undef if $self->{'error'};
@@ -480,7 +480,7 @@ sub qa_contact () {
     return $self->{'qa_contact'};
 }
 
-sub reporter () {
+sub reporter {
     my ($self) = @_;
     return $self->{'reporter'} if exists $self->{'reporter'};
     $self->{'reporter_id'} = 0 if $self->{'error'};
@@ -489,7 +489,7 @@ sub reporter () {
 }
 
 
-sub show_attachment_flags () {
+sub show_attachment_flags {
     my ($self) = @_;
     return $self->{'show_attachment_flags'} 
         if exists $self->{'show_attachment_flags'};
@@ -694,7 +694,7 @@ sub choices {
 # the alias.
 # Queries the database for the bug with a given alias, and returns
 # the ID of the bug if it exists or the undefined value if it doesn't.
-sub bug_alias_to_id ($) {
+sub bug_alias_to_id {
     my ($alias) = @_;
     return undef unless Param("usebugaliases");
     my $dbh = Bugzilla->dbh;
@@ -707,7 +707,7 @@ sub bug_alias_to_id ($) {
 # Subroutines
 #####################################################################
 
-sub AppendComment ($$$;$$$) {
+sub AppendComment {
     my ($bugid, $whoid, $comment, $isprivate, $timestamp, $work_time) = @_;
     $work_time ||= 0;
     my $dbh = Bugzilla->dbh;
@@ -992,7 +992,7 @@ sub CountOpenDependencies {
     return @dependencies;
 }
 
-sub ValidateComment ($) {
+sub ValidateComment {
     my ($comment) = @_;
 
     if (defined($comment) && length($comment) > MAX_COMMENT_LENGTH) {
@@ -1242,7 +1242,7 @@ sub ValidateBugAlias {
 }
 
 # Validate and return a hash of dependencies
-sub ValidateDependencies($$$) {
+sub ValidateDependencies {
     my $fields = {};
     $fields->{'dependson'} = shift;
     $fields->{'blocked'} = shift;
index 6bbebfa7cff986bc37bfe3977e9a10b008f35fef..35026b48e9cd11415ff1024fa84c52820c583ab4 100644 (file)
@@ -112,7 +112,7 @@ END
 # All the names are email addresses, not userids
 # values are scalars, except for cc, which is a list
 # This hash usually comes from the "mailrecipients" var in a template call.
-sub Send($;$) {
+sub Send {
     my ($id, $forced) = (@_);
 
     # This only works in a sub. Probably something to do with the
@@ -122,7 +122,7 @@ sub Send($;$) {
     return ProcessOneBug($id, $forced);
 }
 
-sub ProcessOneBug($$) {
+sub ProcessOneBug {
     my ($id, $forced) = (@_);
 
     my @headerlist;
@@ -474,7 +474,7 @@ sub ProcessOneBug($$) {
     return {'sent' => \@sent, 'excluded' => \@excluded};
 }
 
-sub sendMail($$$$$$$$$$$$) {
+sub sendMail {
     my ($user, $hlRef, $relRef, $valueRef, $dmhRef, $fdRef,  
         $diffRef, $newcomments, $anyprivate, $start, 
         $id) = @_;
@@ -608,7 +608,7 @@ sub sendMail($$$$$$$$$$$$) {
     return 1;
 }
 
-sub MessageToMTA ($) {
+sub MessageToMTA {
     my ($msg) = (@_);
     return if (Param('mail_delivery_method') eq "none");
 
@@ -639,7 +639,7 @@ sub MessageToMTA ($) {
     $mailer->close;
 }
 
-sub encode_qp_words($) {
+sub encode_qp_words {
     my ($line) = (@_);
     my @encoded;
     foreach my $word (split / /, $line) {
@@ -652,7 +652,7 @@ sub encode_qp_words($) {
     return join(' ', @encoded);
 }
 
-sub encode_message($$) {
+sub encode_message {
     my ($header, $body) = @_;
 
     # read header into MIME::Entity
@@ -735,14 +735,14 @@ sub encode_message($$) {
 # its value will be placed into the string. If it's not a key in the hash,
 # then the value of the parameter called "some_variable_name" will be placed
 # into the string.
-sub PerformSubsts ($;$) {
+sub PerformSubsts {
     my ($str, $substs) = (@_);
     $str =~ s/%([a-z]*)%/(defined $substs->{$1} ? $substs->{$1} : Param($1))/eg;
     return $str;
 }
 
 # Send the login name and password of the newly created account to the user.
-sub MailPassword ($$) {
+sub MailPassword {
     my ($login, $password) = (@_);
     my $template = Param("passwordmail");
     my $msg = PerformSubsts($template,
index c35c0ba9b6d2349860eee7f9ea2eb90a72fda16b..4f50848a2698666e901a63fa408808ed38b59349 100644 (file)
@@ -105,7 +105,7 @@ sub description { return $_[0]->{'description'}; }
 ####      Subroutines      ####
 ###############################
 
-sub get_all_classifications () {
+sub get_all_classifications {
     my $dbh = Bugzilla->dbh;
 
     my $ids = $dbh->selectcol_arrayref(q{
@@ -118,7 +118,7 @@ sub get_all_classifications () {
     return @classifications;
 }
 
-sub check_classification ($) {
+sub check_classification {
     my ($class_name) = @_;
 
     unless ($class_name) {
index 216616d98806cf563acdd89b76b6ca307800527d..f1d4c24b26411a59ff9942f1187fc912d0e4cdfc 100644 (file)
@@ -103,7 +103,7 @@ sub default_qa_contact { return $_[0]->{'initialqacontact'}; }
 ####      Subroutines      ####
 ###############################
 
-sub get_components_by_product ($) {
+sub get_components_by_product {
     my ($product_id) = @_;
     my $dbh = Bugzilla->dbh;
 
index 43c14a5510685d3c272fd312ddb2bb4b63b142aa..67cf4ae9c88dd52458792538e4cd26fdaca2f522 100644 (file)
@@ -128,12 +128,12 @@ sub FetchOneColumn {
     return $row[0];
 }
 
-sub PushGlobalSQLState() {
+sub PushGlobalSQLState {
     push @SQLStateStack, $_current_sth;
     push @SQLStateStack, $_fetchahead;
 }
 
-sub PopGlobalSQLState() {
+sub PopGlobalSQLState {
     die ("PopGlobalSQLState: stack underflow") if ( scalar(@SQLStateStack) < 1 );
     $_fetchahead = pop @SQLStateStack;
     $_current_sth = pop @SQLStateStack;
@@ -153,7 +153,7 @@ sub connect_shadow {
                     Param("shadowdbsock"), $db_user, $db_pass);
 }
 
-sub connect_main (;$) {
+sub connect_main {
     my ($no_db_name) = @_;
     my $connect_to_db = $db_name;
     $connect_to_db = "" if $no_db_name;
index ed82f805b43d8c41bb9e3ac3fab692d554a56deb..37771257c40490eccae174ce0cc478da8bfa3e5f 100644 (file)
@@ -27,7 +27,7 @@ use Bugzilla::Util;
 use Bugzilla::Error;
 
 
-sub check_form_field ($$;$) {
+sub check_form_field {
     my ($cgi, $fieldname, $legalsRef) = @_;
     my $dbh = Bugzilla->dbh;
 
@@ -45,7 +45,7 @@ sub check_form_field ($$;$) {
     }
 }
 
-sub check_form_field_defined ($$) {
+sub check_form_field_defined {
     my ($cgi, $fieldname) = @_;
 
     if (!defined $cgi->param($fieldname)) {
index 808860274fc22e75e64d7111c4a784ef814ea6ef..e24ccb25480b9d45c0f9559eba1fb0e8839d36a8 100644 (file)
@@ -106,7 +106,7 @@ sub is_active    { return $_[0]->{'isactive'};     }
 #####  Module Subroutines    ###
 ################################
 
-sub ValidateGroupName ($$) {
+sub ValidateGroupName {
     my ($name, @users) = (@_);
     my $dbh = Bugzilla->dbh;
     my $query = "SELECT id FROM groups " .
@@ -125,7 +125,7 @@ sub ValidateGroupName ($$) {
     return $ret;
 }
 
-sub get_group_controls_by_product ($) {
+sub get_group_controls_by_product {
     my ($product_id) = @_;
     my $dbh = Bugzilla->dbh;
 
index 6956d5313d281d095723f8491b758af053703a0a..fa8fc0f823f20b182434a6c28965f032bbf129fc 100644 (file)
@@ -99,7 +99,7 @@ sub sortkey    { return $_[0]->{'sortkey'};    }
 #####     Subroutines      #####
 ################################
 
-sub get_milestones_by_product ($) {
+sub get_milestones_by_product {
     my ($product_id) = @_;
     my $dbh = Bugzilla->dbh;
 
@@ -125,7 +125,7 @@ sub get_milestones_by_product ($) {
     return @milestones;
 }
 
-sub check_milestone ($$) {
+sub check_milestone {
     my ($product, $milestone_name) = @_;
 
     unless ($milestone_name) {
@@ -142,7 +142,7 @@ sub check_milestone ($$) {
     return $milestone;
 }
 
-sub check_sort_key ($$) {
+sub check_sort_key {
     my ($milestone_name, $sortkey) = @_;
     # Keep a copy in case detaint_signed() clears the sortkey
     my $stored_sortkey = $sortkey;
index 26c80103f8bf80539504d0c1bc6c8f33e8e1366f..7af2995c2ab3ea40ca3a692cf905a4e7ad0e6b40 100644 (file)
@@ -178,7 +178,7 @@ sub classification_id { return $_[0]->{'classification_id'}; }
 ####      Subroutines    ######
 ###############################
 
-sub get_products_by_classification ($) {
+sub get_products_by_classification {
     my ($class_id) = @_;
     my $dbh = Bugzilla->dbh;
     $class_id ||= DEFAULT_CLASSIFICATION_ID;
@@ -205,7 +205,7 @@ sub get_products_by_classification ($) {
     return @products;
 }
 
-sub get_all_products () {
+sub get_all_products {
     my $dbh = Bugzilla->dbh;
 
     my $ids = $dbh->selectcol_arrayref(q{
@@ -218,7 +218,7 @@ sub get_all_products () {
     return @products;
 }
 
-sub check_product ($) {
+sub check_product {
     my ($product_name) = @_;
 
     unless ($product_name) {
index 5c5aff574275d3ae94d8d17fbef09348fe58f5f4..711144a6fd3c2a50c7e44576b27569f520c892f6 100644 (file)
@@ -97,7 +97,7 @@ sub sortAcceptLanguage {
 # Returns the path to the templates based on the Accept-Language
 # settings of the user and of the available languages
 # If no Accept-Language is present it uses the defined default
-sub getTemplateIncludePath () {
+sub getTemplateIncludePath {
     # Return cached value if available
 
     # XXXX - mod_perl!
index fe72915a36b4a725d2f0599b50fc5d7853f87e03..717aeaf3749a32fc90a093e8e04c751a2f471d1c 100644 (file)
@@ -249,7 +249,7 @@ sub HasEmailChangeToken {
     return $token;
 }
 
-sub GetTokenData($) {
+sub GetTokenData {
     # Returns the userid, issuedate and eventdata for the specified token
 
     my ($token) = @_;
@@ -263,7 +263,7 @@ sub GetTokenData($) {
          WHERE  token = ?", undef, $token);
 }
 
-sub DeleteToken($) {
+sub DeleteToken {
     # Deletes specified token
 
     my ($token) = @_;
@@ -280,7 +280,7 @@ sub DeleteToken($) {
 # Internal Functions
 ################################################################################
 
-sub _create_token($$$) {
+sub _create_token {
     # Generates a unique token and inserts it into the database
     # Returns the token and the token timestamp
     my ($userid, $tokentype, $eventdata) = @_;
index f9efcd248ef2e98b542221c499db1b37ac22928e..5462aa5d4f338dfdab464dca5b13d6279f74c54e 100644 (file)
@@ -1156,7 +1156,7 @@ sub get_userlist {
     return $self->{'userlist'};
 }
 
-sub insert_new_user ($$;$$) {
+sub insert_new_user {
     my ($username, $realname, $password, $disabledtext) = (@_);
     my $dbh = Bugzilla->dbh;
 
@@ -1201,7 +1201,7 @@ sub insert_new_user ($$;$$) {
     return $password;
 }
 
-sub is_available_username ($;$) {
+sub is_available_username {
     my ($username, $old_username) = @_;
 
     if(login_to_id($username) != 0) {
@@ -1237,7 +1237,7 @@ sub is_available_username ($;$) {
     return 1;
 }
 
-sub login_to_id ($) {
+sub login_to_id {
     my ($login) = (@_);
     my $dbh = Bugzilla->dbh;
     # $login will only be used by the following SELECT statement, so it's safe.
@@ -1252,7 +1252,7 @@ sub login_to_id ($) {
     }
 }
 
-sub UserInGroup ($) {
+sub UserInGroup {
     return defined Bugzilla->user->groups->{$_[0]} ? 1 : 0;
 }
 
index 43100b160a3fafee20210b3f6c724d090a9813c8..d70bc13dd13495f8520edcb4b939c04067984f91 100644 (file)
@@ -138,7 +138,7 @@ sub url_decode {
     return $todecode;
 }
 
-sub i_am_cgi () {
+sub i_am_cgi {
     # I use SERVER_SOFTWARE because it's required to be
     # defined for all requests in the CGI spec.
     return exists $ENV{'SERVER_SOFTWARE'} ? 1 : 0;
@@ -221,7 +221,7 @@ sub diff_strings {
     return ($removed, $added);
 }
 
-sub wrap_comment ($) {
+sub wrap_comment {
     my ($comment) = @_;
     my $wrappedcomment = "";
 
@@ -245,7 +245,7 @@ sub wrap_comment ($) {
     return $wrappedcomment;
 }
 
-sub find_wrap_point ($$) {
+sub find_wrap_point {
     my ($string, $maxpos) = @_;
     if (!$string) { return 0 }
     if (length($string) < $maxpos) { return length($string) }
@@ -264,7 +264,7 @@ sub find_wrap_point ($$) {
     return $wrappoint;
 }
 
-sub format_time ($;$) {
+sub format_time {
     my ($date, $format) = @_;
 
     # If $format is undefined, try to guess the correct date format.    
@@ -316,7 +316,7 @@ sub format_time_decimal {
     return $newtime;
 }
 
-sub file_mod_time ($) {
+sub file_mod_time {
     my ($filename) = (@_);
     my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
         $atime,$mtime,$ctime,$blksize,$blocks)
@@ -324,7 +324,7 @@ sub file_mod_time ($) {
     return $mtime;
 }
 
-sub bz_crypt ($) {
+sub bz_crypt {
     my ($password) = @_;
 
     # The list of characters that can appear in a salt.  Salts and hashes
index 3a460e02848125bc80e054aad2f1ac8cd14c88d9..473a186c2a1eb912e446bda9cc0658d57a792ae6 100644 (file)
@@ -97,7 +97,7 @@ sub product_id { return $_[0]->{'product_id'}; }
 #####     Subroutines       ###
 ###############################
 
-sub get_versions_by_product ($) {
+sub get_versions_by_product {
     my ($product_id) = @_;
     my $dbh = Bugzilla->dbh;
 
@@ -123,7 +123,7 @@ sub get_versions_by_product ($) {
     return @versions;
 }
 
-sub check_version ($$) {
+sub check_version {
     my ($product, $version_name) = @_;
 
     $version_name || ThrowUserError('version_not_specified');
index 45c0db5524a4f5e4261b652abb76d758ffb48585..c307c89609dd6b878f3a11e3bcb51f9c963fea20 100755 (executable)
@@ -226,7 +226,7 @@ sub LookupNamedQuery {
 #
 # Returns: A boolean true value if the query existed in the database 
 # before, and we updated it. A boolean false value otherwise.
-sub InsertNamedQuery ($$$;$) {
+sub InsertNamedQuery {
     my ($userid, $query_name, $query, $link_in_footer) = @_;
     $link_in_footer ||= 0;
     $query_name = trim($query_name);
index f8385449e8e83e8a5e2bcbd1b24a95d9c06fbd26..3a7f42559a1c8fc799b5a22c91892f86d24baf59 100755 (executable)
@@ -518,14 +518,14 @@ EOT
     die "Syntax error in localconfig";
 }
 
-sub LocalVarExists ($)
+sub LocalVarExists
 {
     my ($name) = @_;
     return $main::{$name}; # if localconfig declared it, we're done.
 }
 
 my $newstuff = "";
-sub LocalVar ($$)
+sub LocalVar
 {
     my ($name, $definition) = @_;
     return if LocalVarExists($name); # if localconfig declared it, we're done.
@@ -1615,7 +1615,7 @@ $dbh->bz_setup_database();
 # Populate groups table
 ###########################################################################
 
-sub GroupDoesExist ($)
+sub GroupDoesExist
 {
     my ($name) = @_;
     my $sth = $dbh->prepare("SELECT name FROM groups WHERE name='$name'");
@@ -1656,7 +1656,7 @@ sub AddGroup {
 
 my $headernum = 1;
 
-sub AddFDef ($$$) {
+sub AddFDef {
     my ($name, $description, $mailhead) = (@_);
 
     my $sth = $dbh->prepare("SELECT fieldid FROM fielddefs " .
@@ -1750,7 +1750,7 @@ AddFDef("content", "Content", 0);
 # mkanat@bugzilla.org - bug 17453
 # Create the values for the tables that hold what used to be enum types.
 # Don't populate the tables if the table isn't empty.
-sub PopulateEnumTable ($@) {
+sub PopulateEnumTable {
     my ($table, @valuelist) = @_;
 
     # If we encounter any of the keys in this hash, they are 
index 2fb0911b2fd4c5011de370abbccd0e2c2420faff..5a001ea06ea2529607276a1c9496fc802a8dd78c 100644 (file)
@@ -52,7 +52,7 @@ else {
 # Subs
 ###############################################################################
 
-sub MakeDocs($$) {
+sub MakeDocs {
 
     my ($name, $cmdline) = @_;
 
index 5e49d8336921206b95940699b789ab54e8f6d51c..e70d256c10346009eb2b9272ae9dda6c970a67c6 100755 (executable)
@@ -38,7 +38,7 @@ my $dbh = Bugzilla->dbh;
 my $template = Bugzilla->template;
 my $vars = {};
 
-sub LoadTemplate ($) {
+sub LoadTemplate {
     my $action = shift;
 
     $action =~ /(\w+)/;
index 6f8bc99f22efad1b068ab48f2b44a6ce9a62eaf5..1f86b03a8148f77a0bd62ea5f4215b823f2c9191 100755 (executable)
@@ -49,7 +49,7 @@ my $showbugcounts = (defined $cgi->param('showbugcounts'));
 # TestComponent:  just returns if the specified product/component combination exists
 # CheckComponent: same check, optionally emit an error text
 
-sub TestProduct ($)
+sub TestProduct
 {
     my $prod = shift;
 
@@ -60,7 +60,7 @@ sub TestProduct ($)
     return FetchOneColumn();
 }
 
-sub CheckProduct ($)
+sub CheckProduct
 {
     my $prod = shift;
 
@@ -75,7 +75,7 @@ sub CheckProduct ($)
     }
 }
 
-sub TestComponent ($$)
+sub TestComponent
 {
     my ($prod, $comp) = @_;
 
@@ -89,7 +89,7 @@ sub TestComponent ($$)
     return FetchOneColumn();
 }
 
-sub CheckComponent ($$)
+sub CheckComponent
 {
     my ($prod, $comp) = @_;
 
index 57795f4933a7b7ab2fb33c5d8109ba50df4eb910..9984a8e8cad65ff7ec64f3d67d45025e5565709b 100755 (executable)
@@ -567,7 +567,7 @@ sub validateGroups {
 # added by the user and have passed all validation tests.
 # The only way to have invalid product/component combinations is to
 # hack the URL. So we silently ignore them, if any.
-sub validateAndSubmit ($) {
+sub validateAndSubmit {
     my ($id) = @_;
     my $dbh = Bugzilla->dbh;
 
index 5e74163dafd73a7d85c2089b8d310e1a60682003..eb245dfd283f0dedcdf0fe1a29b4c12890ccf2bf 100755 (executable)
@@ -51,7 +51,7 @@ UserInGroup("creategroups")
 my $action = trim($cgi->param('action') || '');
 
 # RederiveRegexp: update user_group_map with regexp-based grants
-sub RederiveRegexp ($$)
+sub RederiveRegexp
 {
     my $regexp = shift;
     my $gid = shift;
index 8ad74710e80b85da812042e6f3016d7be702513a..450d8cf5b1980bdc31de839ea233b4b97d9ea6c1 100755 (executable)
@@ -35,7 +35,7 @@ my $dbh = Bugzilla->dbh;
 use vars qw($template $vars);
 
 
-sub Validate ($$) {
+sub Validate {
     my ($name, $description) = @_;
     if ($name eq "") {
         ThrowUserError("keyword_blank_name");
index 18e845efc51763e16e9c029ef0be1784343cb488..de0459f1384eda2f432d303b09ace18cfd325795 100755 (executable)
@@ -54,7 +54,7 @@ my %ctl = (
 # TestProduct:  just returns if the specified product does exists
 # CheckProduct: same check, optionally  emit an error text
 
-sub TestProduct ($)
+sub TestProduct
 {
     my $prod = shift;
 
@@ -65,7 +65,7 @@ sub TestProduct ($)
     return FetchOneColumn();
 }
 
-sub CheckProduct ($)
+sub CheckProduct
 {
     my $prod = shift;
 
@@ -86,7 +86,7 @@ sub CheckProduct ($)
 # TestClassification:  just returns if the specified classification does exists
 # CheckClassification: same check, optionally  emit an error text
 
-sub TestClassification ($)
+sub TestClassification
 {
     my $cl = shift;
 
@@ -97,7 +97,7 @@ sub TestClassification ($)
     return FetchOneColumn();
 }
 
-sub CheckClassification ($)
+sub CheckClassification
 {
     my $cl = shift;
 
@@ -119,7 +119,7 @@ sub CheckClassification ($)
 # we need this routine, which does things properly, and will
 # eventually be the only version. (The older versions assume a
 # $template->put_header() call has been made)
-sub CheckClassificationNew ($)
+sub CheckClassificationNew
 {
     my $cl = shift;
 
@@ -135,7 +135,7 @@ sub CheckClassificationNew ($)
 }
 
 
-sub CheckClassificationProduct ($$)
+sub CheckClassificationProduct
 {
     my $cl = shift;
     my $prod = shift;
@@ -162,7 +162,7 @@ sub CheckClassificationProduct ($$)
     }
 }
 
-sub CheckClassificationProductNew ($$)
+sub CheckClassificationProductNew
 {
     my ($cl, $prod) = @_;
     my $dbh = Bugzilla->dbh;
@@ -190,7 +190,7 @@ sub CheckClassificationProductNew ($$)
 # Displays the form to edit a products parameters
 #
 
-sub EmitFormElements ($$$$$$$$$)
+sub EmitFormElements
 {
     my ($classification, $product, $description, $milestoneurl, $disallownew,
         $votesperuser, $maxvotesperbug, $votestoconfirm, $defaultmilestone)
@@ -251,7 +251,7 @@ sub EmitFormElements ($$$$$$$$$)
 # Displays a text like "a.", "a or b.", "a, b or c.", "a, b, c or d."
 #
 
-sub PutTrailer (@)
+sub PutTrailer
 {
     my (@links) = ("Back to the <A HREF=\"query.cgi\">query page</A>", @_);
 
index cd73daeab2b5c8b5ea781bdfa14fab2f4c51e8cc..897498db3ffa8c9f6f37f60f214655b964f18852 100755 (executable)
@@ -39,14 +39,14 @@ our @valid_fields = ('op_sys', 'rep_platform', 'priority', 'bug_severity',);
 ######################################################################
 
 # Returns whether or not the specified table exists in the @tables array.
-sub FieldExists ($) {
+sub FieldExists {
   my ($field) = @_;
 
   return lsearch(\@valid_fields, $field) >= 0;
 }
 
 # Same as FieldExists, but emits and error and dies if it fails.
-sub FieldMustExist ($) {
+sub FieldMustExist {
     my ($field)= @_;
 
     $field ||
@@ -58,7 +58,7 @@ sub FieldMustExist ($) {
 }
 
 # Returns if the specified value exists for the field specified.
-sub ValueExists ($$) {
+sub ValueExists {
     my ($field, $value) = @_;
     FieldMustExist($field);
     trick_taint($field);
@@ -75,7 +75,7 @@ sub ValueExists ($$) {
 }
 
 # Same check as ValueExists, emits an error text and dies if it fails.
-sub ValueMustExist ($$) {
+sub ValueMustExist {
     my ($field, $value)= @_;
 
     # Values may not be empty (it's very difficult to deal 
index 9a3db0a8f1f7b57f23b63807fecc1021599723b3..e4daf38d5ee86a2cfa4339a7babc601dd5555268 100755 (executable)
@@ -210,7 +210,7 @@ check_form_field_defined($cgi, 'component');
 # function and tests, if the comment was given.
 # If comments are required for functions is defined by params.
 #
-sub CheckonComment( $ ) {
+sub CheckonComment {
     my ($function) = (@_);
     
     # Param is 1 if comment should be added !
index 00a7ef0c5352cc7d6f9a56482f4513ceed03c91a..7855862d897e0c94b6cf4a9ae5f4e3a30fd286d1 100755 (executable)
@@ -727,7 +727,7 @@ if (defined $cgi->param('rebuildkeywordcache')) {
 # General bug checks
 ###########################################################################
 
-sub BugCheck ($$;$$) {
+sub BugCheck {
     my ($middlesql, $errortext, $repairparam, $repairtext) = @_;
     
     SendSQL("SELECT DISTINCT bugs.bug_id " .
index 42ef255d34af9b84b31de182d7b0993489289af3..ae04e7a72a1c4ca51eaf695ebb6b99fa4bc76dfa 100755 (executable)
@@ -337,7 +337,7 @@ sub DoPermissions {
 # No SavePermissions() because this panel has no changeable fields.
 
 
-sub DoSavedSearches() {
+sub DoSavedSearches {
     # 2004-12-13 - colin.ogilvie@gmail.com, bug 274397
     # Need to work around the possibly missing query_format=advanced
     $vars->{'user'} = Bugzilla->user;
@@ -362,7 +362,7 @@ sub DoSavedSearches() {
     $vars->{'queries'} = \@newqueries;
 }
 
-sub SaveSavedSearches() {
+sub SaveSavedSearches {
     my $cgi = Bugzilla->cgi;
     my $dbh = Bugzilla->dbh;
     my @queries = @{Bugzilla->user->queries};