[vhffs-dev] [1111] Fixed UTF8 in group.pl?msg= string and in some CGI of the public area |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1111
Author: gradator
Date: 2007-12-13 21:14:10 +0000 (Thu, 13 Dec 2007)
Log Message:
-----------
Fixed UTF8 in group.pl?msg= string and in some CGI of the public area
Modified Paths:
--------------
trunk/vhffs-api/src/Vhffs/Panel/Main.pm
trunk/vhffs-panel/group/index.pl
trunk/vhffs-public/groupsearch.pl
trunk/vhffs-public/usersearch.pl
trunk/vhffs-public/websitesearch.pl
Modified: trunk/vhffs-api/src/Vhffs/Panel/Main.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-12-06 08:20:53 UTC (rev 1110)
+++ trunk/vhffs-api/src/Vhffs/Panel/Main.pm 2007-12-13 21:14:10 UTC (rev 1111)
@@ -5,6 +5,7 @@
@ISA = qw(Exporter);
@EXPORT = qw( display );
+use strict;
use utf8;
use POSIX qw(locale_h);
use HTML::Template;
@@ -13,7 +14,7 @@
use CGI;
use CGI::Session;
use File::Spec;
-use strict;
+use Encode;
use Vhffs::Main;
use Vhffs::User;
@@ -661,7 +662,7 @@
my $theme = $panel->{theme};
my $templatedir = $panel->{templatedir};
- $panel->add_info( $cgi->param('msg') ) if(defined $cgi->param('msg'));
+ $panel->add_info( Encode::decode_utf8( $cgi->param('msg') ) ) if( defined $cgi->param('msg') );
my $paneltemplate = new HTML::Template( filename => $templatedir.'/panel/main/panel.tmpl' );
$paneltemplate->param( THEME => $theme );
@@ -698,7 +699,7 @@
my $theme = $panel->{theme};
my $templatedir = $panel->{templatedir};
- $panel->add_info( $cgi->param('msg') ) if(defined $cgi->param('msg'));
+ $panel->add_info( Encode::decode_utf8( $cgi->param('msg') ) ) if( defined $cgi->param('msg') );
$template->param( THEME => $theme ) if( ($template->query(name => 'THEME') || '') eq 'VAR' );
@@ -772,6 +773,9 @@
=cut
sub redirect {
my ($panel, $dest, $cookies) = @_;
+
+ $dest = Encode::encode_utf8( $dest );
+
if(defined $cookies) {
if(ref($cookies)) {
foreach(@$cookies) {
Modified: trunk/vhffs-panel/group/index.pl
===================================================================
--- trunk/vhffs-panel/group/index.pl 2007-12-06 08:20:53 UTC (rev 1110)
+++ trunk/vhffs-panel/group/index.pl 2007-12-13 21:14:10 UTC (rev 1111)
@@ -52,8 +52,7 @@
my $templatedir = $panel->{templatedir};
$panel->set_title( gettext('My Projects') );
-my $template = new HTML::Template( filename =>
- $templatedir.'/panel/group/index.tmpl', global_vars => 1);
+my $template = new HTML::Template( filename => $templatedir.'/panel/group/index.tmpl', global_vars => 1);
my $groups = Vhffs::Panel::User::get_groups($user, $Vhffs::Panel::User::RELATION_OWNER);
$template->param( OWNED_PROJECTS => $groups );
Modified: trunk/vhffs-public/groupsearch.pl
===================================================================
--- trunk/vhffs-public/groupsearch.pl 2007-12-06 08:20:53 UTC (rev 1110)
+++ trunk/vhffs-public/groupsearch.pl 2007-12-13 21:14:10 UTC (rev 1111)
@@ -36,6 +36,7 @@
use locale;
use Locale::gettext;
use CGI;
+use Encode;
use lib '%VHFFS_LIB_DIR%';
use Vhffs::Panel::Commons;
@@ -54,7 +55,7 @@
my $template = new Vhffs::Panel::Template( filename => $templatedir.'/public/groupslist.tmpl', die_on_bad_params => 0 );
my $groupname = $cgi->param('groupname') || '';
-my $description = $cgi->param('description') || '';
+my $description = Encode::decode_utf8( $cgi->param('description') ) || '';
my $page = $cgi->param('page');
my $per_page_count = 5;
$page = 1 unless(defined $page && int($page) > 0);
Modified: trunk/vhffs-public/usersearch.pl
===================================================================
--- trunk/vhffs-public/usersearch.pl 2007-12-06 08:20:53 UTC (rev 1110)
+++ trunk/vhffs-public/usersearch.pl 2007-12-13 21:14:10 UTC (rev 1111)
@@ -36,6 +36,7 @@
use locale;
use Locale::gettext;
use CGI;
+use Encode;
use lib '%VHFFS_LIB_DIR%';
use Vhffs::Panel::Commons;
@@ -53,8 +54,8 @@
my $template = new Vhffs::Panel::Template( filename => $templatedir.'/public/userslist.tmpl', die_on_bad_params => 0 );
my $username = $cgi->param('username') || '';
-my $firstname = $cgi->param('firstname') || '';
-my $lastname = $cgi->param('lastname') || '';
+my $firstname = Encode::decode_utf8( $cgi->param('firstname') ) || '';
+my $lastname = Encode::decode_utf8( $cgi->param('lastname') ) || '';
my $page = $cgi->param('page');
my $per_page_count = 5;
$page = 1 unless(defined $page && int($page) > 0);
Modified: trunk/vhffs-public/websitesearch.pl
===================================================================
--- trunk/vhffs-public/websitesearch.pl 2007-12-06 08:20:53 UTC (rev 1110)
+++ trunk/vhffs-public/websitesearch.pl 2007-12-13 21:14:10 UTC (rev 1111)
@@ -36,6 +36,7 @@
use locale;
use Locale::gettext;
use CGI;
+use Encode;
use lib '%VHFFS_LIB_DIR%';
use Vhffs::Panel::Main;
@@ -55,7 +56,7 @@
my $template = new Vhffs::Panel::Template( filename => $templatedir."/public/websiteslist.tmpl" );
my $servername = $cgi->param('servername') || '';
-my $description = $cgi->param('description') || '';
+my $description = Encode::decode_utf8( $cgi->param('description') ) || '';
my $page = $cgi->param('page');
my $per_page_count = 10;
$page = 1 unless(defined $page && int($page) > 0);