[vhffs-dev] [1820] Directory layout for moderation.

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1820
Author:   beuss
Date:     2011-05-26 14:21:32 +0200 (Thu, 26 May 2011)
Log Message:
-----------
Directory layout for moderation.

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
    trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
    trunk/vhffs-panel/Makefile.am
    trunk/vhffs-panel/templates/admin/main/general-modo.tmpl
    trunk/vhffs-panel/templates/admin/main/general.tmpl
    trunk/vhffs-panel/templates/admin/misc/mailings_part.tmpl
    trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
    trunk/vhffs-panel/templates/menu/moderator.tt

Added Paths:
-----------
    trunk/vhffs-panel/admin/moderation/
    trunk/vhffs-panel/admin/moderation/index.pl
    trunk/vhffs-panel/admin/moderation/submit.pl

Removed Paths:
-------------
    trunk/vhffs-panel/admin/moderation.pl
    trunk/vhffs-panel/admin/moderation_submit.pl

Modified: trunk/vhffs-api/src/Vhffs/Panel/Admin.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Admin.pm	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-api/src/Vhffs/Panel/Admin.pm	2011-05-26 12:21:32 UTC (rev 1820)
@@ -84,7 +84,7 @@
 sub get_modo_category {
     my $items = [
         { link => '/admin/stats.pl',            label => gettext( 'Get Statistics' ) },
-        { link => '/admin/moderation.pl',       label => gettext( 'Moderation' ) }
+        { link => '/admin/moderation/index.pl', label => gettext( 'Moderation' ) }
     ];
     return { name => gettext( 'General' ),   items => $items, type => 'general' };
 }
@@ -102,7 +102,7 @@
     my $items = [
         { link => '/admin/stats.pl',            label => gettext( 'Get Statistics' ) },
         { link => '/admin/su.pl',               label => gettext( 'Change user-id' ) },
-        { link => '/admin/moderation.pl',       label => gettext( 'Moderation' ) },
+        { link => '/admin/moderation/index.pl', label => gettext( 'Moderation' ) },
         { link => '/admin/object/list.pl',      label => gettext( 'List all objects' ) },
         { link => '/admin/object/search.pl',    label => gettext( 'Search for an object' ) },
         { link => '/admin/broadcast/create.pl', label => gettext( 'Mail to all hosted people' ) },

Modified: trunk/vhffs-api/src/Vhffs/Panel/Menu.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-api/src/Vhffs/Panel/Menu.pm	2011-05-26 12:21:32 UTC (rev 1820)
@@ -95,7 +95,7 @@
 
     my $items = [];
     push @$items, {path => 'admin/stats.pl', label => gettext('Get Statistics') };
-    push @$items, {path => 'admin/moderation.pl', label => gettext('Moderation') };
+    push @$items, {path => 'admin/moderation/index.pl', label => gettext('Moderation') };
     $context_tmpl->param( MENU_ITEMS => $items );
     return $context_tmpl->output();
 }

Modified: trunk/vhffs-panel/Makefile.am
===================================================================
--- trunk/vhffs-panel/Makefile.am	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/Makefile.am	2011-05-26 12:21:32 UTC (rev 1820)
@@ -866,8 +866,8 @@
 	admin/broadcast/list.pl \
 	admin/broadcast/view.pl \
 	admin/broadcast/create.pl \
-	admin/moderation_submit.pl \
-	admin/moderation.pl \
+	admin/moderation/submit.pl \
+	admin/moderation/index.pl \
 	admin/stats.pl \
 	admin/su.pl \
 	cvs/create.pl \

Copied: trunk/vhffs-panel/admin/moderation/index.pl (from rev 1819, trunk/vhffs-panel/admin/moderation.pl)
===================================================================
--- trunk/vhffs-panel/admin/moderation/index.pl	                        (rev 0)
+++ trunk/vhffs-panel/admin/moderation/index.pl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -0,0 +1,125 @@
+#!%PERL% -w
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
+# modification, are permitted provided that the following conditions 
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright 
+#   notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in 
+#   the documentation and/or other materials provided with the 
+#   distribution.
+#3. Neither the name of vhffs nor the names of its contributors 
+#   may be used to endorse or promote products derived from this 
+#   software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use utf8;
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+use strict;
+
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Main;
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Menu;
+use Vhffs::Constants;
+use Vhffs::Object;
+use Vhffs::ObjectFactory;
+
+my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
+my $vhffs = $panel->{'vhffs'};
+my $maintemplate = $panel->{'template'};
+my $user = $panel->{'user'};
+my $cgi = $panel->{'cgi'};
+my $servername = $cgi->param("name");
+my $templatesdir = $vhffs->get_config->get_templatedir;
+
+my $template;
+
+#Use is not allowed to see this page, only MODERATOR and ADMIN
+unless( $user->is_moderator || $user->is_admin )
+{
+	$template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
+	$template->param( MESSAGE => gettext('You\'re not allowed to do this (ACL rights)') );
+}
+else
+{
+	$panel->set_title( gettext('Moderation') );	
+
+	my $objects = Vhffs::Object::getall( $vhffs, undef, Vhffs::Constants::WAITING_FOR_VALIDATION );
+	unless( defined $objects )  {
+		$template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
+		$template->param( MESSAGE => gettext('There is nothing to moderate') );
+	}
+	else  {
+
+		$template = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation.tmpl' );
+		$template->param( HEADER_TYPE => gettext('Type') );
+		$template->param( HEADER_NAME => gettext('Name') );
+		$template->param( HEADER_USER => gettext('User') );
+		$template->param( HEADER_GROUP => gettext('Group') );
+		$template->param( HEADER_DESCRIPTION => gettext('Description') );
+		$template->param( HEADER_ACCEPT => gettext('Accept') );
+		$template->param( HEADER_REFUSE => gettext('Refuse') );
+
+		my $output = '';
+
+		foreach ( @{$objects} ) {
+
+			my $subtemplate = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation_part.tmpl' );
+
+			my $user = $_->get_user;
+			my $group = $_->get_group;
+
+			my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $_->{object_id} );
+			$subtemplate->param( TYPE => Vhffs::Functions::type_string_from_type_id( $_->{type} ) );
+			$subtemplate->param( NAME => $object->get_label );
+
+			$subtemplate->param( OWNER	=> $user->get_username);
+
+			if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
+			{
+				$subtemplate->param( NOTE	=> $user->get_note );
+			}
+
+			$subtemplate->param( GROUP		=> $group->get_groupname );
+
+			$subtemplate->param( OID		=> $_->get_oid );
+			$subtemplate->param( DESCRIPTION	=> $_->get_description );
+			$subtemplate->param( ACCEPT		=> gettext('Accept') );
+			$subtemplate->param( REFUSE		=> gettext('Refuse') );
+			$output .= $subtemplate->output;
+		}
+
+		$template->param( MODERATION => $output );
+	}
+}
+
+$panel->build( $template );
+$panel->display;

Copied: trunk/vhffs-panel/admin/moderation/submit.pl (from rev 1819, trunk/vhffs-panel/admin/moderation_submit.pl)
===================================================================
--- trunk/vhffs-panel/admin/moderation/submit.pl	                        (rev 0)
+++ trunk/vhffs-panel/admin/moderation/submit.pl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -0,0 +1,105 @@
+#!%PERL% -w 
+# Copyright (c) vhffs project and its contributors
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
+# modification, are permitted provided that the following conditions 
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright 
+#   notice, this list of conditions and the following disclaimer.
+#2. Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in 
+#   the documentation and/or other materials provided with the 
+#   distribution.
+#3. Neither the name of vhffs nor the names of its contributors 
+#   may be used to endorse or promote products derived from this 
+#   software without specific prior written permission.
+#
+#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
+#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+use utf8;
+use POSIX qw(locale_h);
+use HTML::Template;
+use locale;
+use Locale::gettext;
+use CGI;
+use CGI::Session;
+use strict;
+use Encode;
+
+use lib '%VHFFS_LIB_DIR%';
+use Vhffs::Panel::Main;
+use Vhffs::Panel::Menu;
+use Vhffs::Object;
+use Vhffs::ObjectFactory;
+
+my $panel = new Vhffs::Panel::Main();
+exit 0 unless $panel;
+my $session = $panel->get_session;
+exit 0 unless $session;
+
+my $cgi          = $panel->{'cgi'};
+my $vhffs        = $panel->{'vhffs'};
+my $user         = $panel->{'user'};
+my $templatedir  = $panel->{'templatedir'};
+
+my $accept       = $cgi->param('ACCEPT');
+my $reason       = Encode::decode_utf8( $cgi->param('reason') );
+
+my $template     = new HTML::Template( filename => $templatedir.'/panel/admin/misc/moderation_applied.tmpl' );
+
+#Use is not allowed to see this page, only MODERATOR and ADMIN
+unless( $user->is_moderator || $user->is_admin )
+{
+	my $message = gettext('You\'re not allowed to do this (ACL rights)');
+	$template->param( MESSAGE => $message );
+}
+else
+{
+	my $oid = $cgi->param('OID');
+	my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $oid );
+
+	if( ( ! defined $oid ) || ( ! defined $object ) || ( ! defined $accept ) )
+	{
+		$template->param( MESSAGE  => gettext("CGI Error !") );
+	}
+	else
+	{
+		my $ok;
+
+		if( $accept == 1 )
+		{
+			$ok = $object->moderate_accept;
+		}
+		else
+		{
+			$ok = $object->moderate_refuse( $reason );
+		}
+		
+		if( $ok < 0 )
+		{
+			$template->param( MESSAGE  => gettext("Cannot apply modifications") );
+		}
+		else
+		{
+			$template->param( MESSAGE  => gettext("Modifications applied successfully") );
+		}
+	}
+}
+
+$panel->set_refresh_url( '/admin/moderation.pl' );
+$panel->build( $template );
+$panel->display;

Deleted: trunk/vhffs-panel/admin/moderation.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation.pl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/admin/moderation.pl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -1,125 +0,0 @@
-#!%PERL% -w
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without 
-# modification, are permitted provided that the following conditions 
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright 
-#   notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in 
-#   the documentation and/or other materials provided with the 
-#   distribution.
-#3. Neither the name of vhffs nor the names of its contributors 
-#   may be used to endorse or promote products derived from this 
-#   software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::Main;
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Constants;
-use Vhffs::Object;
-use Vhffs::ObjectFactory;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $vhffs = $panel->{'vhffs'};
-my $maintemplate = $panel->{'template'};
-my $user = $panel->{'user'};
-my $cgi = $panel->{'cgi'};
-my $servername = $cgi->param("name");
-my $templatesdir = $vhffs->get_config->get_templatedir;
-
-my $template;
-
-#Use is not allowed to see this page, only MODERATOR and ADMIN
-unless( $user->is_moderator || $user->is_admin )
-{
-	$template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
-	$template->param( MESSAGE => gettext('You\'re not allowed to do this (ACL rights)') );
-}
-else
-{
-	$panel->set_title( gettext('Moderation') );	
-
-	my $objects = Vhffs::Object::getall( $vhffs, undef, Vhffs::Constants::WAITING_FOR_VALIDATION );
-	unless( defined $objects )  {
-		$template = new HTML::Template( filename => $templatesdir.'/panel/misc/simplemsg.tmpl' );
-		$template->param( MESSAGE => gettext('There is nothing to moderate') );
-	}
-	else  {
-
-		$template = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation.tmpl' );
-		$template->param( HEADER_TYPE => gettext('Type') );
-		$template->param( HEADER_NAME => gettext('Name') );
-		$template->param( HEADER_USER => gettext('User') );
-		$template->param( HEADER_GROUP => gettext('Group') );
-		$template->param( HEADER_DESCRIPTION => gettext('Description') );
-		$template->param( HEADER_ACCEPT => gettext('Accept') );
-		$template->param( HEADER_REFUSE => gettext('Refuse') );
-
-		my $output = '';
-
-		foreach ( @{$objects} ) {
-
-			my $subtemplate = new HTML::Template( filename => $templatesdir.'/panel/admin/misc/moderation_part.tmpl' );
-
-			my $user = $_->get_user;
-			my $group = $_->get_group;
-
-			my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $_->{object_id} );
-			$subtemplate->param( TYPE => Vhffs::Functions::type_string_from_type_id( $_->{type} ) );
-			$subtemplate->param( NAME => $object->get_label );
-
-			$subtemplate->param( OWNER	=> $user->get_username);
-
-			if( $vhffs->get_config->get_users->{'use_notation'} eq 'yes' )
-			{
-				$subtemplate->param( NOTE	=> $user->get_note );
-			}
-
-			$subtemplate->param( GROUP		=> $group->get_groupname );
-
-			$subtemplate->param( OID		=> $_->get_oid );
-			$subtemplate->param( DESCRIPTION	=> $_->get_description );
-			$subtemplate->param( ACCEPT		=> gettext('Accept') );
-			$subtemplate->param( REFUSE		=> gettext('Refuse') );
-			$output .= $subtemplate->output;
-		}
-
-		$template->param( MODERATION => $output );
-	}
-}
-
-$panel->build( $template );
-$panel->display;

Deleted: trunk/vhffs-panel/admin/moderation_submit.pl
===================================================================
--- trunk/vhffs-panel/admin/moderation_submit.pl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/admin/moderation_submit.pl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -1,105 +0,0 @@
-#!%PERL% -w 
-# Copyright (c) vhffs project and its contributors
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without 
-# modification, are permitted provided that the following conditions 
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright 
-#   notice, this list of conditions and the following disclaimer.
-#2. Redistributions in binary form must reproduce the above copyright
-#   notice, this list of conditions and the following disclaimer in 
-#   the documentation and/or other materials provided with the 
-#   distribution.
-#3. Neither the name of vhffs nor the names of its contributors 
-#   may be used to endorse or promote products derived from this 
-#   software without specific prior written permission.
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
-#"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
-#LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
-#FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
-#COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
-#INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
-#BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
-#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-use utf8;
-use POSIX qw(locale_h);
-use HTML::Template;
-use locale;
-use Locale::gettext;
-use CGI;
-use CGI::Session;
-use strict;
-use Encode;
-
-use lib '%VHFFS_LIB_DIR%';
-use Vhffs::Panel::Main;
-use Vhffs::Panel::Menu;
-use Vhffs::Object;
-use Vhffs::ObjectFactory;
-
-my $panel = new Vhffs::Panel::Main();
-exit 0 unless $panel;
-my $session = $panel->get_session;
-exit 0 unless $session;
-
-my $cgi          = $panel->{'cgi'};
-my $vhffs        = $panel->{'vhffs'};
-my $user         = $panel->{'user'};
-my $templatedir  = $panel->{'templatedir'};
-
-my $accept       = $cgi->param('ACCEPT');
-my $reason       = Encode::decode_utf8( $cgi->param('reason') );
-
-my $template     = new HTML::Template( filename => $templatedir.'/panel/admin/misc/moderation_applied.tmpl' );
-
-#Use is not allowed to see this page, only MODERATOR and ADMIN
-unless( $user->is_moderator || $user->is_admin )
-{
-	my $message = gettext('You\'re not allowed to do this (ACL rights)');
-	$template->param( MESSAGE => $message );
-}
-else
-{
-	my $oid = $cgi->param('OID');
-	my $object = Vhffs::ObjectFactory::fetch_object( $vhffs , $oid );
-
-	if( ( ! defined $oid ) || ( ! defined $object ) || ( ! defined $accept ) )
-	{
-		$template->param( MESSAGE  => gettext("CGI Error !") );
-	}
-	else
-	{
-		my $ok;
-
-		if( $accept == 1 )
-		{
-			$ok = $object->moderate_accept;
-		}
-		else
-		{
-			$ok = $object->moderate_refuse( $reason );
-		}
-		
-		if( $ok < 0 )
-		{
-			$template->param( MESSAGE  => gettext("Cannot apply modifications") );
-		}
-		else
-		{
-			$template->param( MESSAGE  => gettext("Modifications applied successfully") );
-		}
-	}
-}
-
-$panel->set_refresh_url( '/admin/moderation.pl' );
-$panel->build( $template );
-$panel->display;

Modified: trunk/vhffs-panel/templates/admin/main/general-modo.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/main/general-modo.tmpl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/templates/admin/main/general-modo.tmpl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -8,7 +8,7 @@
 					</li>
 
 					<li id="adminHomeModeration">
-				                <a href="/admin/moderation.pl">
+				                <a href="/admin/moderation/index.pl">
                 				        <TMPL_VAR ESCAPE=1 NAME="TEXT_MODERATION">
                					 </a>
 					</li>

Modified: trunk/vhffs-panel/templates/admin/main/general.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/main/general.tmpl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/templates/admin/main/general.tmpl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -12,7 +12,7 @@
       					          </a>
 					</li>
 					<li id="adminHomeModeration">
-				                <a href="/admin/moderation.pl">
+				                <a href="/admin/moderation/index.pl">
                 				        <TMPL_VAR ESCAPE=1 NAME="TEXT_MODERATION">
                					 </a>
 					</li>

Modified: trunk/vhffs-panel/templates/admin/misc/mailings_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/mailings_part.tmpl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/templates/admin/misc/mailings_part.tmpl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -12,7 +12,7 @@
 		<TMPL_VAR ESCAPE=1 NAME="DESCRIPTION"> 
 	</td>
 	<td>
-		<form method="post" action="moderation_submit.pl" accept-charset="utf-8">
+		<form method="post" action="moderation/submit.pl" accept-charset="utf-8">
 			<input type="hidden" name="OID" value="<TMPL_VAR ESCAPE=1 NAME="OID">" />
 			<input type="hidden" name="UID_ASKER" value="<TMPL_VAR ESCAPE=1 NAME="UID_ASKER">" />
 			<input type="hidden" name="ACCEPT" value="1" />
@@ -21,7 +21,7 @@
 	</td>
 	<td>
 
-		<form method="post" action="moderation_submit.pl" accept-charset="utf-8">
+		<form method="post" action="moderation/submit.pl" accept-charset="utf-8">
 			<textarea name="reason" cols="30" rows="4"></textarea>
 			<input type="hidden" name="OID" value="<TMPL_VAR ESCAPE=1 NAME="OID">" />
 			<input type="hidden" name="UID_ASKER" value="<TMPL_VAR ESCAPE=1 NAME="UID_ASKER">" />

Modified: trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl
===================================================================
--- trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/templates/admin/misc/moderation_part.tmpl	2011-05-26 12:21:32 UTC (rev 1820)
@@ -22,7 +22,7 @@
 		<TMPL_VAR ESCAPE=1 NAME="DESCRIPTION"> 
 	</td>
 	<td>
-		<form method="post" action="moderation_submit.pl" accept-charset="utf-8">
+		<form method="post" action="moderation/submit.pl" accept-charset="utf-8">
 			<input type="hidden" name="OID" value="<TMPL_VAR ESCAPE=1 NAME="OID">" />
 			<input type="hidden" name="ACCEPT" value="1" />
 			<input type="submit" value="<TMPL_VAR ESCAPE=1 NAME="ACCEPT">" />
@@ -30,7 +30,7 @@
 	</td>
 	<td>
 
-		<form method="post" action="moderation_submit.pl" accept-charset="utf-8">
+		<form method="post" action="moderation/submit.pl" accept-charset="utf-8">
 			<textarea name="reason" cols="30" rows="4"></textarea>
 			<input type="hidden" name="OID" value="<TMPL_VAR ESCAPE=1 NAME="OID">" />
 			<input type="hidden" name="ACCEPT" value="0" />

Modified: trunk/vhffs-panel/templates/menu/moderator.tt
===================================================================
--- trunk/vhffs-panel/templates/menu/moderator.tt	2011-05-26 12:21:23 UTC (rev 1819)
+++ trunk/vhffs-panel/templates/menu/moderator.tt	2011-05-26 12:21:32 UTC (rev 1820)
@@ -1,2 +1,2 @@
 <a href="/admin/stats.pl">[% 'Get statistics' | i18n | html %]</a>
-<a href="/admin/moderation.pl">[% 'Moderation' | i18n | html %]</a>
+<a href="/admin/moderation/index.pl">[% 'Moderation' | i18n | html %]</a>


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/