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

(-)a/Koha/Patron.pm (+22 lines)
Lines 2196-2201 sub virtualshelves { Link Here
2196
    return Koha::Virtualshelves->_new_from_dbic( scalar $self->_result->virtualshelves );
2196
    return Koha::Virtualshelves->_new_from_dbic( scalar $self->_result->virtualshelves );
2197
}
2197
}
2198
2198
2199
=head3 phone
2200
2201
    my $phone = $patron->phone;
2202
2203
=cut
2204
2205
sub phone {
2206
    my ($self,@data) = @_;
2207
    if (@data){
2208
        foreach my $datum (@data){
2209
            $datum =~ s/[^\+0-9]//g;
2210
        }
2211
        $self->_result()->set_column( 'phone', @data );
2212
        return $self;
2213
    }
2214
    else {
2215
        my $value = $self->_result()->get_column( 'phone' );
2216
        return $value;
2217
    }
2218
}
2219
2220
2199
=head2 Internal methods
2221
=head2 Internal methods
2200
2222
2201
=head3 _type
2223
=head3 _type
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc (-2 / +4 lines)
Lines 318-324 Link Here
318
                    if ( !search_fields ) {
318
                    if ( !search_fields ) {
319
                        search_fields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
319
                        search_fields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]";
320
                    }
320
                    }
321
321
                    if (search_fields == 'phone'){
322
                        //Normalize phone numbers
323
                        patterns = [pattern.replace(/[^\+0-9]/g,'')];
324
                    }
322
                    let subquery_and = [];
325
                    let subquery_and = [];
323
                    patterns.forEach(function(pattern,i){
326
                    patterns.forEach(function(pattern,i){
324
                        let sub_or = [];
327
                        let sub_or = [];
325
- 

Return to bug 23817