[Rt-commit] r17729 - in rt/3.999/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue Jan 13 06:30:09 EST 2009


Author: sunnavy
Date: Tue Jan 13 06:30:07 2009
New Revision: 17729

Modified:
   rt/3.999/trunk/   (props changed)
   rt/3.999/trunk/lib/RT/Record.pm

Log:
 r18752 at sunnavys-mb:  sunnavy | 2009-01-13 15:52:44 +0800
 more clean


Modified: rt/3.999/trunk/lib/RT/Record.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Record.pm	(original)
+++ rt/3.999/trunk/lib/RT/Record.pm	Tue Jan 13 06:30:07 2009
@@ -268,25 +268,6 @@
         }
     }
 
-    $attribs{'creator'} ||= $self->current_user->id
-        if $self->can('creator') && $self->current_user;
-    $attribs{'last_update_by'} ||= $self->current_user->id
-        if $self->can('last_update_by') && $self->current_user;
-
-# XXX TODO by sunnavy:
-# I found we didn't have created and last_updated here weirdly.
-# maybe one may wish to use the defer schema to give them default
-# values? well, because we have some 'created' columns in different tables, 
-# maybe putting it here is the best practice.
-    my $now = RT::Date->new( current_user => $self->current_user );
-    $now->set( format => 'unix', value => time );
-
-    $attribs{'created'} ||= $now->iso
-      if $self->can( 'created' ) && $self->current_user;
-    $attribs{'last_updated'} ||= $now->iso
-      if $self->can( 'last_updated' ) && $self->current_user;
-
-
     my ($id) = $self->SUPER::create(%attribs);
     if ( UNIVERSAL::isa( $id, 'Class::ReturnValue' ) ) {
         if ( $id->errno ) {


More information about the Rt-commit mailing list