Author: nick Date: 2006-08-10 18:05:11 +0100 (Thu, 10 Aug 2006) New Revision: 836
Modified: trunk/Changes trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/Config.pm trunk/templates/moderate_confirm.tt Log: Allow the option of moderating nodes without the password
Modified: trunk/Changes =================================================================== --- trunk/Changes 2006-08-10 16:55:37 UTC (rev 835) +++ trunk/Changes 2006-08-10 17:05:11 UTC (rev 836) @@ -3,6 +3,7 @@ Lots more Atom and RSS feeds, including for searching Admin interface Nodes missing metadata interface + Moderation support (based on Wiki::Toolkit moderation)
0.56 14 June 2006 Fix bug introduced in feed formatting where Atom feeds would be
Modified: trunk/lib/OpenGuides/Config.pm =================================================================== --- trunk/lib/OpenGuides/Config.pm 2006-08-10 16:55:37 UTC (rev 835) +++ trunk/lib/OpenGuides/Config.pm 2006-08-10 17:05:11 UTC (rev 836) @@ -12,7 +12,7 @@ formatting_rules_node formatting_rules_link backlinks_in_title template_path custom_template_path geo_handler ellipsoid gmaps_api_key centre_long centre_lat default_gmaps_zoom default_gmaps_search_zoom force_wgs84 - licence_name licence_url licence_info_url + licence_name licence_url licence_info_url moderation_requires_password ); my @questions = map { $_ . "__qu" } @variables; OpenGuides::Config->mk_accessors( @variables );
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-08-10 16:55:37 UTC (rev 835) +++ trunk/lib/OpenGuides.pm 2006-08-10 17:05:11 UTC (rev 836) @@ -1272,6 +1272,9 @@ );
my $password = $args{password}; + unless($self->config->moderation_requires_password) { + $password = $self->config->admin_pass; + }
if ($password) { if ($password ne $self->config->admin_pass) {
Modified: trunk/templates/moderate_confirm.tt =================================================================== --- trunk/templates/moderate_confirm.tt 2006-08-10 16:55:37 UTC (rev 835) +++ trunk/templates/moderate_confirm.tt 2006-08-10 17:05:11 UTC (rev 836) @@ -12,12 +12,10 @@ <p> [% IF moderation_action == 'set_moderation' %] You are about to change the moderation flag on - <span class="node_name">[% node_name %]</span>. [% ELSE %] You are about to moderate a version of - <span class="node_name">[% node_name %]</span>. - completely erase this page and all its history. [% END %] +<span class="node_name">[% node_name %]</span>. To do so, please enter the admin password. If not, you can <a href="[% cgi_url %]?action=admin">go back to the admin page</a>. </p>