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
7c95655a
Commit
7c95655a
authored
Feb 01, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 279700 : Move GetComments from globals.pl into Bugzilla::Bug
Patch by Max Kanat-Alexander <mkanat@kerio.com> r=vladd a=justdave
parent
6cf9cae9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
31 deletions
+34
-31
Bug.pm
Bugzilla/Bug.pm
+33
-1
globals.pl
globals.pl
+0
-29
process_bug.cgi
process_bug.cgi
+1
-1
No files found.
Bugzilla/Bug.pm
View file @
7c95655a
...
...
@@ -308,7 +308,7 @@ sub longdescs {
return
$self
->
{
'longdescs'
}
if
exists
$self
->
{
'longdescs'
};
$self
->
{
'longdescs'
}
=
&::
GetComments
(
$self
->
{
bug_id
});
$self
->
{
'longdescs'
}
=
GetComments
(
$self
->
{
bug_id
});
return
$self
->
{
'longdescs'
};
}
...
...
@@ -504,6 +504,38 @@ sub ValidateTime {
}
}
sub
GetComments
{
my
(
$id
)
=
(
@_
);
my
$dbh
=
Bugzilla
->
dbh
;
my
@comments
;
my
$sth
=
$dbh
->
prepare
(
"SELECT profiles.realname AS name, profiles.login_name AS email,
date_format(longdescs.bug_when,'%Y.%m.%d %H:%i') AS time,
longdescs.thetext AS body, longdescs.work_time,
isprivate,
date_format(longdescs.bug_when,'%Y%m%d%H%i%s')
FROM longdescs, profiles
WHERE profiles.userid = longdescs.who
AND longdescs.bug_id = ?
ORDER BY longdescs.bug_when"
);
$sth
->
execute
(
$id
);
while
(
my
$comment_ref
=
$sth
->
fetchrow_hashref
())
{
my
%
comment
=
%
$comment_ref
;
# Can't use "when" as a field name in MySQL
$comment
{
'when'
}
=
$comment
{
'bug_when'
};
delete
(
$comment
{
'bug_when'
});
$comment
{
'email'
}
.=
Param
(
'emailsuffix'
);
$comment
{
'name'
}
=
$comment
{
'name'
}
||
$comment
{
'email'
};
push
(
@comments
,
\%
comment
);
}
return
\
@comments
;
}
sub
AUTOLOAD
{
use
vars
qw($AUTOLOAD)
;
my
$attr
=
$AUTOLOAD
;
...
...
globals.pl
View file @
7c95655a
...
...
@@ -1147,35 +1147,6 @@ sub GetLongDescriptionAsText {
return
(
$result
,
$anyprivate
);
}
sub
GetComments
{
my
(
$id
)
=
(
@_
);
my
@comments
;
SendSQL
(
"SELECT profiles.realname, profiles.login_name,
date_format(longdescs.bug_when,'%Y.%m.%d %H:%i'),
longdescs.thetext, longdescs.work_time,
isprivate,
date_format(longdescs.bug_when,'%Y%m%d%H%i%s')
FROM longdescs, profiles
WHERE profiles.userid = longdescs.who
AND longdescs.bug_id = $id
ORDER BY longdescs.bug_when"
);
while
(
MoreSQLData
())
{
my
%
comment
;
(
$comment
{
'name'
},
$comment
{
'email'
},
$comment
{
'time'
},
$comment
{
'body'
},
$comment
{
'work_time'
},
$comment
{
'isprivate'
},
$comment
{
'when'
})
=
FetchSQLData
();
$comment
{
'email'
}
.=
Param
(
'emailsuffix'
);
$comment
{
'name'
}
=
$comment
{
'name'
}
||
$comment
{
'email'
};
push
(
@comments
,
\%
comment
);
}
return
\
@comments
;
}
# Fills in a hashtable with info about the columns for the given table in the
# database. The hashtable has the following entries:
# -list- the list of column names
...
...
process_bug.cgi
View file @
7c95655a
...
...
@@ -1263,7 +1263,7 @@ foreach my $id (@idlist) {
(
$vars
->
{
'operations'
})
=
GetBugActivity
(
$::FORM
{
'id'
},
$::FORM
{
'delta_ts'
});
$vars
->
{
'start_at'
}
=
$::FORM
{
'longdesclength'
};
$vars
->
{
'comments'
}
=
GetComments
(
$id
);
$vars
->
{
'comments'
}
=
Bugzilla::Bug::
GetComments
(
$id
);
$::FORM
{
'delta_ts'
}
=
$delta_ts
;
$vars
->
{
'form'
}
=
\%::
FORM
;
...
...
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