Bug 129677 - Add code to catch this bug and mail about it to us

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@1770 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
akrasilnikov 2013-08-21 09:14:18 +00:00
parent d3f3c4b36d
commit 2f65ce271a
1 changed files with 29 additions and 0 deletions

View File

@ -151,6 +151,35 @@ if (Bugzilla->session && ($sd = Bugzilla->session_data) && $sd->{sent})
$vars->{last_title} = $sd->{title};
$vars->{last_header} = $sd->{header};
$vars->{sentmail} = $sd->{sent};
# TODO - Remove it after catch bug
# Bug 129677 - trying to catch the bug
if ($sd->{sent})
{
foreach($sd->{sent})
{
if (!$user->can_see_bug($_->{bug_id})) {
my $datadir = bz_locations()->{'datadir'};
if (-w "$datadir/errorlog") {
use Data::Dumper;
my $warning_log = new IO::File(">>$datadir/errorlog");
print $warning_log "Bug 129677 : dump sent session - ".Dumper($sd->{sent});
$warning_log->close();
}
my $msg = "Bug 129677 : dump sent session - ".Dumper($sd->{sent});
my $t =
"From: ".Bugzilla->params->{mailfrom}."\n".
"To: ".Bugzilla->params->{maintainer}."\n".
"Subject: Bug 129677 - error \n".
"X-Bugzilla-Type: codeerror\n\n".
$msg;
MessageToMTA($t, 1);
}
}
}
# Bug 129677 - End part
# TODO - Remove it after catch bug END
$vars->{failed_checkers} = Checkers::unfreeze_failed_checkers($sd->{failed_checkers});
if ($sd->{message})
{