| | 85 | } elsif ( $action eq 'admin' ) { |
| | 86 | $guide->display_admin_interface(); |
| | 87 | } elsif ( $action eq 'set_moderation' ) { |
| | 88 | $guide->set_node_moderation( |
| | 89 | id => $node, |
| | 90 | password => $q->param("password") || "", |
| | 91 | moderation_flag => $q->param("moderation_flat") || "", |
| | 92 | ); |
| | 93 | } elsif ( $action eq 'moderate' ) { |
| | 94 | $guide->moderate_node( |
| | 95 | id => $node, |
| | 96 | version => $q->param("version") || "", |
| | 97 | password => $q->param("password") || "", |
| | 98 | ); |
| | 385 | sub show_needing_moderation { |
| | 386 | my @nodes = $wiki->list_unmoderated_nodes; |
| | 387 | |
| | 388 | # Build the moderate link |
| | 389 | foreach my $node (@nodes) { |
| | 390 | my $node_param = |
| | 391 | uri_escape($formatter->node_name_to_node_param($node->{'name'})); |
| | 392 | $node->{'moderate_url'} = $script_url . "?action=moderate&id=".$node_param."&version=".$node->{'version'}; |
| | 393 | $node->{'diff_url'} = $script_url . "?id=".$node_param."&version=".$node->{'moderated_version'}."&diffversion=".$node->{'version'}; |
| | 394 | } |
| | 395 | |
| | 396 | process_template( "needing_moderation.tt", |
| | 397 | "", |
| | 398 | { not_editable => 1, |
| | 399 | not_deletable => 1, |
| | 400 | deter_robots => 1, |
| | 401 | nodes => \@nodes } ); |
| | 402 | } |