Bug 20941: (follow-up) Switch 'media' -> 'types'
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Mon, 8 Oct 2018 12:33:46 +0000 (13:33 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 31 Oct 2018 13:45:57 +0000 (13:45 +0000)
Clearing up the inconsistency mentioned in comment #35. There is one
place where we use the term 'media' for a template variable, everywhere
we refer to material types as 'types'.

NOTE: This is a breaking change for existing backends that still use
'media'. Of the PTFS Europe backends, only the Koha backend uses it,
this will be modified as necessary. Generally backends will supply this
variable themselves, so the breaking-ness of this change should be
minimal.

No test plan as it's backend dependent.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

ill/ill-requests.pl
opac/opac-illrequests.pl

index a2e898a..3a97969 100755 (executable)
@@ -273,7 +273,7 @@ if ( $backends_available ) {
 
 $template->param(
     backends   => $backends,
-    media      => [ "Book", "Article", "Journal" ],
+    types      => [ "Book", "Article", "Journal" ],
     query_type => $op,
     branches   => scalar Koha::Libraries->search,
 );
index 1fa1ce3..1b7807c 100755 (executable)
@@ -121,7 +121,7 @@ if ( $op eq 'list' ) {
             );
         } else {
             $template->param(
-                media       => [ "Book", "Article", "Journal" ],
+                types       => [ "Book", "Article", "Journal" ],
                 branches    => Koha::Libraries->search->unblessed,
                 whole       => $backend_result,
                 request     => $request