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

(-)a/C4/Auth.pm (-1 / +1 lines)
Lines 182-188 sub get_template_and_user { Link Here
182
    }
182
    }
183
183
184
184
185
    # If the user logged in is the SCO user and he tries to go out the SCO module, log the user out removing the CGISESSID cookie
185
    # If the user logged in is the SCO user and he or she tries to go out the SCO module, log the user out removing the CGISESSID cookie
186
    if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sco/| ) {
186
    if ( $in->{type} eq 'opac' and $in->{template_name} !~ m|sco/| ) {
187
        if (  C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) {
187
        if (  C4::Context->preference('AutoSelfCheckID') && $user eq C4::Context->preference('AutoSelfCheckID') ) {
188
            $template = C4::Templates::gettemplate( 'opac-auth.tt', 'opac', $in->{query} );
188
            $template = C4::Templates::gettemplate( 'opac-auth.tt', 'opac', $in->{query} );
(-)a/C4/Circulation.pm (-2 / +2 lines)
Lines 2220-2226 C<$datedue> date due DateTime object Link Here
2220
C<$return_date> DateTime object representing the return time
2220
C<$return_date> DateTime object representing the return time
2221
2221
2222
Internal function, called only by AddReturn that calculates and updates
2222
Internal function, called only by AddReturn that calculates and updates
2223
 the user fine days, and debars him if necessary.
2223
 the user fine days, and debars him or her if necessary.
2224
2224
2225
Should only be called for overdue returns
2225
Should only be called for overdue returns
2226
2226
Lines 3853-3859 sub IsItemIssued { Link Here
3853
  my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions, $borrower);
3853
  my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions, $borrower);
3854
  my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions);
3854
  my ($ageRestriction, $daysToAgeRestriction) = GetAgeRestriction($record_restrictions);
3855
3855
3856
  if($daysToAgeRestriction <= 0) { #Borrower is allowed to access this material, as he is older or as old as the agerestriction }
3856
  if($daysToAgeRestriction <= 0) { #Borrower is allowed to access this material, as he or she is older or as old as the agerestriction }
3857
  if($daysToAgeRestriction > 0) { #Borrower is this many days from meeting the agerestriction }
3857
  if($daysToAgeRestriction > 0) { #Borrower is this many days from meeting the agerestriction }
3858
3858
3859
@PARAM1 the koha.biblioitems.agerestriction value, like K18, PEGI 13, ...
3859
@PARAM1 the koha.biblioitems.agerestriction value, like K18, PEGI 13, ...
(-)a/C4/SIP/t/06patron_enable.t (-2 / +2 lines)
Lines 31-38 my $patron_enable_test_template = { Link Here
31
		 required => 1, },
31
		 required => 1, },
32
	       ], };
32
	       ], };
33
33
34
# We need to disable the valid patron before we can 
34
# We need to disable the valid patron before we can
35
# ensure that he was properly enabled.
35
# ensure that he or she was properly enabled.
36
my $patron_disable_test_template = {
36
my $patron_disable_test_template = {
37
    id => 'Patron Enable: block patron (prep to test enabling)',
37
    id => 'Patron Enable: block patron (prep to test enabling)',
38
    msg => "01N20060102    084238AO$instid|ALBlocked patron for SIP test.|AA$user_barcode|",
38
    msg => "01N20060102    084238AO$instid|ALBlocked patron for SIP test.|AA$user_barcode|",
(-)a/C4/Suggestions.pm (-2 / +2 lines)
Lines 63-69 The functions in this module deal with the aqorders in OPAC and in librarian int Link Here
63
63
64
A suggestion is done in the OPAC. It has the status "ASKED"
64
A suggestion is done in the OPAC. It has the status "ASKED"
65
65
66
When a librarian manages the suggestion, he can set the status to "REJECTED" or "ACCEPTED".
66
When a librarian manages the suggestion, he or she can set the status to "REJECTED" or "ACCEPTED".
67
67
68
When the book is ordered, the suggestion status becomes "ORDERED"
68
When the book is ordered, the suggestion status becomes "ORDERED"
69
69
Lines 554-560 sub ConnectSuggestionAndBiblio { Link Here
554
554
555
&DelSuggestion($borrowernumber,$ordernumber)
555
&DelSuggestion($borrowernumber,$ordernumber)
556
556
557
Delete a suggestion. A borrower can delete a suggestion only if he is its owner.
557
Delete a suggestion. A borrower can delete a suggestion only if he or she is its owner.
558
558
559
=cut
559
=cut
560
560
(-)a/acqui/addorderiso2709.pl (-1 / +1 lines)
Lines 2-8 Link Here
2
2
3
#A script that lets the user populate a basket from an iso2709 file
3
#A script that lets the user populate a basket from an iso2709 file
4
#the script first displays a list of import batches, then when a batch is selected displays all the biblios in it.
4
#the script first displays a list of import batches, then when a batch is selected displays all the biblios in it.
5
#The user can then pick which biblios he wants to order
5
#The user can then pick which biblios he or she wants to order
6
6
7
# Copyright 2008 - 2011 BibLibre SARL
7
# Copyright 2008 - 2011 BibLibre SARL
8
#
8
#
(-)a/acqui/neworderempty.pl (-4 / +4 lines)
Lines 153-162 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
153
#look for duplicates
153
#look for duplicates
154
    ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord);
154
    ($biblionumber,$duplicatetitle) = FindDuplicate($marcrecord);
155
    if($biblionumber && !$input->param('use_external_source')) {
155
    if($biblionumber && !$input->param('use_external_source')) {
156
	#if duplicate record found and user did not decide yet, first warn user
156
        #if duplicate record found and user did not decide yet, first warn user
157
	#and let him choose between using new record or existing record
157
        #and let him or her choose between using new record or existing record
158
	Load_Duplicate($duplicatetitle);
158
        Load_Duplicate($duplicatetitle);
159
	exit;
159
        exit;
160
    }
160
    }
161
    #from this point: add a new record
161
    #from this point: add a new record
162
        if (C4::Context->preference("BiblioAddsAuthorities")){
162
        if (C4::Context->preference("BiblioAddsAuthorities")){
(-)a/acqui/parcel.pl (-1 / +1 lines)
Lines 28-34 parcel.pl Link Here
28
=head1 DESCRIPTION
28
=head1 DESCRIPTION
29
29
30
This script shows all orders receipt or pending for a given supplier.
30
This script shows all orders receipt or pending for a given supplier.
31
It allows to write an order as 'received' when he arrives.
31
It allows to write an order as 'received' when it arrives.
32
32
33
=head1 CGI PARAMETERS
33
=head1 CGI PARAMETERS
34
34
(-)a/acqui/parcels.pl (-1 / +1 lines)
Lines 29-35 parcels.pl Link Here
29
=head1 DESCRIPTION
29
=head1 DESCRIPTION
30
30
31
This script shows all orders/parcels receipt or pending for a given supplier.
31
This script shows all orders/parcels receipt or pending for a given supplier.
32
It allows to write an order/parcels as 'received' when he arrives.
32
It allows to write an order/parcels as 'received' when it arrives.
33
33
34
=head1 CGI PARAMETERS
34
=head1 CGI PARAMETERS
35
35
(-)a/cataloguing/additem.pl (-1 / +1 lines)
Lines 527-533 if ($op eq "additem") { Link Here
527
        my $oldbarcode = $addedolditem->{'barcode'};
527
        my $oldbarcode = $addedolditem->{'barcode'};
528
        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
528
        my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
529
529
530
	# If there is a barcode and we can't find him new values, we can't add multiple copies
530
	# If there is a barcode and we can't find him or her new values, we can't add multiple copies
531
	my $testbarcode;
531
	my $testbarcode;
532
        $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
532
        $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj;
533
	if ($oldbarcode && !$testbarcode) {
533
	if ($oldbarcode && !$testbarcode) {
(-)a/installer/install.pl (-1 / +1 lines)
Lines 226-232 elsif ( $step && $step == 3 ) { Link Here
226
    elsif ( $op && $op eq 'selectframeworks' ) {
226
    elsif ( $op && $op eq 'selectframeworks' ) {
227
        #
227
        #
228
        #
228
        #
229
        # 1ST install, 2nd sub-step : show the user the sql datas he can insert in the database.
229
        # 1ST install, 2nd sub-step : show the user the sql datas he or she can insert in the database.
230
        #
230
        #
231
        #
231
        #
232
        # (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks)
232
        # (note that the term "selectframeworks is not correct. The user can select various files, not only frameworks)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt (-1 / +1 lines)
Lines 316-322 function confirm_deletion() { Link Here
316
316
317
<fieldset class="action">    [% IF ( opisadd ) %]
317
<fieldset class="action">    [% IF ( opisadd ) %]
318
    <input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" />
318
    <input type="submit" name="phony_submit" value="phony_submit" id="phony_submit" style="display:none;" onclick="return false;" />
319
    <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe he validated the adding of multiple items
319
    <!-- Note : We use here a false submit button because we have several submit buttons and we don't want the user to believe he or she validated the adding of multiple items
320
		when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button.
320
		when pressing the enter key, while in fact it is the first submit button that is validated, in our case the "add (single) item" button.
321
		It is a bit tricky, but necessary in the sake of UI correctness.
321
		It is a bit tricky, but necessary in the sake of UI correctness.
322
    -->
322
    -->
(-)a/koha-tmpl/intranet-tmpl/prog/js/basketgroup.js (-1 / +2 lines)
Lines 241-247 function closeandprint(bg){ Link Here
241
    }
241
    }
242
}
242
}
243
243
244
//function that lets the user unclose a basketgroup as long as he hasn't submitted the changes to the page.
244
//function that lets the user unclose a basketgroup
245
//as long as he or she hasn't submitted the changes to the page.
245
function unclosegroup(bgid){
246
function unclosegroup(bgid){
246
    var div = document.getElementById('basketgroup-'+bgid+'-closed').parentNode;
247
    var div = document.getElementById('basketgroup-'+bgid+'-closed').parentNode;
247
    var divtodel = document.getElementById('unclose-' + bgid);
248
    var divtodel = document.getElementById('unclose-' + bgid);
(-)a/mainpage.pl (-1 / +1 lines)
Lines 85-91 $template->param( Link Here
85
);
85
);
86
86
87
#
87
#
88
# warn user if he is using mysql/admin login
88
# warn user if he or she is using mysql/admin login
89
#
89
#
90
unless ($loggedinuser) {
90
unless ($loggedinuser) {
91
    $template->param(adminWarning => 1);
91
    $template->param(adminWarning => 1);
(-)a/misc/export_borrowers.pl (-1 / +1 lines)
Lines 96-102 unless ( $separator ) { Link Here
96
96
97
my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } );
97
my $csv = Text::CSV->new( { sep_char => $separator, binary => 1 } );
98
98
99
# If the user did not specify any field to export, we assume he wants them all
99
# If the user did not specify any field to export, we assume he or she wants them all
100
# We retrieve the first borrower informations to get field names
100
# We retrieve the first borrower informations to get field names
101
my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export";
101
my ($borrowernumber) = $sth->fetchrow_array or die "No borrower to export";
102
my $member = GetMember($borrowernumber); # FIXME Now is_expired is no longer available
102
my $member = GetMember($borrowernumber); # FIXME Now is_expired is no longer available
(-)a/misc/migration_tools/bulkmarcimport.pl (-1 / +1 lines)
Lines 694-700 If specified, data will be appended to the logfile. If not, the logfile will be Link Here
694
694
695
=item B<-t, -test>
695
=item B<-t, -test>
696
696
697
Test mode: parses the file, saying what he would do, but doing nothing.
697
Test mode: parses the file, saying what it would do, but doing nothing.
698
698
699
=item B<-s>
699
=item B<-s>
700
700
(-)a/opac/opac-discharge.pl (-1 / +1 lines)
Lines 92-98 else { Link Here
92
        pending        => 1,
92
        pending        => 1,
93
    });
93
    });
94
    # FIXME looks like $available is not needed
94
    # FIXME looks like $available is not needed
95
    # If a patron is discharged he has a validated discharge available
95
    # If a patron is discharged he or she has a validated discharge available
96
    my $available = Koha::Patron::Discharge::count({
96
    my $available = Koha::Patron::Discharge::count({
97
        borrowernumber => $loggedinuser,
97
        borrowernumber => $loggedinuser,
98
        validated      => 1,
98
        validated      => 1,
(-)a/opac/opac-user.pl (-1 / +1 lines)
Lines 101-107 if ($debar) { Link Here
101
        $borr->{'userdebarreddate'} = $debar;
101
        $borr->{'userdebarreddate'} = $debar;
102
    }
102
    }
103
    # FIXME looks like $available is not needed
103
    # FIXME looks like $available is not needed
104
    # If a patron is discharged he has a validated discharge available
104
    # If a patron is discharged he or she has a validated discharge available
105
    my $available = Koha::Patron::Discharge::count({
105
    my $available = Koha::Patron::Discharge::count({
106
        borrowernumber => $borrowernumber,
106
        borrowernumber => $borrowernumber,
107
        validated      => 1,
107
        validated      => 1,
(-)a/reserve/request.pl (-1 / +1 lines)
Lines 135-141 if ($borrowernumber_hold && !$action) { Link Here
135
    my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold );
135
    my $borrowerinfo = GetMember( borrowernumber => $borrowernumber_hold );
136
    my $diffbranch;
136
    my $diffbranch;
137
137
138
    # we check the reserves of the borrower, and if he can reserv a document
138
    # we check the reserves of the borrower, and if he or she can reserve a document
139
    # FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ...
139
    # FIXME At this time we have a simple count of reservs, but, later, we could improve the infos "title" ...
140
140
141
    my $reserves_count =
141
    my $reserves_count =
(-)a/t/db_dependent/Circulation.t (-3 / +3 lines)
Lines 1234-1240 subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { Link Here
1234
1234
1235
    my ( $error, $question, $alerts );
1235
    my ( $error, $question, $alerts );
1236
1236
1237
    # Patron cannot issue item_1, he has overdues
1237
    # Patron cannot issue item_1, he or she has overdues
1238
    my $yesterday = DateTime->today( time_zone => C4::Context->tz() )->add( days => -1 );
1238
    my $yesterday = DateTime->today( time_zone => C4::Context->tz() )->add( days => -1 );
1239
    my $issue = AddIssue( $patron, $item_1->{barcode}, $yesterday );    # Add an overdue
1239
    my $issue = AddIssue( $patron, $item_1->{barcode}, $yesterday );    # Add an overdue
1240
1240
Lines 1248-1254 subtest 'CanBookBeIssued + Koha::Patron->is_debarred|has_overdues' => sub { Link Here
1248
    is( keys(%$question) + keys(%$alerts), 0 );
1248
    is( keys(%$question) + keys(%$alerts), 0 );
1249
    is( $error->{USERBLOCKEDOVERDUE},      1 );
1249
    is( $error->{USERBLOCKEDOVERDUE},      1 );
1250
1250
1251
    # Patron cannot issue item_1, he is debarred
1251
    # Patron cannot issue item_1, he or she is debarred
1252
    my $tomorrow = DateTime->today( time_zone => C4::Context->tz() )->add( days => 1 );
1252
    my $tomorrow = DateTime->today( time_zone => C4::Context->tz() )->add( days => 1 );
1253
    Koha::Patron::Debarments::AddDebarment( { borrowernumber => $patron->{borrowernumber}, expiration => $tomorrow } );
1253
    Koha::Patron::Debarments::AddDebarment( { borrowernumber => $patron->{borrowernumber}, expiration => $tomorrow } );
1254
    ( $error, $question, $alerts ) = CanBookBeIssued( $patron, $item_2->{barcode} );
1254
    ( $error, $question, $alerts ) = CanBookBeIssued( $patron, $item_2->{barcode} );
Lines 1478-1484 subtest 'AddReturn + CumulativeRestrictionPeriods' => sub { Link Here
1478
    );
1478
    );
1479
    $rule->store();
1479
    $rule->store();
1480
1480
1481
    # Patron cannot issue item_1, he has overdues
1481
    # Patron cannot issue item_1, he or she has overdues
1482
    my $five_days_ago = dt_from_string->subtract( days => 5 );
1482
    my $five_days_ago = dt_from_string->subtract( days => 5 );
1483
    my $ten_days_ago  = dt_from_string->subtract( days => 10 );
1483
    my $ten_days_ago  = dt_from_string->subtract( days => 10 );
1484
    AddIssue( $patron, $item_1->{barcode}, $five_days_ago );    # Add an overdue
1484
    AddIssue( $patron, $item_1->{barcode}, $five_days_ago );    # Add an overdue
(-)a/t/db_dependent/Koha/Patrons.t (-1 / +1 lines)
Lines 412-418 subtest 'add_enrolment_fee_if_needed' => sub { Link Here
412
    ($total) = C4::Members::GetMemberAccountRecords($borrowernumber);
412
    ($total) = C4::Members::GetMemberAccountRecords($borrowernumber);
413
    is( $total,
413
    is( $total,
414
        $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA,
414
        $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA,
415
        "Juvenile growing and become an young adult, he should pay " . ( $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA )
415
        "Juvenile growing and become an young adult, he or she should pay " . ( $enrolmentfee_K + $enrolmentfee_J + $enrolmentfee_YA )
416
    );
416
    );
417
417
418
    $patron->delete;
418
    $patron->delete;
(-)a/t/db_dependent/Reserves.t (-3 / +2 lines)
Lines 535-547 C4::Biblio::ModBiblio( $record, $bibnum, $frameworkcode ); Link Here
535
535
536
is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'OK', "Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds" );
536
is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'OK', "Reserving an ageRestricted Biblio without a borrower dateofbirth succeeds" );
537
537
538
#Set the dateofbirth for the Borrower making him "too young".
538
#Set the dateofbirth for the Borrower making him or her "too young".
539
$borrower->{dateofbirth} = DateTime->now->add( years => -15 );
539
$borrower->{dateofbirth} = DateTime->now->add( years => -15 );
540
C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} );
540
C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} );
541
541
542
is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'ageRestricted', "Reserving a 'PEGI 16' Biblio by a 15 year old borrower fails");
542
is( C4::Reserves::CanBookBeReserved($borrowernumber, $biblionumber) , 'ageRestricted', "Reserving a 'PEGI 16' Biblio by a 15 year old borrower fails");
543
543
544
#Set the dateofbirth for the Borrower making him "too old".
544
#Set the dateofbirth for the Borrower making him or her "too old".
545
$borrower->{dateofbirth} = DateTime->now->add( years => -30 );
545
$borrower->{dateofbirth} = DateTime->now->add( years => -30 );
546
C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} );
546
C4::Members::ModMember( borrowernumber => $borrowernumber, dateofbirth => $borrower->{dateofbirth} );
547
547
548
- 

Return to bug 18432