Bug 19383: DBRev 18.06.00.022
authorNick Clemens <nick@bywatersolutions.com>
Thu, 30 Aug 2018 20:13:37 +0000 (20:13 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 30 Aug 2018 20:13:37 +0000 (20:13 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Koha.pm
installer/data/mysql/atomicupdate/bug_19383.sql [deleted file]
installer/data/mysql/updatedatabase.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

diff --git a/Koha.pm b/Koha.pm
index d50702d..45e49c7 100644 (file)
--- a/Koha.pm
+++ b/Koha.pm
@@ -29,7 +29,7 @@ use vars qw{ $VERSION };
 # - #4 : the developer version. The 4th number is the database subversion.
 #        used by developers when the database changes. updatedatabase take care of the changes itself
 #        and is automatically called by Auth.pm when needed.
-$VERSION = "18.06.00.021";
+$VERSION = "18.06.00.022";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/bug_19383.sql b/installer/data/mysql/atomicupdate/bug_19383.sql
deleted file mode 100644 (file)
index 0fd6ab3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
-('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'),
-('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo');
index c168930..bfb528c 100755 (executable)
@@ -16327,6 +16327,18 @@ if( CheckVersion( $DBversion ) ) {
     print "Upgrade to $DBversion done (Bug 21068 - Remove system preferences NorwegianPatronDB*)\n";
 }
 
+$DBversion = '18.06.00.022';
+if( CheckVersion( $DBversion ) ) {
+    my $dbh = C4::Context->dbh;
+    $dbh->do(q|
+        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
+        ('HoldsAutoFill','0',NULL,'If on, librarian will not be asked if hold should be filled, it will be filled automatically','YesNo'),
+        ('HoldsAutoFillPrintSlip','0',NULL,'If on, hold slip print dialog will be displayed automatically','YesNo')
+    |);
+    SetVersion( $DBversion );
+    print "Upgrade to $DBversion done (Bug 19383 - Add ability to print hold receipts automatically)\n";
+}
+
 # SEE bug 13068
 # if there is anything in the atomicupdate, read and execute it.
 
index 5306ff2..74b24f6 100644 (file)
     [% IF hold_auto_filled %]
         <div class="dialog alert hold-auto-filled">
             [% IF ( reservenotes ) %]
-                <h4>Notes: [% reservenotes %]</h4>
+                <h4>Notes: [% reservenotes | html %]</h4>
             [% END %]
             <h3>Hold filled for:</h3>
                 <li>
                     [% INCLUDE 'patron-title.inc' patron=patron %]
-                    <span class="patron-category"> - [% patron.category.description %]</span>
+                    <span class="patron-category"> - [% patron.category.description | html %]</span>
                 </li>
 
                 [% INCLUDE display_holdpatron_address %]
 
                 [% IF ( patron.phone ) %]
-                    <li>[% patron.phone  %]</li>
+                    <li>[% patron.phone | html %]</li>
                 [% END %]
 
                 [% IF ( patron.email ) %]
                     <li>
                         [% IF ( transfertodo ) %]
-                            [% patron.email %]
+                            [% patron.email | html %]
                         [% ELSE %]
-                            <a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>
+                            <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
                         [% END %]
                     </li>
                 [% END %]
@@ -92,9 +92,9 @@
                 [% END %]
 
             [% IF ( transfertodo ) %]
-                <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
+                <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
             [% ELSE %]
-                <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) %]</h4>
+                <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
             [% END %]
 
             <a href="#" class="btn btn-default print print-slip">
 
             $(".print-slip").on('click', function(e) {
                 e.preventDefault();
-                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
+                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber | html %]&amp;biblionumber=[% biblionumber | html %]');
             });
 
             [% IF print_slip %]