[Jifty-commit] r2812 - in wifty/trunk: lib/Wifty/Model
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Feb 21 17:32:19 EST 2007
Author: falcone
Date: Wed Feb 21 17:32:18 2007
New Revision: 2812
Modified:
wifty/trunk/ (props changed)
wifty/trunk/lib/Wifty/Model/Page.pm
Log:
r16834 at ketch: falcone | 2007-02-21 17:31:05 -0500
* if the set_content fails, don't create a transaction
Modified: wifty/trunk/lib/Wifty/Model/Page.pm
==============================================================================
--- wifty/trunk/lib/Wifty/Model/Page.pm (original)
+++ wifty/trunk/lib/Wifty/Model/Page.pm Wed Feb 21 17:32:18 2007
@@ -76,9 +76,12 @@
my $self = shift;
my $content = shift;
my ( $val, $msg ) = $self->_set(column => 'content', value => $content);
- $self->_add_revision( content => $content,
- updated_by =>( $self->current_user? $self->current_user->user_object : undef )
- );
+
+ if ($val) {
+ $self->_add_revision( content => $content,
+ updated_by =>( $self->current_user? $self->current_user->user_object : undef )
+ );
+ }
return ( $val, $msg );
}
More information about the Jifty-commit
mailing list