View | Details | Raw Unified | Return to bug 6554
Collapse All | Expand All

(-)a/C4/ItemType.pm (-2 / +2 lines)
Lines 81-87 sub all { Link Here
81
    for ( @{$dbh->selectall_arrayref(
81
    for ( @{$dbh->selectall_arrayref(
82
        "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
82
        "SELECT * FROM itemtypes ORDER BY description", { Slice => {} })} )
83
    {
83
    {
84
        utf8::encode($_->{description});
84
        utf8::upgrade($_->{description});
85
        push @itypes, $class->new($_);
85
        push @itypes, $class->new($_);
86
    }
86
    }
87
    return @itypes;
87
    return @itypes;
Lines 105-111 sub get { Link Here
105
        "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
105
        "SELECT * FROM itemtypes WHERE itemtype = ?", undef, $itemtype
106
    );
106
    );
107
    if ( $data->{description} ) {
107
    if ( $data->{description} ) {
108
        utf8::encode($data->{description});
108
        utf8::upgrade($data->{description});
109
    }
109
    }
110
    return $class->new($data);
110
    return $class->new($data);
111
}
111
}
(-)a/C4/Search.pm (+2 lines)
Lines 574-579 sub getRecords { Link Here
574
                            {
574
                            {
575
575
576
# Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
576
# Sanitize the link value : parenthesis, question and exclamation mark will cause errors with CCL
577
                                utf8::decode($one_facet);
577
                                my $facet_link_value = $one_facet;
578
                                my $facet_link_value = $one_facet;
578
                                $facet_link_value =~ s/[()!?¡¿؟]/ /g;
579
                                $facet_link_value =~ s/[()!?¡¿؟]/ /g;
579
580
Lines 1606-1611 sub buildQuery { Link Here
1606
        warn "LIMIT DESC:" . $limit_desc;
1607
        warn "LIMIT DESC:" . $limit_desc;
1607
        warn "---------\nLeave buildQuery\n---------";
1608
        warn "---------\nLeave buildQuery\n---------";
1608
    }
1609
    }
1610
    utf8::decode($query_desc);
1609
    return (
1611
    return (
1610
        undef,              $query, $simple_query, $query_cgi,
1612
        undef,              $query, $simple_query, $query_cgi,
1611
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
1613
        $query_desc,        $limit, $limit_cgi,    $limit_desc,
(-)a/C4/Templates.pm (-3 / +4 lines)
Lines 62-67 sub new { Link Here
62
    my $template = Template->new(
62
    my $template = Template->new(
63
        {   EVAL_PERL    => 1,
63
        {   EVAL_PERL    => 1,
64
            ABSOLUTE     => 1,
64
            ABSOLUTE     => 1,
65
            ENCODING => 'utf8',
65
            PLUGIN_BASE => 'Koha::Template::Plugin',
66
            PLUGIN_BASE => 'Koha::Template::Plugin',
66
            COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'',
67
            COMPILE_EXT => C4::Context->config('template_cache_dir')?'.ttc':'',
67
            COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',,
68
            COMPILE_DIR => C4::Context->config('template_cache_dir')?C4::Context->config('template_cache_dir'):'',,
Lines 124-130 sub output { Link Here
124
            utf8_hashref($vars->{$k});
125
            utf8_hashref($vars->{$k});
125
        }
126
        }
126
        else {
127
        else {
127
            utf8::encode($vars->{$k}) if utf8::is_utf8($vars->{$k});
128
            utf8::upgrade($vars->{$k}) if utf8::is_utf8($vars->{$k});
128
        }
129
        }
129
    }
130
    }
130
    my $data;
131
    my $data;
Lines 145-151 sub utf8_arrayref { Link Here
145
            utf8_hashref($element);
146
            utf8_hashref($element);
146
            next;
147
            next;
147
        }
148
        }
148
        utf8::encode($element) if utf8::is_utf8($element);
149
        utf8::upgrade($element) if utf8::is_utf8($element);
149
    }        
150
    }        
150
}         
151
}         
151
152
Lines 160-166 sub utf8_hashref { Link Here
160
            utf8_hashref($hashref->{$key});
161
            utf8_hashref($hashref->{$key});
161
            next;
162
            next;
162
        }
163
        }
163
        utf8::encode($hashref->{$key}) if utf8::is_utf8($hashref->{$key});
164
        utf8::upgrade($hashref->{$key}) if utf8::is_utf8($hashref->{$key});
164
    }
165
    }
165
}
166
}
166
        
167
        
(-)a/members/member.pl (+3 lines)
Lines 49-54 my ($template, $loggedinuser, $cookie) Link Here
49
my $theme = $input->param('theme') || "default";
49
my $theme = $input->param('theme') || "default";
50
50
51
my $patron = $input->Vars;
51
my $patron = $input->Vars;
52
my $tmp_member = $patron->{member};
53
utf8::decode($tmp_member);
54
$patron->{member} = $tmp_member;
52
foreach (keys %$patron){
55
foreach (keys %$patron){
53
	delete $$patron{$_} unless($$patron{$_});
56
	delete $$patron{$_} unless($$patron{$_});
54
}
57
}
(-)a/opac/opac-search.pl (-1 / +1 lines)
Lines 395-400 $template->{VARS}->{querystring} = join(' ', @operands); Link Here
395
if ($operands[0] && !$operands[1]) {
395
if ($operands[0] && !$operands[1]) {
396
    my $ms_query = $operands[0];
396
    my $ms_query = $operands[0];
397
    $ms_query =~ s/ #\S+//;
397
    $ms_query =~ s/ #\S+//;
398
    utf8::decode($ms_query);
398
    $template->param(ms_value => $ms_query);
399
    $template->param(ms_value => $ms_query);
399
}
400
}
400
401
401
- 

Return to bug 6554