Author: dom Date: 2007-06-11 23:26:47 +0100 (Mon, 11 Jun 2007) New Revision: 1069
Modified: trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/Utils.pm Log: Undo incomplete change from previous commit; sorry for the noise
Modified: trunk/lib/OpenGuides/Utils.pm =================================================================== --- trunk/lib/OpenGuides/Utils.pm 2007-06-11 20:37:06 UTC (rev 1068) +++ trunk/lib/OpenGuides/Utils.pm 2007-06-11 22:26:47 UTC (rev 1069) @@ -355,26 +355,6 @@ } }
-=item B<validate_edit> - - eval { OpenGuides::Utils->validate_edit( - id => $node, - content => $content - metadata => %new_metadata - ) }; - -Checks supplied content for general validity. If anything is invalid, -dies with an error string suitable for reporting to the user. - -=cut - -sub validate_edit { - my ( $self, %args ) = @_; - die "Content missing\n" unless $args{content}; - die "Metadata missing\n" unless $args{metadata}; - -}; - =back
=head1 AUTHOR
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2007-06-11 20:37:06 UTC (rev 1068) +++ trunk/lib/OpenGuides.pm 2007-06-11 22:26:47 UTC (rev 1069) @@ -1335,26 +1335,6 @@ } $new_metadata{host} = $ENV{REMOTE_ADDR};
- # General validation - eval { OpenGuides::Utils->validate_edit( - content => $content, - metadata => %new_metadata - ) }; - - if ( $@ ) { - my $output = OpenGuides::Template->output( - wiki => $self->wiki, - config => $config, - template => "validate_edit_failed.tt", - vars => { - message => $@ - } - ); - return $output if $return_output; - print $output; - return; - } - # Wiki::Toolkit::Plugin::RSS::ModWiki wants "major_change" to be set. $new_metadata{major_change} = ( $new_metadata{edit_type} eq "Normal edit" ) ? 1