Changeset 1069


Ignore:
Timestamp:
Jun 11, 2007, 11:26:47 PM (14 years ago)
Author:
Dominic Hargreaves
Message:

Undo incomplete change from previous commit; sorry for the noise

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r1068 r1069  
    13361336    $new_metadata{host} = $ENV{REMOTE_ADDR};
    13371337
    1338     # General validation
    1339     eval { OpenGuides::Utils->validate_edit(
    1340         content  => $content,
    1341         metadata => \%new_metadata
    1342     ) };
    1343 
    1344     if ( $@ ) {
    1345         my $output = OpenGuides::Template->output(
    1346             wiki     => $self->wiki,
    1347             config   => $config,
    1348             template => "validate_edit_failed.tt",
    1349             vars => {
    1350                 message => $@
    1351             }
    1352         );
    1353         return $output if $return_output;
    1354         print $output;
    1355         return;
    1356     }
    1357 
    13581338    # Wiki::Toolkit::Plugin::RSS::ModWiki wants "major_change" to be set.
    13591339    $new_metadata{major_change} = ( $new_metadata{edit_type} eq "Normal edit" )
  • trunk/lib/OpenGuides/Utils.pm

    r1068 r1069  
    356356}
    357357
    358 =item B<validate_edit>
    359 
    360     eval { OpenGuides::Utils->validate_edit(
    361         id       => $node,
    362         content  => $content
    363         metadata => \%new_metadata
    364     ) };
    365 
    366 Checks supplied content for general validity. If anything is invalid,
    367 dies with an error string suitable for reporting to the user.
    368 
    369 =cut
    370 
    371 sub validate_edit {
    372     my ( $self, %args ) = @_;
    373     die "Content missing\n" unless $args{content};
    374     die "Metadata missing\n" unless $args{metadata};
    375 
    376 };
    377 
    378358=back
    379359
Note: See TracChangeset for help on using the changeset viewer.