projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9da9c45
)
utf-8, RT#12514
author
ivan
<ivan>
Sun, 24 Apr 2011 00:33:37 +0000
(
00:33
+0000)
committer
ivan
<ivan>
Sun, 24 Apr 2011 00:33:37 +0000
(
00:33
+0000)
FS/FS/Mason/Request.pm
patch
|
blob
|
history
FS/FS/Record.pm
patch
|
blob
|
history
FS/FS/UID.pm
patch
|
blob
|
history
FS/FS/cust_main.pm
patch
|
blob
|
history
htetc/freeside-base2.conf
patch
|
blob
|
history
htetc/handler.pl
patch
|
blob
|
history
httemplate/autohandler
patch
|
blob
|
history
diff --git
a/FS/FS/Mason/Request.pm
b/FS/FS/Mason/Request.pm
index
9c96b83
..
a5ec21f
100644
(file)
--- a/
FS/FS/Mason/Request.pm
+++ b/
FS/FS/Mason/Request.pm
@@
-52,6
+52,7
@@
sub freeside_setup {
package HTML::Mason::Commands;
use vars qw( $cgi $p $fsurl );
package HTML::Mason::Commands;
use vars qw( $cgi $p $fsurl );
+ use Encode;
use FS::UID qw( cgisuidsetup );
use FS::CGI qw( popurl rooturl );
use FS::UID qw( cgisuidsetup );
use FS::CGI qw( popurl rooturl );
@@
-70,6
+71,15
@@
sub freeside_setup {
} else {
die "unknown mode $mode";
}
} else {
die "unknown mode $mode";
}
+
+ #
+ foreach my $param ( $cgi->param ) {
+ my @values = $cgi->param($param);
+ next if $cgi->uploadInfo($values[0]);
+ #warn $param;
+ @values = map decode(utf8=>$_), @values;
+ $cgi->param($param, @values);
+ }
}
}
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
c7ad65a
..
28d0d4f
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-2205,7
+2205,7
@@
sub ut_text {
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
- =~ /^([
µ_0123456789aAáÁàÀâÂåÅäÄãêæÆbBcCçÇdDðÐeEéÉèÈêÊëËfFgGhHiIíÍìÌîÎïÏjJkKlLmMnNñÑoOóÓòÒôÔöÖõÕøغpPqQrRsSßtTuUúÚùÙûÛüÜvVwWxXyYýÝÿzZþÞ
\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>]+)$/
+ =~ /^([
\w
\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>]+)$/
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
@@
-2522,8
+2522,7
@@
May not be null.
sub ut_name {
my( $self, $field ) = @_;
# warn "ut_name allowed alphanumerics: +(sort grep /\w/, map { chr() } 0..255), "\n";
sub ut_name {
my( $self, $field ) = @_;
# warn "ut_name allowed alphanumerics: +(sort grep /\w/, map { chr() } 0..255), "\n";
- #$self->getfield($field) =~ /^([\w \,\.\-\']+)$/
- $self->getfield($field) =~ /^([µ_0123456789aAáÁàÀâÂåÅäÄãêæÆbBcCçÇdDðÐeEéÉèÈêÊëËfFgGhHiIíÍìÌîÎïÏjJkKlLmMnNñÑoOóÓòÒôÔöÖõÕøغpPqQrRsSßtTuUúÚùÙûÛüÜvVwWxXyYýÝÿzZþÞ \,\.\-\']+)$/
+ $self->getfield($field) =~ /^([\w \,\.\-\']+)$/
or return gettext('illegal_name'). " $field: ". $self->getfield($field);
$self->setfield($field,$1);
'';
or return gettext('illegal_name'). " $field: ". $self->getfield($field);
$self->setfield($field,$1);
'';
diff --git
a/FS/FS/UID.pm
b/FS/FS/UID.pm
index
e042c05
..
31c2887
100644
(file)
--- a/
FS/FS/UID.pm
+++ b/
FS/FS/UID.pm
@@
-124,11
+124,11
@@
sub forksuidsetup {
if ($confcount) {
$use_confcompat = 0;
}else{
if ($confcount) {
$use_confcompat = 0;
}else{
-
warn
"NO CONFIGURATION RECORDS FOUND";
+
die
"NO CONFIGURATION RECORDS FOUND";
}
} else {
}
} else {
-
warn
"NO CONFIGURATION TABLE FOUND" unless $FS::Schema::setup_hack;
+
die
"NO CONFIGURATION TABLE FOUND" unless $FS::Schema::setup_hack;
}
unless ( $callback_hack ) {
}
unless ( $callback_hack ) {
@@
-153,6
+153,8
@@
sub myconnect {
my $handle = DBI->connect( getsecrets(@_), { 'AutoCommit' => 0,
'ChopBlanks' => 1,
'ShowErrorStatement' => 1,
my $handle = DBI->connect( getsecrets(@_), { 'AutoCommit' => 0,
'ChopBlanks' => 1,
'ShowErrorStatement' => 1,
+ 'pg_enable_utf8' => 1,
+ #'mysql_enable_utf8' => 1,
}
)
or die "DBI->connect error: $DBI::errstr\n";
}
)
or die "DBI->connect error: $DBI::errstr\n";
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
973b5b8
..
22c16fb
100644
(file)
--- a/
FS/FS/cust_main.pm
+++ b/
FS/FS/cust_main.pm
@@
-2002,7
+2002,7
@@
sub check {
) {
$self->payname( $self->first. " ". $self->getfield('last') );
} else {
) {
$self->payname( $self->first. " ". $self->getfield('last') );
} else {
- $self->payname =~ /^([
µ_0123456789aAáÁàÀâÂåÅäÄãêæÆbBcCçÇdDðÐeEéÉèÈêÊëËfFgGhHiIíÍìÌîÎïÏjJkKlLmMnNñÑoOóÓòÒôÔöÖõÕøغpPqQrRsSßtTuUúÚùÙûÛüÜvVwWxXyYýÝÿzZþÞ
\,\.\-\'\&]+)$/
+ $self->payname =~ /^([
\w
\,\.\-\'\&]+)$/
or return gettext('illegal_name'). " payname: ". $self->payname;
$self->payname($1);
}
or return gettext('illegal_name'). " payname: ". $self->payname;
$self->payname($1);
}
diff --git
a/htetc/freeside-base2.conf
b/htetc/freeside-base2.conf
index
76e7997
..
dcf5efa
100644
(file)
--- a/
htetc/freeside-base2.conf
+++ b/
htetc/freeside-base2.conf
@@
-9,7
+9,8
@@
PerlModule HTML::Mason::ApacheHandler
PerlRequire "%%%MASON_HANDLER%%%"
#Locale::SubCountry
PerlRequire "%%%MASON_HANDLER%%%"
#Locale::SubCountry
-AddDefaultCharset ISO-8859-1
+#
+AddDefaultCharset UTF-8
<Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
AuthName Freeside
<Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
AuthName Freeside
diff --git
a/htetc/handler.pl
b/htetc/handler.pl
index
eb9e67e
..
e065f09
100644
(file)
--- a/
htetc/handler.pl
+++ b/
htetc/handler.pl
@@
-44,8
+44,8
@@
sub handler
###Module::Refresh->refresh;###
###Module::Refresh->refresh;###
-
#
$r->content_type('text/html; charset=utf-8');
- $r->content_type('text/html; charset=iso-8859-1');
+ $r->content_type('text/html; charset=utf-8');
+
#
$r->content_type('text/html; charset=iso-8859-1');
#eorar
my $headers = $r->headers_out;
#eorar
my $headers = $r->headers_out;
diff --git
a/httemplate/autohandler
b/httemplate/autohandler
index
ae04d42
..
d52b791
100644
(file)
--- a/
httemplate/autohandler
+++ b/
httemplate/autohandler
@@
-7,7
+7,7
@@
my $profile = '';
if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
my $profile = '';
if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
- if ( lc($r->content_type)
eq 'text/html'
+ if ( lc($r->content_type)
=~ /^text\/html/
&& $FS::CurrentUser::CurrentUser->option('show_db_profile')
)
{
&& $FS::CurrentUser::CurrentUser->option('show_db_profile')
)
{