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

(-)a/offline_circ/service.pl (-13 / +24 lines)
Lines 33-56 my ($status, $cookie, $sessionId) = C4::Auth::check_api_auth($cgi, undef); Link Here
33
my $result;
33
my $result;
34
34
35
if ($status eq 'ok') { # if authentication is ok
35
if ($status eq 'ok') { # if authentication is ok
36
37
    my $userid     = $cgi->param('userid')     || '';
38
    my $branchcode = $cgi->param('branchcode') || '';
39
    my $timestamp  = $cgi->param('timestamp')  || '';
40
    my $action     = $cgi->param('action')     || '';
41
    my $barcode    = $cgi->param('barcode')    || '';
42
    $barcode    =~ s/^\s+//;
43
    $barcode    =~ s/\s+$//;
44
    my $cardnumber = $cgi->param('cardnumber') || '';
45
    $cardnumber =~ s/^\s+//;
46
    $cardnumber =~ s/\s+$//;
47
36
    if ( $cgi->param('pending') eq 'true' ) { # if the 'pending' flag is true, we store the operation in the db instead of directly processing them
48
    if ( $cgi->param('pending') eq 'true' ) { # if the 'pending' flag is true, we store the operation in the db instead of directly processing them
37
        $result = AddOfflineOperation(
49
        $result = AddOfflineOperation(
38
            $cgi->param('userid')     || '',
50
            $userid,
39
            $cgi->param('branchcode') || '',
51
            $branchcode,
40
            $cgi->param('timestamp')  || '',
52
            $timestamp,
41
            $cgi->param('action')     || '',
53
            $action,
42
            $cgi->param('barcode')    || '',
54
            $barcode,
43
            $cgi->param('cardnumber') || '',
55
            $cardnumber,
44
        );
56
        );
45
    } else {
57
    } else {
46
        $result = ProcessOfflineOperation(
58
        $result = ProcessOfflineOperation(
47
            {
59
            {
48
                'userid'      => $cgi->param('userid'),
60
                'userid'      => $userid,
49
                'branchcode'  => $cgi->param('branchcode'),
61
                'branchcode'  => $branchcode,
50
                'timestamp'   => $cgi->param('timestamp'),
62
                'timestamp'   => $timestamp,
51
                'action'      => $cgi->param('action'),
63
                'action'      => $action,
52
                'barcode'     => $cgi->param('barcode'),
64
                'barcode'     => $barcode,
53
                'cardnumber'  => $cgi->param('cardnumber'),
65
                'cardnumber'  => $cardnumber,
54
            }
66
            }
55
        );
67
        );
56
    }
68
    }
57
- 

Return to bug 9263