Tree:
9032c41575
16.05.x
16.11.x
17.05.x
17.11.x
18.05.x
18.11.x
19.05.x
19.11.x
20.05.x
20.11.x
21.05.x
21.11.x
22.05.x
22.11.x
23.05.x
23.11.x
3.0.x
3.10.x
3.12.x
3.14.x
3.16.x
3.18.x
3.2.x
3.20.x
3.22.x
3.4.x
3.6.x
3.6.x-maint/testing
3.6.x-rmaint/testing
3.8.x
MM-OPAC/theme_dep
main
new/bootstrap-opac
new_12478_elasticsearch
3.0.5_rc1
3.02.02
R_1-1-1RC1
R_1-2-1
R_1-2-1RC6
R_1-2-2
R_1-2-2RC4
R_1-2-3
R_1-2-3RC11
R_1-2-3RC12
R_1-2-3RC13
R_1-2-3RC14
R_1-2-3RC15
R_1-2-3RC16
R_1-2-3RC17
R_1-2-3RC18
R_1-2-3RC20
R_1-2-3RC21
R_1-2-3RC22
R_1-2-3RC23
R_1-2-3RC25
R_1-2-3RC26
R_1-2-3RC5
R_1-3-0
R_1-3-1
R_1-3-2
R_1-3-3
R_1-9-0
R_1-9-1
R_1-9-2
R_1-9-3
R_2-0-0
R_2-0-0RC1
R_2-0-0RC2
R_2-0-0RC3
R_2-0-0RC4
R_2-0-0pre1
R_2-0-0pre2
R_2-0-0pre3
R_2-0-0pre4
R_2-0-0pre5
R_2-1
R_2-2-6
R_2-2-6RC2
R_2-2-6RC3
R_2-2-6RC4
R_2-2-7
R_2-2-9
R_2-3-0
R_2-4
R_2_2_4
R_2_2_5
R_2_2_6_RC
dev_week
html_template_pro
rel_3_0_5
v16.05.00
v16.05.00-beta
v16.05.01
v16.05.02
v16.05.02-01
v16.05.03
v16.05.04
v16.05.05
v16.05.05-01
v16.05.06
v16.05.06-01
v16.05.07
v16.05.08
v16.05.09
v16.05.10
v16.05.11
v16.05.12
v16.05.13
v16.05.14
v16.05.15
v16.05.16
v16.05.17
v16.05.18
v16.05.19
v16.11.00
v16.11.01
v16.11.02
v16.11.03
v16.11.04
v16.11.05
v16.11.06
v16.11.07
v16.11.08
v16.11.09
v16.11.10
v16.11.11
v16.11.11-1
v16.11.12
v16.11.13
v16.11.14
v16.11.15
v16.11.16
v17.05.00
v17.05.01
v17.05.02
v17.05.03
v17.05.04
v17.05.05
v17.05.06
v17.05.07
v17.05.08
v17.05.09
v17.05.10
v17.05.11
v17.05.12
v17.05.13
v17.05.14
v17.11.00
v17.11.01
v17.11.02
v17.11.03
v17.11.04
v17.11.05
v17.11.06
v17.11.07
v17.11.08
v17.11.09
v17.11.10
v17.11.11
v17.11.12
v17.11.13
v17.11.14
v17.11.15
v17.11.16
v17.11.17
v17.11.18
v18.05.00
v18.05.00-rc1
v18.05.00-rc2
v18.05.01
v18.05.02
v18.05.03
v18.05.04
v18.05.05
v18.05.06
v18.05.07
v18.05.08
v18.05.09
v18.05.10
v18.05.11
v18.05.12
v18.05.13
v18.05.14
v18.11.00
v18.11.01
v18.11.02
v18.11.03
v18.11.04
v18.11.05
v18.11.06
v18.11.07
v18.11.08
v18.11.09
v18.11.10
v18.11.11
v18.11.12
v18.11.13
v18.11.14
v18.11.15
v18.11.16
v19.05.00
v19.05.01
v19.05.02
v19.05.03
v19.05.04
v19.05.05
v19.05.05-1
v19.05.06
v19.05.07
v19.05.08
v19.05.09
v19.05.10
v19.05.11
v19.05.12
v19.05.13
v19.05.14
v19.05.15
v19.05.16
v19.05.17
v19.11.00
v19.11.01
v19.11.02
v19.11.03
v19.11.04
v19.11.05
v19.11.06
v19.11.07
v19.11.08
v19.11.09
v19.11.10
v19.11.11
v19.11.12
v19.11.13
v19.11.14
v19.11.15
v19.11.16
v19.11.17
v19.11.18
v19.11.18-2
v19.11.19
v19.11.20
v19.11.21
v19.11.22
v19.11.23
v19.11.24
v19.11.25
v19.11.26
v19.11.27
v19.11.28
v19.11.29
v20.05.00
v20.05.01
v20.05.02
v20.05.03
v20.05.04
v20.05.05
v20.05.06
v20.05.07
v20.05.08
v20.05.09
v20.05.10
v20.05.11
v20.05.12
v20.05.13
v20.05.14
v20.05.15
v20.05.16
v20.05.17
v20.05.18
v20.11.00
v20.11.01
v20.11.02
v20.11.03
v20.11.04
v20.11.05
v20.11.06
v20.11.07
v20.11.08
v20.11.09
v20.11.10
v20.11.11
v20.11.12
v20.11.13
v20.11.15
v20.11.16
v20.11.17
v20.11.18
v20.11.19
v21.05.00
v21.05.01
v21.05.02
v21.05.03
v21.05.04
v21.05.05
v21.05.06
v21.05.07
v21.05.08
v21.05.09
v21.05.10
v21.05.11
v21.05.12
v21.05.13
v21.05.14
v21.05.15
v21.05.16
v21.05.17
v21.05.18
v21.05.19
v21.05.20
v21.05.21
v21.05.22
v21.05.22-1
v21.05.22-2
v21.11.00
v21.11.01
v21.11.02
v21.11.03
v21.11.04
v21.11.04-1
v21.11.05
v21.11.06
v21.11.07
v21.11.08
v21.11.09
v21.11.10
v21.11.11
v21.11.12
v21.11.13
v21.11.14
v21.11.15
v21.11.16
v21.11.17
v21.11.18
v21.11.19
v21.11.20
v21.11.21
v21.11.21-1
v21.11.22
v21.11.23
v21.11.24
v21.11.25
v21.11.26
v22.05.00
v22.05.01
v22.05.02
v22.05.03
v22.05.03-1
v22.05.04
v22.05.05
v22.05.05-01
v22.05.06
v22.05.07
v22.05.08
v22.05.09
v22.05.10
v22.05.11
v22.05.12
v22.05.13
v22.05.14
v22.05.15
v22.05.16
v22.05.17
v22.05.18
v22.05.19
v22.05.20
v22.05.20-2
v22.05.21
v22.11.00
v22.11.01
v22.11.02
v22.11.03
v22.11.04
v22.11.05
v22.11.05-1
v22.11.06
v22.11.07
v22.11.08
v22.11.09
v22.11.10
v22.11.11
v22.11.12
v22.11.13
v22.11.14
v22.11.15
v22.11.15-1
v22.11.16
v22.11.16-1
v22.11.17
v23.05.00
v23.05.01
v23.05.02
v23.05.03
v23.05.04
v23.05.05
v23.05.06
v23.05.07
v23.05.08
v23.05.09
v23.05.09-01
v23.05.10
v23.05.10-02
v23.05.11
v23.11.00
v23.11.01
v23.11.02
v23.11.03
v23.11.04
v23.11.04-4
v23.11.05
v3.0.6
v3.00.00
v3.00.00-alpha
v3.00.00-beta
v3.00.00-beta2
v3.00.00-stableRC1
v3.00.01-stable
v3.00.01-stable_update
v3.00.01.005
v3.00.02-final
v3.00.02-stable
v3.00.03
v3.00.04
v3.00.04_final
v3.00.04_fixed
v3.00.05
v3.00.06
v3.02.00
v3.02.00-alpha
v3.02.00-alpha2
v3.02.00-beta
v3.02.00-rc
v3.02.01
v3.02.03
v3.02.04
v3.02.05
v3.02.06
v3.02.07
v3.02.08
v3.02.09
v3.02.10
v3.02.11
v3.04.00
v3.04.01
v3.04.02
v3.04.03
v3.04.04
v3.04.05
v3.04.06
v3.04.07
v3.04.08
v3.06.00
v3.06.01
v3.06.02
v3.06.03
v3.06.04
v3.06.05
v3.06.06
v3.06.07
v3.06.08
v3.06.09
v3.06.10
v3.06.10.000
v3.06.11
v3.06.12.000
v3.08.00
v3.08.01
v3.08.02
v3.08.03
v3.08.04
v3.08.05
v3.08.06
v3.08.07
v3.08.08
v3.08.09
v3.08.10
v3.08.11
v3.08.12
v3.08.13
v3.08.14
v3.08.15
v3.08.16
v3.08.17
v3.08.18
v3.08.19
v3.08.20
v3.08.21
v3.08.22
v3.08.23
v3.08.24
v3.10.00
v3.10.01
v3.10.02
v3.10.03
v3.10.04
v3.10.05
v3.10.06
v3.10.07
v3.10.08
v3.10.09
v3.10.10
v3.10.11
v3.10.12
v3.10.13
v3.12.00
v3.12.00-alpha
v3.12.00-alpha2
v3.12.00-beta1
v3.12.00-beta3
v3.12.00-rc1
v3.12.00-rc2
v3.12.00-rc3
v3.12.01
v3.12.02
v3.12.03
v3.12.04
v3.12.05
v3.12.06
v3.12.07
v3.12.08
v3.12.09
v3.12.10
v3.12.11
v3.12.12
v3.12.13
v3.12.14
v3.12.15
v3.14.00
v3.14.00-alpha1
v3.14.00-alpha2
v3.14.00-beta
v3.14.01
v3.14.02
v3.14.03
v3.14.04
v3.14.05
v3.14.06
v3.14.07
v3.14.08
v3.14.09
v3.14.10
v3.14.11
v3.14.12
v3.14.13
v3.14.14
v3.14.15
v3.14.16
v3.14.17
v3.16.00
v3.16.00-beta
v3.16.00-pkg
v3.16.00-rc
v3.16.01
v3.16.02
v3.16.03
v3.16.04
v3.16.05
v3.16.05.1
v3.16.06
v3.16.07
v3.16.08
v3.16.09
v3.16.10
v3.16.11
v3.16.12
v3.16.13
v3.16.14
v3.16.15
v3.18.00
v3.18.00-beta
v3.18.01
v3.18.02
v3.18.03
v3.18.04
v3.18.05
v3.18.05.1
v3.18.06
v3.18.06-3
v3.18.07
v3.18.08
v3.18.09
v3.18.10
v3.18.11
v3.18.12
v3.18.13
v3.20.00
v3.20.00-beta
v3.20.01
v3.20.02
v3.20.03
v3.20.04
v3.20.05
v3.20.06
v3.20.07
v3.20.07.1
v3.20.08
v3.20.09
v3.20.10
v3.20.11
v3.20.12
v3.20.13
v3.20.14
v3.20.15
v3.22.00
v3.22.00-beta
v3.22.01
v3.22.02
v3.22.03
v3.22.04
v3.22.05
v3.22.06
v3.22.07
v3.22.08
v3.22.09
v3.22.10
v3.22.11
v3.22.12
v3.22.13
v3.22.14
v3.22.15
v3.22.16
v3.22.17
v3.22.18
v3.22.19
v3.22.20
v3.22.21
v3.8.16
version-1-2-0
version-1-2-1
${ noResults }
82 Commits (9032c41575597ef7870f0af7a7afd1f40f4e2bfb)
Author | SHA1 | Message | Date |
---|---|---|---|
Owen Leonard | 59ff962caa |
Bug 26019: Koha should set SameSite attribute on cookies
This patch modifies the way Koha sets cookies so that the "sameSite" attribute is explicitly set to "Lax." This option is chosen because it is the value which is currently assumed by browsers when the sameSite attribute is not set. To test, apply the patch and restart services. - Log in to the staff interface and open your browser's developer tools. - In Firefox, look for a "Storage" tab. - In Chrome, look for an "Application" tab. - Under "Cookies," click the URL of the staff interface. - You should see all the cookies which are set for that domain. - The CGISESSID cookie should have sameSite set to "Lax." - Go to Cataloging -> New record. - Check the "marcdocs" and "marctags" cookies. - Switch to the Advanced MARC editor (you may need to enable theEnableAdvancedCatalogingEditor preference). - Check the "catalogue_editor" cookie. - Add a new item to an existing bibliographic record. - Check the "LastCreatedItem" cookie which is set after you save the new item. - Go to Authorities -> Authority search. - In authority search results, click "Merge" from the "Actions" menu next to one of the results.. - Check the "auth_to_merge" cookie. - Go to Administration -> MARC bibliographic framework - Choose "MARC structure" from the menu corresponding to one of the frameworks. - Check the "Display only used tags/subfields" checkbox. - Check the "marctagstructure_selectdisplay" cookie. - Go to Circulation -> Check out to a patron with checkouts. - Check the "Always show checkouts immediately" checkbox. - Check the "issues-table-load-immediately-circulation" cookie. - Go to Tools -> Patron clubs. You will need at least one active club with one or more patrons enrolled. - From the list of clubs, click Actions -> Search to hold. - Check the "holdforclub" cookie. - Go to Tools -> Batch item modification and submit a batch of items. - Uncheck one or more checkboxes in the "Show/hide columns" area. - Check the "showColumns" cookie. - View a patron -> Search to hold. - Check the 'holdfor' cookie. - With WebBasedSelfCheck enabled, log in to the self-checkout page. - Check the "JWT" cookie. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> |
2 years ago |
Jonathan Druart | 1a14a0539a |
Bug 29695: Remove GetColumnDefs
C4::Templates::GetColumnDefs can easily be replaced using the new Koha::Database::Columns module. Test plan: Go to the import patron tool and confirm that you see the same list of patron's attribute on the import patron form. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> |
2 years ago |
Katrin Fischer | 011fc4c385 |
Bug 29791: (follow-up) Add missing comma in previous line
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> |
2 years ago |
Kyle Hall | 1f34ec1330 |
Bug 29791: KohaOpacLanguage cookie should set the secure flag if using https
To test, the headers should have value set-cookie: secure; for the language cookie, when the site is using https. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> |
2 years ago |
Petro Vashchuk | 959519e8c1 |
Bug 29684: add honeypot to catch other warnings in the future
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> |
2 years ago |
Michael Hafen | c3b28f78bc |
Bug 28303: Fix plugins system with multiple pluginsdir settings
C4/Templates::badtemplatecheck mucks with the config('pluginsdir') array ref. This makes sure it operates on a copy of the array. To test: 1) $ prove t/db_dependent/Templates.t Signed-off-by: David Nind <david@davidnind.com> JK: Fix commit message styling and add test plan Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
3 years ago |
Jonathan Druart | 9d6d641d1f |
Bug 17600: Standardize our EXPORT_OK
On bug 17591 we discovered that there was something weird going on with the way we export and use subroutines/modules. This patch tries to standardize our EXPORT to use EXPORT_OK only. That way we will need to explicitely define the subroutine we want to use from a module. This patch is a squashed version of: Bug 17600: After export.pl Bug 17600: After perlimport Bug 17600: Manual changes Bug 17600: Other manual changes after second perlimports run Bug 17600: Fix tests And a lot of other manual changes. export.pl is a dirty script that can be found on bug 17600. "perlimport" is: git clone https://github.com/oalders/App-perlimports.git cd App-perlimports/ cpanm --installdeps . export PERL5LIB="$PERL5LIB:/kohadevbox/koha/App-perlimports/lib" find . \( -name "*.pl" -o -name "*.pm" \) -exec perl App-perlimports/script/perlimports --inplace-edit --no-preserve-unused --filename {} \; The ideas of this patch are to: * use EXPORT_OK instead of EXPORT * perltidy the EXPORT_OK list * remove '&' before the subroutine names * remove some uneeded use statements * explicitely import the subroutines we need within the controllers or modules Note that the private subroutines (starting with _) should not be exported (and not used from outside of the module except from tests). EXPORT vs EXPORT_OK (from https://www.thegeekstuff.com/2010/06/perl-exporter-examples/) """ Export allows to export the functions and variables of modules to user’s namespace using the standard import method. This way, we don’t need to create the objects for the modules to access it’s members. @EXPORT and @EXPORT_OK are the two main variables used during export operation. @EXPORT contains list of symbols (subroutines and variables) of the module to be exported into the caller namespace. @EXPORT_OK does export of symbols on demand basis. """ If this patch caused a conflict with a patch you wrote prior to its push: * Make sure you are not reintroducing a "use" statement that has been removed * "$subroutine" is not exported by the C4::$MODULE module means that you need to add the subroutine to the @EXPORT_OK list * Bareword "$subroutine" not allowed while "strict subs" means that you didn't imported the subroutine from the module: - use $MODULE qw( $subroutine list ); You can also use the fully qualified namespace: C4::$MODULE::$subroutine Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
8 years ago |
Jonathan Druart | e66d69fa3e |
Bug 26734: Rename activethemes with availablethemes
There was an existing call to $self->activethemes that behave as setter: 85 $self->activethemes($activethemes); I am not sure what are the side-effects but it does not look good. It caused warning in the logs: Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 279. Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 280. Use of uninitialized value $interface in string eq at /kohadevbox/koha/C4/Templates.pm line 282. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296. Use of uninitialized value $lang in concatenation (.) or string at /kohadevbox/koha/C4/Templates.pm line 296 Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
3 years ago |
Martin Renvoize | cff7ed4fd3 |
Bug 26734: Convert printfeercpt/printinvoice to use GetPreparedLetter
This patch updates C4::Letters to allow use of existing koha template includes from notices, then updates the printfeercpt and printinvoice slip print option to use GetPreparedLetter rather than calling getletter directly. As part of this work, we also add credits and debits handling to the _parseletter_sth and _get_tt_params routines in C4::Letters to allow for recognisable variable names in the notice template. Test plan 1/ Update the ACCOUNT_CREDIT and ACCOUNT_DEBIT notices to use 'accounts.inc' include for account descriptions 1a/ Add `[% PROCESS 'accounts.inc' %]` to the top of the notice 1b/ Replace manual account descriptions with `[% PROCESS account_type_description account=credit %]` 2/ Print one of each slip and check that descriptions are properly substituted 3/ Clone the notice to another language 4/ Print the in the other language and note the translated descriptions are properly substituted. 5/ Signoff Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
4 years ago |
Julian Maurice | b168f4a2e9 |
Bug 21395: Make perlcritic happy
This patch adds a .perlcriticrc (copied from qa-test-tools) and fixes almost all perlcrictic violations according to this .perlcriticrc The remaining violations are silenced out by appending a '## no critic' to the offending lines. They can still be seen by using the --force option of perlcritic This patch also modify t/00-testcritic.t to check all Perl files using the new .perlcriticrc. I'm not sure if this test script is still useful as it is now equivalent to `perlcritic --quiet .` and it looks like it is much slower (approximatively 5 times slower on my machine) Test plan: 1. Run `perlcritic --quiet .` from the root directory. It should output nothing 2. Run `perlcritic --quiet --force .`. It should output 7 errors (6 StringyEval, 1 BarewordFileHandles) 3. Run `TEST_QA=1 prove t/00-testcritic.t` 4. Read the patch. Check that all changes make sense and do not introduce undesired behaviour Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
6 years ago |
Julian Maurice | ed7543287b |
Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
Having to write [% KOHA_VERSION %] for each url is bad because: - It's easily forgettable when adding new <script> or <link> - It prevents grep'ing for the full filename - It violates the DRY principle - If at some point we want to change the "force js and css reload" mechanism, it will be tedious This patch: - adds a Template::Toolkit plugin that generates <script> and <link> tags for JS and CSS files, and inserts automatically the Koha version in the filename - use the new plugin to remove all occurences of [% KOHA_VERSION %] - remove the code that was adding KOHA_VERSION as a template variable Test plan: 1. Apply patch 2. Go to several different pages in Koha (opac and intranet) while checking your browser's dev tools (there should be no 404 for JS and CSS files, and the Koha version should appear in filenames) and the server logs (there should be no "File not found") 3. `git grep KOHA_VERSION` should return nothing 4. prove t/db_dependent/Koha/Template/Plugin/Asset.t Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
6 years ago |
Jonathan Druart | da36fd4429 |
Bug 20480: send KOHA_VERSION even if only one language is enabled
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
6 years ago |
Tomás Cohen Arazi | b03ce512c4 |
Bug 20480: Make KOHA_VERSION available to all templates in all circumstances
This patch makes C4::Templates::gettemplate set the KOHA_VERSION param for the template. This way this template parameter, which is required by (probably) all pages that include CSS/JS content is available in all circumstances. A noticeable problem with the current approach is when using the SCO and SCI modules with wrong/forbidden users: C4::Auth short-circuits and redirects to the login page, without setting the KOHA_VERSION param. This patch solves it for good. To test: - Enable the SCI module - Open the browser at http://localhost:8080/cgi-bin/koha/sci/sci-main.pl - Login with the db user (koha_kohadev / password) => FAIL: Login failure, but styling is broken - Apply this patch - Retry => SUCCESS: Everything looks as it should! - Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
6 years ago |
Marcel de Rooy | bdce984878 |
Bug 17989: Resolve "verbatim paragraph in NAME section" warning in C4::Templates
*** WARNING: Verbatim paragraph in NAME section at line 28 in file C4/Templates.pm Test plan: Run podchecker on C4::Templates and verify that the warning is resolved. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
7 years ago |
Marcel de Rooy | 8c510e1a92 |
Bug 17989: Include full path logic in _get_template_file
Similar to the full path test in sub themelanguage, this patch makes a change in _get_template_file. This allows you to pass a template outside the modules directory to get_template_and_user. (Note: the sub badtemplatecheck already blocks bad paths.) Especially, this would be helpful for plugins using templates. As can be seen in Templates.pm, a change was made earlier to overwrite the filename for a plugin in sub gettemplate. This exception can now be removed. Also note the small change in Koha/Plugin/Base.pm; mbf_path is already absolute and if we pass a full path, we do not need it. This allows use of a regular Koha template or a shared template between plugins (as long as badtemplatecheck allows the path). What are the side-effects of this change? [1] We should not pass absolute paths if we mean relative ones. A follow-up patch deals with one occurrence in the codebase. No regressions for regular use. [2] Plugins can call get_template_and_user directly or go via get_template in Koha/Plugin/Base (absolute paths don't go via mbf_path). Note: replaced two single quotes in Auth.pm to show template name in test description. Test plan: [1] Open some page on OPAC or staff client to trigger a template. [2] Run t/db_dependent/Auth.t to verify not allowing some bad templates. [3] Run t/db_dependent/Templates.t to verify an absolute path. [4] Run t/db_dependent/Plugins.t to verify using templates in a plugin. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
7 years ago |
Marcel de Rooy | 7703723508 |
Bug 17989: Extend bad template check
The check is now extended by only allowing templates from the regular Koha template directories and additional plugin directories as defined in koha-conf.xml. Note: In order to prevent an uninitialized warning on $theme from sub themelanguage for a not-existing file, I added a trivial assignment. Will get further attention in a follow-up. Test plan: [1] Run t/db_dependent/Auth.t [2] Run t/db_dependent/Templates.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
7 years ago |
Marcel de Rooy | 411d0cf8ea |
Bug 17989: Centralize bad template check
The bad template check in get_template_and_user can be removed, since this check has been added in gettemplate on bug 18010. The check moves here to a new sub in C4::Templates. And will be extended in a follow-up. Removed unused variable $path in gettemplatefile. Test plan: [1] Run t/db_dependent/Auth.t (get_template_and_user bad calls). [2] Run t/db_dependent/Templates.t (bad call to gettemplate). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
7 years ago |
Marcel de Rooy | fbbd4b40f0 |
Bug 18010: Remove potential exposure from gettemplate
A similar bad template check from C4::Auth::get_template_and_user should be applied in C4::Templates::gettemplate. Before this patch it would be possible to expose files like: my $template = C4::Templates::gettemplate( '/etc/passwd', 'intranet', CGI::new, 1 ); print $template->output; Note that the is_plugin flag in the above call is the culprit. This patch provides a quick security fix without touching get_template_and_user, and can be backported to stable branches. I will provide an enhanced and centralized check on report 17989, also removing the is_plugin flag. Note: We allow .pref here too for use in admin/preferences.pl. Test plan: [1] Run t/db_dependent/Auth.t (triggering get_template_and_user and gettemplate). [2] Run t/db_dependent/Templates.t again (see first test plan). The tests should no longer fail. [3] Open a page on opac or intranet. [4] Open a systempreferences tab. [5] Add a book to the cart and send it ([opac-]sendbasket uses gettemplate). Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> |
7 years ago |
Marcel de Rooy | 5c1daf010e |
Bug 17982: Fix the use of uniq in sub themelanguage
Doing uniq( \@themes ) is useless. It will just return to you the only reference you gave it. List::MoreUtils::uniq requires a list instead of an arrayref. So it is a trivial fix that makes sub themelanguage return one theme instead of three themes like [ 'prog', 'prog', 'prog' ]. Note that Template->new inserts one or two include paths to TT for each of these three identical themes. Test plan: [1] Run t/db_dependent/Templates.t (should no longer fail) [2] Run t/db_dependent/Auth.t (triggering themelanguage) [3] Open a page on OPAC or intranet. (Did you restart Plack?) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Mark Tompsett <mtompset@hotmail.com> EDIT (Marcel): Amended test plan for additional unit test. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> |
7 years ago |
Jonathan Druart | f01a07a25e |
Bug 16088: Introduce Koha::Cache::Memory::Lite to cache the language
The goal of this patch is to avoid unecessary flush of the L1 cache on creating a new CGI object each time C4::Languages::getlanguage is called without a CGI object. The new class Koha::Cache::Memory::Lite must be flushed by the CGI constructor overide done in the psgi file. This new class will ease caching of specific stuffs used by running script. Test plan: At the OPAC and the intranet interfaces: Open 2 different browser session to simulate several users - Clear the cookies of the browsers - User 1 (U1) an User 2 (U2) should be set to the default language (depending on the browser settings) - U1 chooses another language - U2 refreshes and the language used must be the default one - U2 chooses a third language - U1 refreshes and must be still using the one he has choosen. Try to use a language which is not defined: Add &language=es-ES (if es-ES is not translated) to the url, you should not see the Spanish interface. Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl> Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com> Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> |
8 years ago |
Jonathan Druart | 9be221b14e |
Bug 15968: Unnecessary loop in C4::Templates
From C4::Templates::output # add variables set via param to $vars for processing for my $k ( keys %{ $self->{VARS} } ) { $vars->{$k} = $self->{VARS}->{$k}; } This loop is not necessary, we could do the same with $vars = { %$vars, %{ $self->{VARS} } }; After a quick benchmark, it gains 100 microseconds when we pass 170 vars to the template. Test plan: Do some clicks on the interface, everything should be ok. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Perl idiosyncratic way of merging hash, clearer, if not quicker (not verified) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com> |
8 years ago |
Kyle Hall | a8942c2884 |
Revert bug 13618 - "Prevent XSS in the Staff Client and the OPAC" due to performance issues
Revert "DBRev to make notes of the XSS patches and the new important dependency." This reverts commit |
8 years ago |
Jonathan Druart | 01b38d3b13 |
Bug 13618: Use Template::Stash::AutoEscaping to use the html filter
Test plan: 0/ sudo cpanm Template::Stash::AutoEscaping 1/ Verify don't reproduce the XSS issue described on bug 13609 and other xss related bugs. 2/ Try to find some encoding issues (detail page, search results, facets, etc.) Signed-off-by: Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com |
9 years ago |
Jonathan Druart | 1291dfe5cf |
Bug 14817: Fix encoding issues in columns.def
Test plan: 1/ Use a translated template (fr-FR or ar-Arab) 2/ Go on the tools/import_patrons.pl page 3/ The field names in the "default values" block should be correctly encoded. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> |
9 years ago |
Mark Tompsett | 4b9f4e1749 |
Bug 14120: Fixing t/db_dependent/Auth.t noise
TEST PLAN --------- 1) $ prove t/db_dependent/Auth.t -- warnings 2) Apply this patch 3) $ prove t/db_dependent/Auth.t -- only one specific type of warning 4) Apply bug 5010 patch 5) $ prove t/db_dependent/Auth.t -- noisy is eliminated 6) koha qa test tools. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> With patch only one warn With 5010 no more warns No errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
9 years ago |
Jonathan Druart | ba0f84b46c |
Bug 9978: (followup) Replace license header with the correct license (GPLv3+)
There was another form of the v2. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
9 years ago |
Jonathan Druart | 2bf394e6d2 |
Bug 10328 - Rename opaccolorstylesheet to OpacAdditionalStylesheet
Test plan (from comment #1) 1) Apply this patch 2) Run updatedatabase.pl 3) Verify the system pref OpacColorStyleSheet still works i.e. no change should be noted Additionally, I changed the path to an other stylesheet and verified that it worked. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described and no more occurences of opaccolorstylesheet were found. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
9 years ago |
Kyle Hall | 003993d547 |
Bug 13473 - Plugins fail
When trying to execute or configure the plugin on 3.18 I got: Template process failed: file error - doc-head-open.inc: not found at /usr/share/koha/lib/C4/Templates.pm line 129. Test Plan: 1) Install the Kitchen Sink plugin 2) Go to the configuration page of the plugin 3) Note the template processing error 4) Apply this patch 5) Refresh the page 6) Note the page now loads Signed-off-by: Nick <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
9 years ago |
Jonathan Druart | e20270fec4 |
Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Jonathan Druart | 372816e8ef |
Bug 11944: Remove obsolete encoding routines
We don't need to decode manually which provide nice performance boost. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Jonathan Druart | 48773f660e |
Bug 11944: Encoding UTF8 in C4::Templates
Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Jonathan Druart | 99521c37fa |
Bug 11944: Remove all utf8 filter from templates
This patch - removes all html_entity usages in tt file which hide utf8 bugs - removes all encode utf8 in tt plugins because we should get correctly marked data from DBIC and other sources directly (cf plugin EncodeUTF8 used in renew.tt) - adds some cleanup in C4::Templates::output: we now use perl utf8 file handler output so we don't need to decode tt variables manually. Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Fridolin Somers | 8fd15d90bf |
Bug 13053 - Do not use template cache when from commandline
You may define in config a folder (usually /tmp) for TT cache : template_cache_dir in etc/koha-conf.xml. Some perl pages may be launched from commandline, like tools/export.pl. Also, the script gather_print_notices.pl uses C4::Templates. The problem is that when script is launched from Apache, the Unix owner of cache files will be www-data. When script is launched from commandline, like in a cronjob, the Unix owner will be different (like a user named "koha"), causing a crash because cache files can only be read by its owner. This script disables the template cache if perl script is called from commandline. This cache is certainly only useful for web access. Using GATEWAY_INTERFACE env var comes from tools/export.pl Test plan : - Use a dev install of koha installed in a user home, ie "/home/kohadev" - Define a folder for template_cache_dir in etc/koha-conf.xml. For example : <template_cache_dir>/tmp</template_cache_dir> - Check there is no cached templates already in this forder - Create a file "bib.list" containing a few existing biblionumbers - As user kohadev, launch : tools/export.pl --record-type=bibs --id_list_file=bib.list - Look at cache folder => Without patch you see cache files owned by user kohadev => With patch there are no cache files - Use the Koha interfaces OPAC and Intranet => Without patch you get an error : Template process failed: file error - cache failed to write ... => With patch you have no error and cache files are generated with Apache user as owner Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, good test plan! Passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Frédéric Demians | 3cbf754702 |
Bug 13170 Remove of prog theme broke the OPAC's "view plain" option for MARC details
In the OPAC if you view the MARC details for a title (and have OPACXSLTDetailsDisplay enabled) there is a "view plain" link which displays the output of opac-showmarc.pl. This is broken in master: fixed by this patch. Test plan: (1) Set OPACXSLTDetailsDisplay to default (2) Do a search on OPAC, then display a specific biblio record (3) Click on MARC view tab. Then click on 'view plain' link. Nothing is displayed. (4) Apply the patch. And refresh the MARC detail page. (5) Click on 'view plain' link. Check that a plain text MARC record is displayed. Signed-off-by: Chris <chris@bigballofwax.co.nz> Note: This makes a small change to C4::Templates::themelanguage so that it works with .xsl files too (They live in the xslt dir) Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Works as described, passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Tomás Cohen Arazi | a4a2159aad |
Bug 13169: C4::Templates::themelanguage fails if the DB is not populated
With the aim to remove hardcoded themes the C4::Templates::themelanguage got dependent on the DB being populated. This patch reintroduced the hardcoded defaults as a last resort. To test: - Do a fresh install, clean your browser's cache, empty DB - Open the staff interface => FAIL: A "Software error" screen shows "Template process failed: file error..." - Apply the patch - Reload => SUCCESS: The webinstaller prompts for login correctly. - Sign off :-D Regards Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Owen Leonard | 468a0e4f29 |
Bug 12494 - Remove yuipath system preference
With the OPAC prog template going away, the only remaining use of the yuipath preference is on the basketgroups template. The yuipath preference should be removed and the local path hard-coded. This patch: - removes yuipath handling from C4/Templates.pm - removes the preference from sysprefs.sql - deletes the preference via updatedatabase.pl - removes the preference from the staff client preferences file - removes unused references to the YUI assets from the help file header include - adds the local YUI asset path to acqui/basketgroup.tt To test, apply the patch and run the database update. View some online help pages and confirm that they function correctly. View the basketgroups page (Acquisition -> Vendor -> Basket groups), edit a basket group, and confirm that basket drag and drop operations work correctly. Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. Online help and basket group drag&drop functionality still work correctly. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Bernardo Gonzalez Kriegel | cb1f2c60c0 |
Bug 12539: Follow up to fix fallback theme
The is a problem in the logic, fallback must be: 1. Requested (theme, lang, tmpl) a. return (theme, lang, tmpl), if not b. return (fallback, lang, tmpl), if not c. return (theme, 'en', tmpl), if not as last resort d. return (fallback, 'en', tmpl) Previous patch missed option 'c', worked for CCSR but not bootstrap, sorry. Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> |
10 years ago |
Bernardo Gonzalez Kriegel | 96bfcdcb86 |
Bug 12539: PROG/CCSR deprecation: Remove hardcoded theme from C4/Templates.pm
This patch removes hardcoded 'prog' from themelanguage on C4/Templates.pm It adds a new syspref OPACFallback to hold the prefferred fallback theme for new themes with minimal changes. This does not brake CCSR if new syspref value is 'prog', using 'bootstrap' works somehow, but with strange results. To test: 1) Apply the patch 2) Run updatedatbase.pl 3) CCSR, prog & bootstrap must work as usual 4) Need to test theme/language fallback a) translate for your preferred language (xx-YY) b) enable language on opac c) go to opac, select that language d) login on opac, go to personal details e) remove koha-tmpl/opac-tmpl/bootstrap/xx-YY/modules/opac-memberentry.tt d) reload page, must load in English f) click other member options, must load on translated language (can use other pages, ccsr, prog or bootstrap) 5) Do a similar test but for a staff page, enable lang, switch to it, rm koha-tmpl/intranet-tmpl/prog/xx-YY/modules/admin/admin-home.tt, any page must be translated except for admin home. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> |
10 years ago |
Tomás Cohen Arazi | b4158f2d24 |
Bug 12716: Allow the import patrons form have drop-downs and datepickers
To reproduce: - Go to Tools > Import patrons - Notice branchcode and categorycode don't have dropdown menus with valid options. - Notice dateofbirth, dateenrolled and dateexpiry don't have date-pickers - Notice each input field is labeled with the column name instead of a proper description. To test: - Apply the patch, go to Tools > Import patrons - Notice branchcode and categorycode have dropdown menus with valid options, and by default the empty value is selected. - Notice that if you go into the dateofbirth, dateenrolled and dateexpiry fields, a nice date picker widget appears. - Notice each field is labeled with the field description, and that the column name is conveniently shown at the right of the input field. Important: test switching the ExtendedPatronAttributes syspref, and verify that if enabled, the patron_attributes field appears, and also the checkbox selector controlling the extended patron attributes import behaviour shows too. Bonus points: Verify that on a different language, the descriptions get translated, and the column names show correctly Regards To+ Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes tests and QA script. Works as described, no regressions found. Dates are output in ISO/database format, this is ok. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Owen Leonard | 9a77c4a38c |
Bug 11347 - PROG/CCSR deprecation: Remove opacsmallimage system-preference
The opacsmallimage system preference is unused in the bootstrap theme. It can be removed now that prog and ccsr are deprecated. This patch does so. To test, apply the patch and run updatedatabase. Confirm that the OPAC works properly and the preference can no longer be found. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Preference removed, no koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> |
10 years ago |
Tomás Cohen Arazi | b2a650d124 |
Bug 11349: Remove unnecesary name translation
Since all scripts use the '.tt' sufix for template names there's no need for and regexp that changes from '.tmpl' to '.tt'. Regards To+ Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Julian Maurice | a0c17a8c3a |
Bug 12237: Remove the "horrible hack" in C4::Templates
Use C4::Languages::getlanguage() instead of C4::Templates::_current_language() Test plan: 1/ Set one of the 4 XSLT sysprefs to 'default' 2/ Go to the corresponding page 3/ Switch language and check that the right XSLT is used 4/ Set the same syspref to something with '{langcode}' in it. For example: "../koha-tmpl/opac-tmpl/bootstrap/{langcode}/xslt/UNIMARCslim2OPACDetail.xsl" 5/ Go back to the corresponding page 6/ Switch language and check that the right XSLT is used 7/ Change a compact.xsl for a language (for example koha-tmpl/intranet-tmpl/prog/fr-FR/xslt/compact.xsl) to be able to see differences 8/ Go to a biblio detail page in staff interface and click on "MARC Preview: Show" 9/ Close the popup, switch language and click again on the same link 10/ Check that the correct XSLT is used. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works as described following test plan. No koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> No problems found, passes tests and QA script. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> |
10 years ago |
Julian Maurice | 76e39750b7 |
Bug 11848: Move language detection function in C4::Languages
Also store interface (intranet, opac) in context to not have to pass it as parameter. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> No koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Comments on last patch. Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
10 years ago |
Bernardo Gonzalez Kriegel | c212b9328e |
Bug 5052: make it possible to pick a language if all choices are sublanguage
This was tricky to catch. In current implementation, Bug 6755 introduced in C4/Templates.pm as condition to send the array of hashrefs of languages that (@$languages_loop<2), but with one language group that condition is false, there is only one element in that array. This patch changes that condition to have more than one language selected, grouped or not. Also send $bidi value always, that was only sent if there is more than one group language. To test: 1. Translate to en-GB and en-NZ, or simply do mkdirs on intranet-tmpl/prog and opac-tmpl/bootstrap 2. Go to Administration > System preferences > I18N enable those languages on staff/opac 3. Check that language chooser is nowhere to be found 4. Apply the patch 5. Reload staff/opac, now you can see language chooser NOTE: I made little changes on staff, but can't replicate bootstrap colors for selected/unselected language. Someone need to touch css files to make it happen. But that is current behavior. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Good catch! Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
10 years ago |
Matthias Meusburger | 0313856d9a |
Bug 7684: multiple fixes for inventory
* when a file was uploaded and the comparison with catalogue range requested, the comparison was wrong: the logic was wrong * items that were not supposed to be scanned (ie: supposed to be on another shelf) didn't had the author and title, it was hard to retrieve them on the shelved * some useful fields were missing, like homebranch, location, status * the CSV export contained all the item information. It should contain the same informations as the screen Behaviour now: * scan a list of barcode & select a range of location * if a barcode has been scanned and should not be (misplaced item), the information is displayed * if you choose "compare barcodes list to result option", the resulting list contains all items that have been scanned and those that were supposed to be. Any item not in both list appears with a specific message on the last column Signed-off-by: Leila <koha.aixmarseille@gmail.com> Signed-off-by: Koha Team Amu <koha.aixmarseille@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
12 years ago |
Tomás Cohen Arazi | 3b7c6932e5 |
Bug 9735 - Let the language be selected through URL parameters
Passing language=<valid_language_code> as a parameter in any Koha's URL can be used to set the desired language. This patch touches - C4::Templates - C4::Auth Adds a new method getlanguagecookie that does exactly that, for use in get_template_and_user. Also modifies getlanguage so it checks (a) if there's a 'language' parameter in the CGI object and (b) checks if its valid and enabled for the desired interface. To test: * Without the patch - access any koha page - add ?language=code to the end of the URL (change code for a valid language code it needs to be installed using perl translate install code, and enabled either for the staff or opac interface, depending where are you testing) - Nothing happens with the language parameter * With the patch - access any koha page - add ?language=code (the same as before) and hit enter - the language should be changed to the one you chose - if you browse through some links, you will see koha 'remembers' the language you passed as a parameter (i.e. the language cookie has been updated). Sponsored-by: Universidad Nacional de Córdoba Signed-off-by: Brendan <brendan@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works very well. No errors. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Passes all tests and QA script. More comments on last patch. Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
11 years ago |
Robin Sheat | 38f596d48e |
Bug 10560: make it possible for default interface language to not be English
If you enable another translation, and disable English, then if you dont have a cookie set, or your browser is not set to that language, you will get English. So you can not disable English in either the staff client or the OPAC. This patch fixes the language selection to do the right thing. To test you must have at least one other language installed besides English. Apply the patch and disable the en translation. Koha should fall back to one of the enabled translations. Signed-off-by: Owen Leonard <oleonard@myacpl.org> I added a patch description and test plan, missing from the original patch. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> I have tested with various combinations of activated languages and have found no regression. If the cookie is set, the right language is shown accordingly. Else the first language in the list seems to be picked. It did never fall back to English in my tests, when English was explicitly deactivated. Passes all tests and QA script. Signed-off-by: Galen Charlton <gmc@esilibrary.com> |
12 years ago |
Galen Charlton | a7eb34f2c8 |
Revert "Bug 6554 - make Koha internally utf-8 clean"
This reverts commit
|
11 years ago |
Dobrica Pavlinusic | d542740ab8 |
Bug 6554 - make Koha internally utf-8 clean
In current implementation (mostly commented out in this patch) uses heuristic to guess which strings need decoding from utf-8 to binary representation and doesn't support utf-8 characters in templates and has problems with utf-8 data from database. With this changes, Koha perl code always uses utf-8 encoding correctly. All incomming data from database is allready correctly marked as utf-8, and decoding of utf8 is required only from Zebra and XSLT transfers which don't set utf-8 flag correctly. For output, standard perl :encoding(utf8) handler is used so it also removes various "wide character" warnings as side-effect. Test scenario: 1. make sure that you have utf-8 characters in your biblio records, patrons, categories etc. 2. try to search records on intranet and opac which contain utf-8 characters 3. install language which has utf-8 characters, e.g. uk-UA dpavlin@koha-dev:/srv/koha/misc/translator(bug_6554) $ PERL5LIB=/srv/koha/ perl translate install uk-UA 4. switch language to uk-UA and verify that templates display correctly 5. test search and Z39.50 search and verify that caracters are correct Signed-off-by: Owen Leonard <oleonard@myacpl.org> I followed the test plan, adding utf-8 characters to library names, patron categories, titles, and authorized values. I tried the uk-UA translation and everything looked good. When performing Z39.50 searches for titles containing utf-8 characters I got results which were still occasionally contaminated with dummy characters [?] but I assume this is Z39.50's fault not the patch's. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Already signed, add mine. Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> |
12 years ago |
Kyle M Hall | 5eabc672fd |
Bug 7804 - Add Koha Plugin System
Adds support for custom plugins. At the moment the Plugins feature supports two types of plugins, reports and tools. Plugins are installed by uploading KPZ ( Koha Plugin Zip ) packages. A KPZ file is just a zip file containing the perl files, template files, and any other files neccessary to make the plugin work. Test plan: 1) Apply patch 2) Run updatedatabase.pl 3) Create the directory /var/lib/koha/plugins 4) Add the lines <pluginsdir>/var/lib/koha/plugins</pluginsdir> <enable_plugins>1</enable_plugins>" to your koha-conf.xml file 5) Add the line Alias /plugin/ "/var/lib/koha/plugins/" to your koha-httpd.conf file 6) Restart your webserver 7) Access the plugins system from the "More" pulldown 8) Upload the example plugin file provided here 9) Try it out! Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> |
15 years ago |