From 568fd7b90c10e359fdff1bede21f291df78ef0b8 Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Mon, 2 Feb 2009 16:06:21 +0100 Subject: [PATCH] Adding System Preference AllowNotForLoanOverride this system preference was created but not added to system preferences --- C4/Circulation.pm | 2 +- circ/circulation.pl | 2 +- installer/data/mysql/en/mandatory/sysprefs.sql | 3 ++- .../1-Obligatoire/unimarc_standard_systemprefs.sql | 3 ++- installer/data/mysql/updatedatabase30.pl | 10 ++++++++++ 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index cdf9ab70c4..85b848ce86 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -716,7 +716,7 @@ sub CanBookBeIssued { if ( $item->{'notforloan'} && $item->{'notforloan'} > 0 ) { - if(C4::Context->preference("AllowNotForLoanForcing")){ + if(C4::Context->preference("AllowNotForLoanOverride")){ $issuingimpossible{NOT_FOR_LOAN_CAN_FORCE} = 1; }else{ $issuingimpossible{NOT_FOR_LOAN} = 1; diff --git a/circ/circulation.pl b/circ/circulation.pl index 8097705e68..0edf97dccd 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -269,7 +269,7 @@ if ($barcode) { $inprocess = 1; } elsif ($issueconfirmed){ # FIXME: Do something? Or is this to *intentionally* do nothing? - if (C4::Context->preference("AllowNotForLoanForcing")){ + if (C4::Context->preference("AllowNotForLoanOverride")){ AddIssue( $borrower, $barcode, $datedue, $cancelreserve ); $template->param(IMPOSSIBLE => 0); $inprocess = 1; diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 15b07aa228..51e192baa6 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -211,4 +211,5 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES -- FIXME: add FrameworksLoaded, noOPACUserLogin, ReadingHistory ? INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SMSSendDriver','','','Sets which SMS::Send driver is used to send SMS messages.','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowRenewalLimitOverride', '0', 'if ON, allows renewal limits to be overridden on the circulation screen',NULL,'YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MergeAuthoritiesOnUpdate', '1', 'if ON, Updateing authorities will automatically updates biblios',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MergeAuthoritiesOnUpdate', '1', 'if ON, Updating authorities will automatically updates biblios',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowNotForLoanOverride', '0', 'if ON, enables the librarian to choose when they want to check out a notForLoan regular item',NULL,'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index e20af349c8..4ff710feb5 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -211,4 +211,5 @@ INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES('OpacSuppression', '0', '', 'Turn ON the OPAC Suppression feature, requires further setup, ask your system administrator for details', 'YesNo'); INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ('SMSSendDriver','','','Détermine le pilote utilisé par SMS::Send pour envoyer des SMS.','free'); INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowRenewalLimitOverride', '1', 'Si Activé, permet que les périodes de renouvellement puisse être positionnée manuellement durant la circulation',NULL,'YesNo'); -INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MergeAuthoritiesOnUpdate', '0', 'Si Activé, met à jour toutes les notices bibliographiques afférentes dès la modification d''une autorité',NULL,'YesNo'); \ No newline at end of file +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('MergeAuthoritiesOnUpdate', '0', 'Si Activé, met à jour toutes les notices bibliographiques afférentes dès la modification d''une autorité',NULL,'YesNo'); +INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowNotForLoanOverride', '0', 'Si activé, permet au bibliothécaire de choisir de prêter tout de même un exemplaire normalement exclu du prêt',NULL,'YesNo'); diff --git a/installer/data/mysql/updatedatabase30.pl b/installer/data/mysql/updatedatabase30.pl index b15ac9d121..677ef4f34d 100644 --- a/installer/data/mysql/updatedatabase30.pl +++ b/installer/data/mysql/updatedatabase30.pl @@ -140,6 +140,16 @@ ENDOFSQL3 SetVersion ($DBversion); } +$DBversion = "3.00.01.005"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do(<