Bugzilla – Attachment 60525 Details for
Bug 18026
URL to database columns link in system preferences is incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18026: Correct URL to database columns from .pref files [16.11.x]
Bug-18026-Correct-URL-to-database-columns-from-pre.patch (text/plain), 7.26 KB, created by
Tomás Cohen Arazi (tcohen)
on 2017-02-21 14:55:10 UTC
(
hide
)
Description:
Bug 18026: Correct URL to database columns from .pref files [16.11.x]
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2017-02-21 14:55:10 UTC
Size:
7.26 KB
patch
obsolete
>From 7500341a6eb8bf2af8f6bfb83ffeeebdd6678ff9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 20 Feb 2017 10:49:11 +0100 >Subject: [PATCH] Bug 18026: Correct URL to database columns from .pref files > [16.11.x] > >Recently the DB schema website has been updated. >The link to the columns' tables is now > http://schema.koha-community.org/master/tables/table.html > http://schema.koha-community.org/16_11/tables/table.html > http://schema.koha-community.org/16_05/tables/table.html >instead of > http://schema.koha-community.org/tables/table.html > >To have a specific schema per Koha version. > >To avoid fixing this link every release this patch adds a __VERSION__ >marker to replace with the $version if stable ($version % 2) or 'master' > >Test plan: >On master, 16.11.x and 16.05.x >Search for PatronSelfRegistrationBorrowerUnwantedField, >BorrowerMandatoryField and UniqueItemFields >Click on the link >You should get the correct page > >This patch WILL NOT WORK on 3.22.x > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Template/Plugin/Koha.pm | 1 + > admin/preferences.pl | 9 +++++++++ > .../prog/en/modules/admin/preferences/acquisitions.pref | 2 +- > .../intranet-tmpl/prog/en/modules/admin/preferences/opac.pref | 6 +++--- > .../intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref | 4 ++-- > 5 files changed, 16 insertions(+), 6 deletions(-) > >diff --git a/Koha/Template/Plugin/Koha.pm b/Koha/Template/Plugin/Koha.pm >index fc26316758..0532a0479a 100644 >--- a/Koha/Template/Plugin/Koha.pm >+++ b/Koha/Template/Plugin/Koha.pm >@@ -51,6 +51,7 @@ sub Version { > > return { > major => $major, >+ minor => $minor, > release => $major . "." . $minor, > maintenance => $major . "." . $minor . "." . $maintenance, > development => ( $development ne '000' ) ? $development : undef, >diff --git a/admin/preferences.pl b/admin/preferences.pl >index ef2b643e76..032789fb82 100755 >--- a/admin/preferences.pl >+++ b/admin/preferences.pl >@@ -186,6 +186,15 @@ sub TransformPrefsToHTML { > push @chunks, $piece; > } > } else { >+ if ( $piece ) { >+ my $version = Koha::version(); >+ my ( $major, $minor, $maintenance, $development ) = split( '\.', $version ); >+ if ( $minor % 2 ) { >+ $piece =~ s|__VERSION__|${major}_${minor}|g; >+ } else { >+ $piece =~ s|__VERSION__|master|g; >+ } >+ } > push @chunks, { type_text => 1, contents => $piece }; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index 423de73337..5167dd7f43 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -9,7 +9,7 @@ Acquisitions: > receiving: receiving an order. > cataloguing: cataloging the record. > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/items.html' target='blank'>database columns</a> should be unique in an item:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/items.html' target='blank'>database columns</a> should be unique in an item:" > - pref: UniqueItemFields > - (separated by a space) > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index aca52309c6..e64cb43e46 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -728,17 +728,17 @@ OPAC: > class: integer > - "days." > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:" > - pref: PatronSelfRegistrationBorrowerMandatoryField > class: multi > - (separate columns with |) > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-registration screen:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-registration screen:" > - pref: PatronSelfRegistrationBorrowerUnwantedField > class: multi > - (separate columns with |) > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-modification screen:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron self-modification screen:" > - pref: PatronSelfModificationBorrowerUnwantedField > class: multi > - (separate columns with |) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 0748dbad60..4a85957613 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -24,12 +24,12 @@ Patrons: > no: "Don't" > - default the card number field on the patron addition screen to the next available card number (for example, if the largest currently used card number is 26345000012941, then this field will default to 26345000012942). > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> must be filled in on the patron entry screen:" > - pref: BorrowerMandatoryField > class: multi > - (separate columns with |) > - >- - "The following <a href='http://schema.koha-community.org/16_11/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:" >+ - "The following <a href='http://schema.koha-community.org/__VERSION__/tables/borrowers.html' target='blank'>database columns</a> will not appear on the patron entry screen:" > - pref: BorrowerUnwantedField > class: multi > - (separate columns with |) >-- >2.11.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18026
:
59704
|
60137
|
60138
|
60230
|
60231
|
60232
|
60233
|
60234
|
60235
|
60292
|
60420
|
60421
|
60422
|
60423
|
60456
|
60475
|
60476
|
60477
|
60478
|
60524
| 60525 |
60526