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

(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (-1 / +2 lines)
Lines 311-314 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
311
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
311
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+1 lines)
Lines 312-314 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
313
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
313
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (-1 / +2 lines)
Lines 312-315 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
312
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
313
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
313
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/it-IT/necessari/sysprefs.sql (+1 lines)
Lines 299-301 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
299
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
299
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
300
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
300
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
302
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (-1 / +2 lines)
Lines 310-313 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
310
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
310
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
311
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
311
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
312
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
312
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 / +2 lines)
Lines 365-368 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
365
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
365
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsField','','The MARC field/subfield that contains alternate holdings information for bibs taht do not have items attached (e.g. 852abchi for libraries converting from MARC Magician).',NULL,'free');
366
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
366
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
367
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
367
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
368
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
368
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
369
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (+1 lines)
Lines 391-393 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
391
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
391
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('AlternateHoldingsSeparator','','The string to use to separate subfields in alternate holdings displays.',NULL,'free');
392
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
392
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
393
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
393
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
394
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+10 lines)
Lines 4332-4337 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
4332
    SetVersion($DBversion);
4332
    SetVersion($DBversion);
4333
}
4333
}
4334
4334
4335
$DBversion = "3.05.00.XXX";
4336
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
4337
    $dbh->do(qq{
4338
    INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
4339
    });
4340
    print "Upgrade to $DBversion done (Adds New System preference OpacRenewalBranch)\n";
4341
    SetVersion($DBversion);
4342
}
4343
4344
4335
=head1 FUNCTIONS
4345
=head1 FUNCTIONS
4336
4346
4337
=head2 DropAllForeignKeys($table)
4347
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref (+10 lines)
Lines 301-306 OPAC: Link Here
301
                  no: "Don't allow"
301
                  no: "Don't allow"
302
            - patrons to renew their own books on the OPAC.
302
            - patrons to renew their own books on the OPAC.
303
        -
303
        -
304
            - Use 
305
            - pref: OpacRenewalBranch
306
              choices:
307
                  itemhomebranch: "The Items' home branch"
308
                  patronhomebranch: "The Patrons' home branch"
309
                  checkoutbranch: "The branch the item was checked out from"
310
                  null: "NULL"
311
                  opacrenew: "OPACRenew"
312
            - as branchcode to store in the statistics table
313
        -
304
            - Only allow patrons to renew their own books on the OPAC if they have less than
314
            - Only allow patrons to renew their own books on the OPAC if they have less than
305
            - pref: OPACFineNoRenewals
315
            - pref: OPACFineNoRenewals
306
              class: currency
316
              class: currency
(-)a/opac/opac-renew.pl (-4 / +24 lines)
Lines 3-9 Link Here
3
#written 18/1/2000 by chris@katipo.co.nz
3
#written 18/1/2000 by chris@katipo.co.nz
4
# adapted for use in the hlt opac by finlay@katipo.co.nz 29/11/2002
4
# adapted for use in the hlt opac by finlay@katipo.co.nz 29/11/2002
5
# script to renew items from the web
5
# script to renew items from the web
6
# Parts Copyright 2010 Catalyst IT
6
# Parts Copyright 2010,2011 Catalyst IT
7
7
8
# This file is part of Koha.
8
# This file is part of Koha.
9
#
9
#
Lines 27-33 use warnings; Link Here
27
use CGI;
27
use CGI;
28
use C4::Circulation;
28
use C4::Circulation;
29
use C4::Auth;
29
use C4::Auth;
30
30
use C4::Items;
31
use C4::Members;
31
my $query = new CGI;
32
my $query = new CGI;
32
33
33
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
34
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Lines 48-54 my $errorstring=''; Link Here
48
for my $itemnumber ( @items ) {
49
for my $itemnumber ( @items ) {
49
    my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber );
50
    my ($status,$error) = CanBookBeRenewed( $borrowernumber, $itemnumber );
50
    if ( $status == 1 && $opacrenew == 1 ) {
51
    if ( $status == 1 && $opacrenew == 1 ) {
51
        AddRenewal( $borrowernumber, $itemnumber );
52
	my $renewalbranch = C4::Context->preference('OpacRenewalBranch');
53
	my $branchcode;
54
	if ($renewalbranch eq 'itemhomebranch'){
55
	    my $item = GetItem($itemnumber);
56
	    $branchcode=$item->{'homebranch'};
57
	}
58
	elsif ($renewalbranch eq 'patronhomebranch'){
59
	    my $borrower = GetMemberDetails($borrowernumber);
60
	    $branchcode = $borrower->{'branchcode'};
61
	}
62
	elsif ($renewalbranch eq 'checkoutbranch'){
63
	    my $issue = GetOpenIssue($itemnumber);
64
	    $branchcode = $issue->{'branchcode'};
65
	}
66
	elsif ($renewalbranch eq 'null'){
67
	    $branchcode='';
68
	}
69
	else {
70
	    $branchcode='OPACRenew'
71
	}
72
        AddRenewal( $borrowernumber, $itemnumber, $branchcode);
52
    }
73
    }
53
    else {
74
    else {
54
	$errorstring .= $error ."|";
75
	$errorstring .= $error ."|";
55
- 

Return to bug 5199