Added a test to see if clone would duplicate the session. It does.
Subclassed DateTime's from_object method, which was secretely deleting the internal session variable. There is probably a more robust way to do this, such as by "...implementing the utc_rd_values() method as the from_object docs suggest. Finished fixing the bug with time zone errors in editing an event.
This commit is contained in:
parent
17fac4a7cb
commit
2180b9bf91
4 changed files with 27 additions and 11 deletions
|
|
@ -205,6 +205,23 @@ sub cloneToUserTimeZone {
|
|||
|
||||
#######################################################################
|
||||
|
||||
=head2 from_object
|
||||
|
||||
Handle copying all WebGUI::DateTime specific data. This is a class method.
|
||||
|
||||
=cut
|
||||
|
||||
sub from_object {
|
||||
my $class = shift;
|
||||
my %args = @_;
|
||||
my $session = $args{object}->session;
|
||||
my $copy = $class->SUPER::from_object(@_);
|
||||
$copy->session($session);
|
||||
return $copy;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
|
||||
=head2 toDatabase
|
||||
|
||||
Returns a MySQL Date/Time string in the UTC time zone
|
||||
|
|
@ -398,7 +415,7 @@ This is going to have to be changed eventually so you don't have to set the sess
|
|||
=cut
|
||||
|
||||
sub session {
|
||||
my $self = shift;
|
||||
my $self = shift;
|
||||
my $session = shift;
|
||||
|
||||
if($session) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue