[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha C4/Auth.pm C4/Auth_with_ldap.pm C4/Output....
From: |
paul poulain |
Subject: |
[Koha-cvs] koha C4/Auth.pm C4/Auth_with_ldap.pm C4/Output.... |
Date: |
Tue, 05 Jun 2007 08:53:20 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: paul poulain <tipaul> 07/06/05 08:53:20
Modified files:
C4 : Auth.pm Auth_with_ldap.pm Output.pm
installer : InstallAuth.pm
Log message:
removing guessencoding, hard-coding utf-8
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth.pm?cvsroot=koha&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Auth_with_ldap.pm?cvsroot=koha&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Output.pm?cvsroot=koha&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/koha/installer/InstallAuth.pm?cvsroot=koha&r1=1.3&r2=1.4
Patches:
Index: C4/Auth.pm
===================================================================
RCS file: /sources/koha/koha/C4/Auth.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- C4/Auth.pm 24 Apr 2007 13:54:29 -0000 1.61
+++ C4/Auth.pm 5 Jun 2007 08:53:19 -0000 1.62
@@ -36,7 +36,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.61 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.62 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -60,7 +60,7 @@
});
print $query->header(
- -type => guesstype($template->output),
+ -type => 'utf-8',
-cookie => $cookie
), $template->output;
@@ -659,7 +659,7 @@
-expires => ''
);
print $query->header(
- -type => guesstype( $template->output ),
+ -type => 'utf-8',
-cookie => $cookie
),
$template->output;
Index: C4/Auth_with_ldap.pm
===================================================================
RCS file: /sources/koha/koha/C4/Auth_with_ldap.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- C4/Auth_with_ldap.pm 4 Apr 2007 16:46:22 -0000 1.7
+++ C4/Auth_with_ldap.pm 5 Jun 2007 08:53:19 -0000 1.8
@@ -57,7 +57,7 @@
});
print $query->header(
- -type => guesstype($template->output),
+ -type => 'utf-8',
-cookie => $cookie
), $template->output;
@@ -548,7 +548,7 @@
-expires => ''
);
print $query->header(
- -type => guesstype( $template->output ),
+ -type => 'utf-8',
-cookie => $cookie
),
$template->output;
Index: C4/Output.pm
===================================================================
RCS file: /sources/koha/koha/C4/Output.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- C4/Output.pm 24 Apr 2007 13:54:29 -0000 1.61
+++ C4/Output.pm 5 Jun 2007 08:53:19 -0000 1.62
@@ -21,7 +21,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Output.pm,v 1.61 2007/04/24 13:54:29 hdl Exp $
+# $Id: Output.pm,v 1.62 2007/06/05 08:53:19 tipaul Exp $
# NOTE: I'm pretty sure this module is deprecated in favor of
# templates.
@@ -35,7 +35,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.61 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
+$VERSION = do { my @v = '$Revision: 1.62 $' =~ /\d+/g; shift(@v) . "." . join(
"_", map { sprintf "%03d", $_ } @v ); };
=head1 NAME
@@ -54,8 +54,6 @@
#Output
push @EXPORT, qw(
- &guesscharset
- &guesstype
&output_html_with_http_headers
);
@@ -315,42 +313,6 @@
return $pagination_bar;
}
-
-=item guesscharset
-
- &guesscharset($output)
-
-"Guesses" the charset from the some HTML that would be output.
-
-C<$output> is the HTML page to be output. If it contains a META tag
-with a Content-Type, the tag will be scanned for a language code.
-This code is returned if it is found; undef is returned otherwise.
-
-This function only does sloppy guessing; it will be confused by
-unexpected things like SGML comments. What it basically does is to
-grab something that looks like a META tag and scan it.
-
-=cut
-
-sub guesscharset ($) {
- my($html) = @_;
- my $charset = undef;
- local($`, $&, $', $1, $2, $3);
- # FIXME... These regular expressions will miss a lot of valid tags!
- if ($html =~
/<meta\s+http-equiv=(["']?)Content-Type\1\s+content=(["'])text\/html\s*;\s*charset=([^\2\s\r\n]+)\2\s*(?:\/?)>/is)
{
- $charset = $3;
- } elsif ($html =~
/<meta\s+content=(["'])text\/html\s*;\s*charset=([^\1\s\r\n]+)\1\s+http-equiv=(["']?)Content-Type\3\s*(?:\/?)>/is)
{
- $charset = $2;
- }
- return $charset;
-} # guess
-
-sub guesstype ($) {
- my($html) = @_;
- my $charset = guesscharset($html);
- return defined $charset? "text/html; charset=$charset": "text/html";
-}
-
=item output_html_with_http_headers
&output_html_with_http_headers($query, $cookie, $html)
@@ -364,7 +326,7 @@
sub output_html_with_http_headers ($$$) {
my($query, $cookie, $html) = @_;
print $query->header(
- -type => guesstype($html),
+ -type => 'utf-8',
-cookie => $cookie,
), $html;
}
Index: installer/InstallAuth.pm
===================================================================
RCS file: /sources/koha/koha/installer/InstallAuth.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- installer/InstallAuth.pm 24 Apr 2007 13:54:29 -0000 1.3
+++ installer/InstallAuth.pm 5 Jun 2007 08:53:19 -0000 1.4
@@ -31,7 +31,7 @@
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.3 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.4 $' =~ /\d+/g;
shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v );
};
@@ -55,7 +55,7 @@
});
print $query->header(
- -type => guesstype($template->output),
+ -type => 'utf-8',
-cookie => $cookie
), $template->output;
@@ -373,7 +373,7 @@
-expires => ''
);
print $query->header(
- -type => guesstype( $template->output ),
+ -type => 'utf-8',
-cookie => $cookie
),
$template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha C4/Auth.pm C4/Auth_with_ldap.pm C4/Output....,
paul poulain <=