Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
0b6e8545
Commit
0b6e8545
authored
Jul 19, 2005
by
mkanat%kerio.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 282632: Eliminate AUTOLOAD section from BugMail.pm
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=wicked, a=justdave
parent
0338ce8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
28 deletions
+20
-28
BugMail.pm
Bugzilla/BugMail.pm
+20
-28
No files found.
Bugzilla/BugMail.pm
View file @
0b6e8545
...
...
@@ -36,10 +36,15 @@ use base qw(Exporter);
PerformSubsts
)
;
use
Bugzilla
;
use
Bugzilla::
DB
qw(:deprecated)
;
use
Bugzilla::
User
;
use
Bugzilla::
Constants
;
use
Bugzilla::
Config
qw(:DEFAULT $datadir)
;
use
Bugzilla::
Util
;
use
Date::
Parse
;
use
Date::
Format
;
use
Mail::
Mailer
;
use
Mail::
Header
;
...
...
@@ -63,20 +68,6 @@ if ($2) {
$sitespec
=
"-$2$sitespec"
;
# Put the port number back in, before the '@'
}
# I got sick of adding &:: to everything.
# However, 'Yuck!'
# I can't require, cause that pulls it in only once, so it won't then be
# in the global package, and these aren't modules, so I can't use globals.pl
# Remove this evilness once our stuff uses real packages.
sub
AUTOLOAD
{
no
strict
'refs'
;
use
vars
qw($AUTOLOAD)
;
my
$subName
=
$AUTOLOAD
;
$subName
=~
s/.*::/::/
;
# remove package name
*
$AUTOLOAD
=
\&
$subName
;
goto
&
$AUTOLOAD
;
}
# This is run when we load the package
if
(
open
(
NOMAIL
,
'<'
,
"$datadir/nomail"
))
{
while
(
<
NOMAIL
>
)
{
...
...
@@ -121,7 +112,7 @@ sub Send($;$) {
# This only works in a sub. Probably something to do with the
# require abuse we do.
GetVersionTable
();
&::
GetVersionTable
();
return
ProcessOneBug
(
$id
,
$forced
);
}
...
...
@@ -152,8 +143,8 @@ sub ProcessOneBug($$) {
foreach
my
$i
(
@::log_columns
)
{
$values
{
$i
}
=
shift
(
@row
);
}
$values
{
product
}
=
get_product_name
(
$values
{
product_id
});
$values
{
component
}
=
get_component_name
(
$values
{
component_id
});
$values
{
product
}
=
&::
get_product_name
(
$values
{
product_id
});
$values
{
component
}
=
&::
get_component_name
(
$values
{
component_id
});
my
(
$start
,
$end
)
=
(
@row
);
...
...
@@ -170,24 +161,24 @@ sub ProcessOneBug($$) {
# At this point, we don't care if there are duplicates in these arrays.
my
$changer
=
$forced
->
{
'changer'
};
if
(
$forced
->
{
'owner'
})
{
push
(
@assignees
,
DBNameToIdAndCheck
(
$forced
->
{
'owner'
}));
push
(
@assignees
,
&::
DBNameToIdAndCheck
(
$forced
->
{
'owner'
}));
}
if
(
$forced
->
{
'qacontact'
})
{
push
(
@qa_contacts
,
DBNameToIdAndCheck
(
$forced
->
{
'qacontact'
}));
push
(
@qa_contacts
,
&::
DBNameToIdAndCheck
(
$forced
->
{
'qacontact'
}));
}
if
(
$forced
->
{
'cc'
})
{
foreach
my
$cc
(
@
{
$forced
->
{
'cc'
}})
{
push
(
@ccs
,
DBNameToIdAndCheck
(
$cc
));
push
(
@ccs
,
&::
DBNameToIdAndCheck
(
$cc
));
}
}
# Convert to names, for later display
$values
{
'assigned_to'
}
=
DBID_to_name
(
$values
{
'assigned_to'
});
$values
{
'reporter'
}
=
DBID_to_name
(
$values
{
'reporter'
});
$values
{
'assigned_to'
}
=
&::
DBID_to_name
(
$values
{
'assigned_to'
});
$values
{
'reporter'
}
=
&::
DBID_to_name
(
$values
{
'reporter'
});
if
(
$values
{
'qa_contact'
})
{
$values
{
'qa_contact'
}
=
DBID_to_name
(
$values
{
'qa_contact'
});
$values
{
'qa_contact'
}
=
&::
DBID_to_name
(
$values
{
'qa_contact'
});
}
$values
{
'estimated_time'
}
=
format_time_decimal
(
$values
{
'estimated_time'
});
...
...
@@ -299,7 +290,7 @@ sub ProcessOneBug($$) {
$interestingchange
=
0
;
}
$thisdiff
.=
FormatTriple
(
$fielddescription
{
$what
},
$old
,
$new
);
if
(
$what
eq
'bug_status'
&&
IsOpenedState
(
$old
)
ne
IsOpenedState
(
$new
))
{
if
(
$what
eq
'bug_status'
&&
&::
IsOpenedState
(
$old
)
ne
&::
IsOpenedState
(
$new
))
{
$interestingchange
=
1
;
}
...
...
@@ -319,7 +310,7 @@ sub ProcessOneBug($$) {
}
my
(
$newcomments
,
$anyprivate
)
=
GetLongDescriptionAsText
(
$id
,
$start
,
$end
);
my
(
$newcomments
,
$anyprivate
)
=
&::
GetLongDescriptionAsText
(
$id
,
$start
,
$end
);
###########################################################################
# Start of email filtering code
...
...
@@ -364,14 +355,15 @@ sub ProcessOneBug($$) {
# remove your vote.
if
(
$what
eq
"CC"
)
{
foreach
my
$cc_user
(
split
(
/[\s,]+/
,
$old
))
{
push
(
@
{
$recipients
{
DBNameToIdAndCheck
(
$cc_user
)}},
REL_CC
);
push
(
@
{
$recipients
{
&::
DBNameToIdAndCheck
(
$cc_user
)}},
REL_CC
);
}
}
elsif
(
$what
eq
"QAContact"
)
{
push
(
@
{
$recipients
{
DBNameToIdAndCheck
(
$old
)}},
REL_QA
);
push
(
@
{
$recipients
{
&::
DBNameToIdAndCheck
(
$old
)}},
REL_QA
);
}
elsif
(
$what
eq
"AssignedTo"
)
{
push
(
@
{
$recipients
{
DBNameToIdAndCheck
(
$old
)}},
REL_ASSIGNEE
);
push
(
@
{
$recipients
{
&::
DBNameToIdAndCheck
(
$old
)}},
REL_ASSIGNEE
);
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment