summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-10-15 08:25:28 +0000
committerfukachan <fukachan>2003-10-15 08:25:28 +0000
commit63c981bec8530a75dc8ff32f2950dd7267d50ff8 (patch)
tree81467561f56d2bbc2ff515a2b9fea884381b72bb /fml/lib/FML/Process
parent07b2770ece92c7cbc03b8ac326f7bd27e54f9704 (diff)
downloadfml8-63c981bec8530a75dc8ff32f2950dd7267d50ff8.tar.gz
fml8-63c981bec8530a75dc8ff32f2950dd7267d50ff8.tar.bz2
fml8-63c981bec8530a75dc8ff32f2950dd7267d50ff8.zip
remove language_of_cgi_message()
implement set_accept_language_list() and get_accept_language_list().
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Utils.pm67
1 files changed, 52 insertions, 15 deletions
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index cd7ff0ff..81e0293d 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/Utils.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Utils.pm,v 1.83 2003/10/15 01:03:35 fukachan Exp $
+# $FML: Utils.pm,v 1.84 2003/10/15 04:20:01 fukachan Exp $
#
package FML::Process::Utils;
@@ -1362,20 +1362,6 @@ sub language_default
}
-# Descriptions: inform language returned by cgi process
-# Arguments: OBJ($curproc)
-# Side Effects: none
-# Return Value: STR
-sub language_of_cgi_message
-{
- my ($curproc) = @_;
- my $config = $curproc->config();
- my $charset = $config->{ cgi_charset };
-
- return( $charset || $curproc->language_default() );
-}
-
-
# Descriptions: language used in reply message
# Arguments: OBJ($curproc)
# Side Effects: none
@@ -1429,6 +1415,57 @@ sub get_charset
}
+=head2 get_accept_language_list($list)
+
+set preferred language candidates requested by sender.
+$list is ARRAY_REF.
+
+=head2 get_accept_language_list()
+
+return preferred language candidates requested by sender.
+The type of return value is ARRAY_REF.
+
+=cut
+
+
+# Descriptions: return language candidates requested by sender
+# Arguments: OBJ($curproc) ARRAY_REF($list)
+# Side Effects: none
+# Return Value: ARRAY_REF
+sub set_accept_language_list
+{
+ my ($curproc, $list) = @_;
+ my $pcb = $curproc->pcb();
+
+ if (defined $pcb) {
+ if (ref($list) eq 'ARRAY') {
+ $pcb->set('incoming_message', 'accept-language', $list);
+ }
+ else {
+ $curproc->logerror("set_accept_language_list: invalid data");
+ }
+ }
+}
+
+
+# Descriptions: return language candidates requested by sender
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: ARRAY_REF
+sub get_accept_language_list
+{
+ my ($curproc) = @_;
+ my $pcb = $curproc->pcb();
+
+ if (defined $pcb) {
+ return $pcb->get('incoming_message', 'accept-language');
+ }
+ else {
+ return [ '*' ];
+ }
+}
+
+
=head2 thread_db_args($args)
prepare and return information (HASH_REF) needed to manipulate thread