use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
+@ISA = qw(Exporter);
+@EXPORT = qw(
+ &checkauth
+ &get_template_and_user
+);
=head1 NAME
=head1 FUNCTIONS
-=over 2
-
-=cut
-
-@ISA = qw(Exporter);
-@EXPORT = qw(
- &checkauth
- &get_template_and_user
-);
-
-=item get_template_and_user
+=head2 get_template_and_user
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{ template_name => "opac-main.tt",
-d $path ? $opaclang : 'en';
}
-=item checkauth
+=head2 checkauth
($userid, $cookie, $sessionID) = &checkauth($query, $noauth, $flagsrequired, $type);
1;
__END__
-=back
-
=head1 SEE ALSO
CGI(3)
=head1 CGI PARAMETERS
+=over
+
=item PT
The Proxy Ticket, needed for check_api_auth, that will try to make the CAS Server validate it.
+=back
+
=cut
use utf8;
if ($sourcetag < "010"){
if ($record->field($sourcetag)){
my $source = $record->field($sourcetag)->data();
- printf($idmapfh "%s|%s\n",$source,$biblionumber);
+ printf($idmapfh "%s|%s\n",$source,$biblionumber);
}
} else {
my $source=$record->subfield($sourcetag,$sourcesubfield);
- printf($idmapfh "%s|%s\n",$source,$biblionumber);
+ printf($idmapfh "%s|%s\n",$source,$biblionumber);
}
}
# create biblio, unless we already have it ( either match or isbn )
;
} elsif (defined $params[$i - 1]) {
my $param = $params[$i - 1];
- warn_normal("$fmt_0: $&: Expected a TMPL_VAR, but found a "
- . $param->type->to_string . "\n", undef)
- if $param->type != C4::TmplTokenType::DIRECTIVE;
- warn_normal("$fmt_0: $&: Unsupported "
- . "field width or precision\n", undef)
+ warn_normal("$fmt_0: $&: Expected a TMPL_VAR, but found a "
+ . $param->type->to_string . "\n", undef)
+ if $param->type != C4::TmplTokenType::DIRECTIVE;
+ warn_normal("$fmt_0: $&: Unsupported "
+ . "field width or precision\n", undef)
if defined $width || defined $prec;
- warn_normal("$fmt_0: $&: Parameter $i not known", undef)
+ warn_normal("$fmt_0: $&: Parameter $i not known", undef)
unless defined $param;
$it .= defined $f? &$f( $param ): $param->string;
}
my $param = $params[$i - 1];
if (!defined $param) {
- warn_normal("$fmt_0: $&: Parameter $i not known", undef);
+ warn_normal("$fmt_0: $&: Parameter $i not known", undef);
} else {
if ($param->type == C4::TmplTokenType::TAG
&& $param->string =~ /^<input\b/is) {
my $type = defined $param->attributes?
lc($param->attributes->{'type'}->[1]): undef;
if ($conv eq 'S') {
- warn_normal("$fmt_0: $&: Expected type=text, "
- . "but found type=$type", undef)
+ warn_normal("$fmt_0: $&: Expected type=text, "
+ . "but found type=$type", undef)
unless $type eq 'text';
} elsif ($conv eq 'p') {
- warn_normal("$fmt_0: $&: Expected type=radio, "
- . "but found type=$type", undef)
+ warn_normal("$fmt_0: $&: Expected type=radio, "
+ . "but found type=$type", undef)
unless $type eq 'radio';
}
} else {
- warn_normal("$&: Expected an INPUT, but found a "
- . $param->type->to_string . "\n", undef)
+ warn_normal("$&: Expected an INPUT, but found a "
+ . $param->type->to_string . "\n", undef)
}
- warn_normal("$fmt_0: $&: Unsupported "
- . "field width or precision\n", undef)
+ warn_normal("$fmt_0: $&: Unsupported "
+ . "field width or precision\n", undef)
if defined $width || defined $prec;
$it .= defined $f? &$f( $param ): $param->string;
}
my $i = $1;
$fmt = $';
my $anchor = $anchors[$i - 1];
- warn_normal("$&: Anchor $1 not found for msgid \"$fmt_0\"", undef) #FIXME
+ warn_normal("$&: Anchor $1 not found for msgid \"$fmt_0\"", undef) #FIXME
unless defined $anchor;
$it .= $anchor->string;
} else {
$translation{$msgid} = $msgstr unless $msgstr eq '*****';
if ($msgid =~ /\bcharset=(["']?)([^;\s"']+)\1/s) {
- my $candidate = TmplTokenizer::charset_canon($2);
+ my $candidate = TmplTokenizer::charset_canon($2);
die "Conflicting charsets in msgid: $candidate vs $charset_in\n"
if defined $charset_in && $charset_in ne $candidate;
$charset_in = $candidate;
}
if ($msgstr =~ /\bcharset=(["']?)([^;\s"']+)\1/s) {
- my $candidate = TmplTokenizer::charset_canon($2);
+ my $candidate = TmplTokenizer::charset_canon($2);
die "Conflicting charsets in msgid: $candidate vs $charset_out\n"
if defined $charset_out && $charset_out ne $candidate;
$charset_out = $candidate;
}
# The following assumption is correct; that's what HTML::Template assumes
if (!defined $charset_in) {
- $charset_in = $charset_out = TmplTokenizer::charset_canon('utf-8');
- warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n";
+ $charset_in = $charset_out = TmplTokenizer::charset_canon('utf-8');
+ warn "Warning: Can't determine original templates' charset, defaulting to $charset_in\n";
}
}
my $input = /^\//? $_: "$directory/$_";
my $h = TmplTokenizer->new( $input );
$h->set_allow_cformat( 1 );
- VerboseWarnings::set_input_file_name($input);
+ VerboseWarnings::set_input_file_name($input);
print STDERR "$0: Processing file \"$input\"\n" if $verbose_p;
text_extract( $h );
}
$columns{($row[0] ||'NULL')}++;
push @loopcol, { coltitle => $row[0] || 'NULL' };
}
- $debug and print $debugfh "full array: ", Dumper(\%columns), "\n";
+ $debug and print $debugfh "full array: ", Dumper(\%columns), "\n";
}else{
$columns{''} = 1;
}
}
sub recursive_breakdown {
- my $dse = shift or return;
+ my $dse = shift or return;
if (ref($dse) =~ /HASH/) {
return join "\n", map {"$_\t=> " . recursive_breakdown($dse->{$_})} keys %$dse;
} elsif (ref($dse) =~ /ARRAY/) {
$subfield_data{marc_lib} ="<span id=\"error$i\" title=\"".$tagslib->{$tag}->{$subfield}->{lib}."\">".$tagslib->{$tag}->{$subfield}->{lib}."</span>";
$subfield_data{mandatory} = $tagslib->{$tag}->{$subfield}->{mandatory};
$subfield_data{repeatable} = $tagslib->{$tag}->{$subfield}->{repeatable};
- my $value;
- if ( $use_default_values) {
+ my $value;
+ if ( $use_default_values) {
$value = $tagslib->{$tag}->{$subfield}->{defaultvalue};
# get today date & replace YYYY, MM, DD if provided in the default value
my $today = dt_from_string;