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

(-)a/C4/ILSDI/Services.pm (-3 / +18 lines)
Lines 84-90 Parameters: Link Here
84
=head3 id (Required)
84
=head3 id (Required)
85
85
86
list of either biblionumbers or itemnumbers
86
list of either biblionumbers or itemnumbers
87
88
=head3 id_type (Required)
87
=head3 id_type (Required)
89
88
90
defines the type of record identifier being used in the request, 
89
defines the type of record identifier being used in the request, 
Lines 299-314 Parameters: Link Here
299
  - id_type (Optional)
298
  - id_type (Optional)
300
	the type of the identifier, possible values:
299
	the type of the identifier, possible values:
301
	- cardnumber
300
	- cardnumber
302
	- firstname
303
	- userid
301
	- userid
302
        - email
304
	- borrowernumber
303
	- borrowernumber
304
	- firstname
305
        - surname
305
306
306
=cut
307
=cut
307
308
308
sub LookupPatron {
309
sub LookupPatron {
309
    my ($cgi) = @_;
310
    my ($cgi) = @_;
310
311
311
    my $patrons = Koha::Patrons->search( { $cgi->param('id_type') => $cgi->param('id') } );
312
    my $patrons;
313
314
    if(!$cgi->param('id')) {
315
	return { message => 'PatronNotFound' };
316
    }
317
318
    if($cgi->param('id_type')) {
319
	$patrons = Koha::Patrons->search( { $cgi->param('id_type') => $cgi->param('id') } );
320
    } else {
321
	foreach my $id_type ('cardnumber', 'userid', 'email', 'borrowernumber',
322
				     'surname', 'firstname') {
323
	    $patrons = Koha::Patrons->search( { $id_type => $cgi->param('id') } );
324
	    last if($patrons->count);
325
	}
326
    }
312
    unless ( $patrons->count ) {
327
    unless ( $patrons->count ) {
313
        return { message => 'PatronNotFound' };
328
        return { message => 'PatronNotFound' };
314
    }
329
    }
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/ilsdi.tt (-1 / +4 lines)
Lines 459-466 Link Here
459
                                    <dd>the type of the identifier, possible values:
459
                                    <dd>the type of the identifier, possible values:
460
                                        <ul>
460
                                        <ul>
461
                                            <li>cardnumber</li>
461
                                            <li>cardnumber</li>
462
                                            <li>surname</li>
462
                                            <li>userid</li>
463
                                            <li>email</li>
463
                                            <li>borrowernumber</li>
464
                                            <li>borrowernumber</li>
465
                                            <li>surname</li>
466
                                            <li>firstname</li>
464
                                        </ul>
467
                                        </ul>
465
                                    </dd>
468
                                    </dd>
466
                                </dl>
469
                                </dl>
(-)a/opac/ilsdi.pl (-2 / +1 lines)
Lines 47-53 my @services = ( Link Here
47
    #	Level 1: Basic Discovery Interfaces
47
    #	Level 1: Basic Discovery Interfaces
48
    #	'HarvestBibliographicRecords',       # OAI-PMH
48
    #	'HarvestBibliographicRecords',       # OAI-PMH
49
    #	'HarvestExpandedRecords',            # OAI-PMH
49
    #	'HarvestExpandedRecords',            # OAI-PMH
50
    'GetAvailability',    # FIXME Add bibbliographic level
50
    'GetAvailability',    # FIXME Add bibliographic level
51
51
52
    #	'GoToBibliographicRequestPage'       # I don't understant this one
52
    #	'GoToBibliographicRequestPage'       # I don't understant this one
53
    #	Level 2: Elementary OPAC supplement
53
    #	Level 2: Elementary OPAC supplement
54
- 

Return to bug 13990