[Koha-patches] [PATCH] Bug 4994 - Net::LDAP returns lowercase names

2010-07-13 Thread Dobrica Pavlinusic
This requires us to specify all LDAP mappings in koha-conf.xml in lowercase, instead of original case used withing LDAP. Compare readability of userid is=hrEduPersonUniqueID /userid (which doesn't work) with required (and non-intuitive) userid is=hredupersonuniqueid /userid ---

[Koha-patches] [PATCH] Bug 5009 - autocomplete=off for borrowernumbers and barcode forms

2010-07-14 Thread Dobrica Pavlinusic
When using RFID readers which emulate keystrokes browser sometimes picks numbers for barcodes or borrowers from history which generates wrong transactions. --- .../intranet-tmpl/prog/en/includes/cat-search.inc |4 ++-- .../intranet-tmpl/prog/en/includes/circ-search.inc |2 +-

Re: [Koha-patches] [PATCH] Bug 4828: Clean diacritics from SIP-written messages

2011-02-17 Thread Dobrica Pavlinusic
devices support UTF-8. I added similar comment on bug: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4828 with idea to make it configuration option. -- Dobrica Pavlinusic 2share!2flamedpav...@rot13.org Unix addict. Internet consultant. http://www.rot13

[Koha-patches] [PATCH] Bug #5955 - value_builder support for PrepareItemrecordDisplay

2011-03-25 Thread Dobrica Pavlinusic
--- C4/Biblio.pm | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 1b378df..f9a19dd 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2376,6 +2376,31 @@ sub PrepareItemrecordDisplay {

[Koha-patches] [PATCH] Bug 6022: Auth_with_ldap check if categorycode is valid

2011-03-31 Thread Dobrica Pavlinusic
When importing users from LDAP, Auth_with_ldap.pm doesn't check if value for categorycode is present in categories table in Koha resulting in referential integrity error instead of using default value from koha-conf.xml --- C4/Auth_with_ldap.pm | 13 + 1 files changed, 13

[Koha-patches] [PATCH] Bug 6022: Auth_with_ldap check if categorycode is valid

2011-08-12 Thread Dobrica Pavlinusic
When importing users from LDAP, Auth_with_ldap.pm doesn't check if value for categorycode is present in categories table in Koha resulting in referential integrity error instead of using default value from koha-conf.xml --- C4/Auth_with_ldap.pm | 11 +++ 1 files changed, 11

[Koha-patches] [PATCH] Bug 7246 - rebuild_zebra.pl --limit number for partial reindexing

2011-11-19 Thread Dobrica Pavlinusic
Partial re-indexing is mostly useful when experimenting with Zebra configuration and your test database is too large to be re-indexed for each trial. I'm submitting it after I added this twice to source code of rebuild_zebra.pl and I hope it might prove useful to others also. Test scenario: 1.

[Koha-patches] [PATCH] Bug 6997: Koha-remove leaves system in inconsistent state

2011-11-24 Thread Dobrica Pavlinusic
of each file prior to deleting it, so that short of an actual problem with removing the file, the script can continue. Note that the fix for bug 6929 is also needed to prevent any problems with stopping Zebra from killing koha-remove. Signed-off-by: Dobrica Pavlinusic dpav...@rot13.org --- debian

[Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output

2011-12-20 Thread Dobrica Pavlinusic
Currently, -v option resets Zebra log output to default system values. This produce amount of log specified in system defaults which is usually too low for debugging. This change explicitly forces all Zebra log output which create much more chatter so it triggers with verbosity level 2 Test

Re: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output

2011-12-20 Thread Dobrica Pavlinusic
to debug the search query. my two cents. all is very verbose, but does provide additional information about Zebra progress (I must admit I'm leaning towards too much information as opposed to too little). Should I move all to verbose level 3 (-v -v -v) or just remove it all together? -- Dobrica

Re: [Koha-patches] [PATCH] Bug 7247 - rebuild_zebra.pl -v should show all Zebra log output

2011-12-21 Thread Dobrica Pavlinusic
On Tue, Dec 20, 2011 at 04:54:17PM +0100, LAURENT Henri-Damien wrote: Le 20/12/2011 15:52, Dobrica Pavlinusic a écrit : On Tue, Dec 20, 2011 at 02:06:24PM +0100, LAURENT Henri-Damien wrote: -if ($verbose_logging) { -$zebraidx_log_opt = ''; +if ($verbose_logging = 2

[Koha-patches] [PATCH] Bug 7451 - PrepareItemrecordDisplay missing $subfield_data{id} which breaks AJAX value_builders

2012-01-17 Thread Dobrica Pavlinusic
In current version of code, it gets initialized too late, so it produces unitialized warnings for hidden fields (which is non-fatal) and breaks generated JavaScript for AJAX value_builders (which is fatal) This bug was introduced in ticket 6106 which is modification of 5955 which didn't have this

Re: [Koha-patches] [PATCH] $subfield_data{id} is used for AJAX value_builders and hidden fields

2012-01-17 Thread Dobrica Pavlinusic
On Tue, Jan 17, 2012 at 03:25:46PM +0100, Dobrica Pavlinusic wrote: In current version of code, it gets initialized too late, so it produces unitialized warnings for hidden fields (which is non-fatal) and breaks generated JavaScript for AJAX value_builders (which is fatal) This bug

[Koha-patches] [PATCH] Bug 7765 - labels/label-edit-layout.pl: plack $layout scoping

2012-03-21 Thread Dobrica Pavlinusic
--- labels/label-edit-layout.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/labels/label-edit-layout.pl b/labels/label-edit-layout.pl index 5a45d5c..db3d32c 100755 --- a/labels/label-edit-layout.pl +++ b/labels/label-edit-layout.pl @@ -44,7 +44,7 @@ my ( $template,

[Koha-patches] [PATCH] Bug 7767 - acqui/basketgroup.pl: our $template scoping for plack

2012-03-21 Thread Dobrica Pavlinusic
--- acqui/basketgroup.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index d2e1856..3300cea 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -60,7 +60,7 @@ use C4::Members qw/GetMember/; my $input=new CGI;

[Koha-patches] [PATCH] Bug 7768 - acqui/z3950_search.pl: remove sub displayresults to fix plack scoping

2012-03-21 Thread Dobrica Pavlinusic
--- acqui/z3950_search.pl | 42 +- 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 80503e0..4d4545e 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -64,7 +64,6 @@ my

[Koha-patches] [PATCH] Bug 7769 - members/pay.pl: $template scoping for plack

2012-03-21 Thread Dobrica Pavlinusic
--- members/pay.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/members/pay.pl b/members/pay.pl index e3377bf..f1a9fca 100755 --- a/members/pay.pl +++ b/members/pay.pl @@ -43,7 +43,7 @@ use C4::Members::Attributes qw(GetBorrowerAttributes); my $input = CGI-new;

[Koha-patches] [PATCH] Bug 7772 - reports/bor_issues_top.pl: we need to exit(0) for plack

2012-03-21 Thread Dobrica Pavlinusic
--- reports/bor_issues_top.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 95fc287..126cdef 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -102,7 +102,7 @@ if ($do_it) {

[Koha-patches] [PATCH] Bug 7773 - serials/subscription-add.pl scope $query for plack

2012-03-21 Thread Dobrica Pavlinusic
--- serials/subscription-add.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 9acee7b..7fbe16b 100755 --- a/serials/subscription-add.pl +++ b/serials/subscription-add.pl @@ -34,7 +34,7 @@ use Carp; #use

[Koha-patches] [PATCH] Bug 7775 - tools/upload-file.pl: scope $uploaded_file for plack

2012-03-21 Thread Dobrica Pavlinusic
--- tools/upload-file.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/upload-file.pl b/tools/upload-file.pl index d520b4d..a27e719 100755 --- a/tools/upload-file.pl +++ b/tools/upload-file.pl @@ -46,7 +46,7 @@ if ($auth_status ne ok) { exit 0; } -my

[Koha-patches] [PATCH] Bug 7779 - tools/letter.pl: scope vars for plack

2012-03-21 Thread Dobrica Pavlinusic
--- tools/letter.pl |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/letter.pl b/tools/letter.pl index eb9d6a6..44f21ab 100755 --- a/tools/letter.pl +++ b/tools/letter.pl @@ -85,17 +85,17 @@ sub protected_letters { return { map { $_-[0] = 1 } @{$codes} };

[Koha-patches] [PATCH] Bug 7213: simple /svc/ HTTP example

2012-03-21 Thread Dobrica Pavlinusic
Simple command-line client which can authorize itself to Koha, get MARC XML record based on biblio number and update record --- misc/migration_tools/koha-svc.pl | 126 ++ 1 files changed, 126 insertions(+), 0 deletions(-) create mode 100755

[Koha-patches] [PATCH] Bug 7213: simple /svc/ HTTP example

2012-03-22 Thread Dobrica Pavlinusic
Simple command-line client which can authorize itself to Koha, get MARC XML record based on biblio number and update record This script can also be used as module using require koha-svc.pl from other scripts which can implement MARC XML creation or parsing. --- misc/migration_tools/koha-svc.pl |

[Koha-patches] [PATCH] Bug 7451 - PrepareItemrecordDisplay missing $subfield_data{id} which breaks AJAX value_builders

2012-03-22 Thread Dobrica Pavlinusic
In current version of code, it gets initialized too late, so it produces unitialized warnings for hidden fields (which is non-fatal) and breaks generated JavaScript for AJAX value_builders (which is fatal) This bug was introduced in ticket 6106 which is modification of 5955 which didn't have this

[Koha-patches] [PATCH] Bug 7790 - tools/manage-marc-import.pl breaks with plack

2012-03-22 Thread Dobrica Pavlinusic
transfer $template to add_matcher_list for correct scoping --- tools/manage-marc-import.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl index 34d2639..587d520 100755 --- a/tools/manage-marc-import.pl +++

[Koha-patches] [PATCH] Bug 7795 - admin/authorised_values.pl breaks with plack

2012-03-22 Thread Dobrica Pavlinusic
scoping fixes for Variable * is not available errors --- admin/authorised_values.pl | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/authorised_values.pl b/admin/authorised_values.pl index 5282022..1545f0e 100755 --- a/admin/authorised_values.pl +++

[Koha-patches] [PATCH] Bug 7796 - C4/VirtualShelves.pm needs globally scoped $dbh for plack

2012-03-22 Thread Dobrica Pavlinusic
otherwise, we get a lot of MySQL server has gone away error messages --- C4/VirtualShelves.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 85dbc9f..a37db41 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm

[Koha-patches] [PATCH] Bug 7797 - admin/currency.pl needs scoping for plack

2012-03-22 Thread Dobrica Pavlinusic
--- admin/currency.pl | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/currency.pl b/admin/currency.pl index 1e3f160..e24f6b6 100755 --- a/admin/currency.pl +++ b/admin/currency.pl @@ -46,14 +46,14 @@ use C4::Dates qw(format_date); use C4::Output; use

[Koha-patches] [PATCH] Bug 7798 - admin/item_circulation_alerts.pl plack scoping

2012-03-22 Thread Dobrica Pavlinusic
--- admin/item_circulation_alerts.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/admin/item_circulation_alerts.pl b/admin/item_circulation_alerts.pl index bba5d60..ee77ae8 100755 --- a/admin/item_circulation_alerts.pl +++ b/admin/item_circulation_alerts.pl @@ -33,7

[Koha-patches] [PATCH] Bug 7799 - admin/marctagstructure.pl needs $dbh plack scoping

2012-03-22 Thread Dobrica Pavlinusic
--- admin/marctagstructure.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 92e0d99..d7c2fe0 100755 --- a/admin/marctagstructure.pl +++ b/admin/marctagstructure.pl @@ -44,7 +44,7 @@ my $pagesize = 20; my

[Koha-patches] [PATCH] Bug 7801 - admin/patron-attr-types.pl plack scoping

2012-03-22 Thread Dobrica Pavlinusic
--- admin/patron-attr-types.pl |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/patron-attr-types.pl b/admin/patron-attr-types.pl index 29a0d90..da5b6c1 100755 --- a/admin/patron-attr-types.pl +++ b/admin/patron-attr-types.pl @@ -30,11 +30,11 @@ use

[Koha-patches] [PATCH] Bug 7763 - admin/systempreferences.pl plack scoping

2012-03-22 Thread Dobrica Pavlinusic
--- admin/systempreferences.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index f4069ae..96a9957 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -67,7 +67,7 @@ use YAML::Syck qw(

[Koha-patches] [PATCH] Bug 7796 - C4/VirtualShelves.pm $dbh plack scoping

2012-03-22 Thread Dobrica Pavlinusic
we get a lot of MySQL server has gone away error messages and defining global $dbh isn't the best solution. Existing code gets $dbh from context in some subs, so this change makes it always use $dbh from context. --- C4/VirtualShelves.pm | 15 +-- 1 files changed, 13 insertions(+),

[Koha-patches] [PATCH] Bug 7810 - C4/Auth.pm - on pack restart session is undefined

2012-03-23 Thread Dobrica Pavlinusic
So we shouldn't try to delete it. This produces application error instead of redirection to login page. I had similar problems with CGI, especially when session in browser is still active, and one on filesystem or database is already expired. --- C4/Auth.pm |2 +- 1 files changed, 1

[Koha-patches] [PATCH] Bug 7773 - serials/subscription-add.pl scope for plack

2012-03-23 Thread Dobrica Pavlinusic
This fixes scope of $query and $nextexpected --- serials/subscription-add.pl |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/serials/subscription-add.pl b/serials/subscription-add.pl index 9acee7b..4038e1a 100755 --- a/serials/subscription-add.pl +++

[Koha-patches] [PATCH] Bug 7790 - tools/manage-marc-import.pl breaks with plack

2012-03-23 Thread Dobrica Pavlinusic
transfer $template to add_matcher_list for correct scoping and score $dbh and $runinbackground with our --- tools/manage-marc-import.pl |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/manage-marc-import.pl b/tools/manage-marc-import.pl index 34d2639..cc22aeb

[Koha-patches] [PATCH] Bug 7799 - admin/marctagstructure.pl plack scoping

2012-03-23 Thread Dobrica Pavlinusic
duplicate_framework needs $dbh so we get it from C4::Context --- admin/marctagstructure.pl |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/admin/marctagstructure.pl b/admin/marctagstructure.pl index 92e0d99..a86d788 100755 --- a/admin/marctagstructure.pl +++

[Koha-patches] [PATCH] Bug 7775 - tools/upload-file.pl: scoping for plack

2012-03-23 Thread Dobrica Pavlinusic
$uploaded_file is now scoped with our, and we set correct filename --- tools/upload-file.pl |7 ++- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/upload-file.pl b/tools/upload-file.pl index d520b4d..b705f5c 100755 --- a/tools/upload-file.pl +++

[Koha-patches] [PATCH 1/2] Bug 4032:XSLT systempreference takes a path to file rather than YesNo

2012-03-24 Thread Dobrica Pavlinusic
From: Stéphane Delaune stephane.dela...@biblibre.com Signed-off-by: Marijana Glavica mglav...@ffzg.hr I am signing it off because it doesn't break anything and I will report another bug for language issues described in my previous comment. --- C4/Search.pm

Re: [Koha-patches] [PATCH 1/2] Bug 4032:XSLT systempreference takes a path to file rather than YesNo

2012-03-24 Thread Dobrica Pavlinusic
schrieb Dobrica Pavlinusic dpav...@rot13.org: From: Stéphane Delaune stephane.dela...@biblibre.com Signed-off-by: Marijana Glavica mglav...@ffzg.hr I am signing it off because it doesn't break anything and I will report another bug for language issues described in my previous comment

[Koha-patches] [PATCH] Bug 4032 XSLT systempreference takes a path to file rather than YesNo

2012-03-24 Thread Dobrica Pavlinusic
From: Stéphane Delaune stephane.dela...@biblibre.com Signed-off-by: Marijana Glavica mglav...@ffzg.hr I am signing it off because it doesn't break anything and I will report another bug for language issues described in my previous comment. Removed MySQLism backquotes --- C4/Search.pm

[Koha-patches] [PATCH] Bug 7829 - reports/ remove all exit(1) for plack

2012-03-26 Thread Dobrica Pavlinusic
In Bug 7772 Ian correctly noted that reports have exit(1) all over the place. This is left over from old code, and this patch changes them to exit(0). I decided to use plain exit as opposed to explicit exit(0) since it produces cleaner code, but I'm welcoming suggestion on this. ---

[Koha-patches] [PATCH 2/3] Bug 6448 [2/3] Barcodes::EAN13 autoBarcode

2012-03-28 Thread Dobrica Pavlinusic
Implement auto-incrementing EAN-13 barcodes To make this work, C4::Barcodes::next was modified to call process_tail with new incremented value so that process_tail can generate correct checksum. Since process_tail is currenlty not used by any barcodes, this change is safe. C4::Barcodes is used

[Koha-patches] [PATCH 3/3] Bug 6448 [3/3] EAN-13 barcode labels

2012-03-28 Thread Dobrica Pavlinusic
Current implementation doesn't scale barcodes because low-price CCD barcode readers are very sensitive about size Test scenario: 1. in Tools Labels create or edit Layout and select EAN13 as barcode type 2. export one of existing batches using EAN13 layout and verify that generated pdf

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-03-29 Thread Dobrica Pavlinusic
koha.psgi example and script to run any Koha site intranet or opac under plack It also defines new enviroment variables: PLACK_DEBUG=1 - turn Plack debug panels on PLACK_MINIFY=1 - minify JavaScript and CSS which saves us ~10k on each page load Test scenario: 1. install plack and dependencies,

[Koha-patches] [PATCH] Bug 7821 - fix C4::Templates::_current_language

2012-03-30 Thread Dobrica Pavlinusic
Bareword C4::Templates::_current_language not allowed while strict subs in use at /home/oleonard/kohaclone/C4/XSLT.pm line 175. --- C4/XSLT.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/XSLT.pm b/C4/XSLT.pm index a22f2e5..56ba544 100644 --- a/C4/XSLT.pm +++

[Koha-patches] [PATCH] Bug 7857 - database upgrade fails with plack

2012-03-30 Thread Dobrica Pavlinusic
Updating database structure Update errors : Can't locate C4/Context.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /usr/local/lib/perl/5.10.0

[Koha-patches] [PATCH] Bug 7859 - members/pay.pl plack scoping

2012-03-30 Thread Dobrica Pavlinusic
Variable $borrowernumber is not available at /srv/koha/members/pay.pl line 112. Variable $borrower is not available at /srv/koha/members/pay.pl line 129. Variable $input is not available at /srv/koha/members/pay.pl line 142. Variable $borrowernumber is not available at /srv/koha/members/pay.pl

[Koha-patches] [PATCH] Bug 7860 - /virtualshelves/addbybiblionumber.pl plack scoping

2012-03-30 Thread Dobrica Pavlinusic
Variable $query is not available at /srv/koha/virtualshelves/addbybiblionumber.pl line 115. Variable $loggedinuser is not available at /srv/koha/virtualshelves/addbybiblionumber.pl line 129. Variable $shelfnumber is not available at /srv/koha/virtualshelves/addbybiblionumber.pl line 134.

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-03-30 Thread Dobrica Pavlinusic
koha.psgi example and script to run any Koha site intranet or opac under plack This means that it will use sudo to switch to correct site-koha user for configuration and plack process It also defines new enviroment variables: PLACK_DEBUG=1 - turn Plack debug panels on PLACK_MINIFY=1 - minify

[Koha-patches] [PATCH] Bug 7847 Undefined subroutine C4::Search::GetHiddenItemnumbers

2012-03-30 Thread Dobrica Pavlinusic
From: Chris Cormack chr...@catalyst.net.nz This bug was uncovered by @mglavica during HackFest in Marseille It also showed it's ugly head during my plack presentation there. It's introduced by commit b65efdaacaf77fb53fee479da7f2e990ba0adeed which is Bug 6027 Signed-off-by: Dobrica Pavlinusic

[Koha-patches] [PATCH] Bug 7863 - opac-addbybiblionumber.pl plack scoping

2012-03-31 Thread Dobrica Pavlinusic
Test scenario: 1. issue search query 2. select 1 result 3. add to: new list, list-1, private 4. select 2 results 5. add to (exiting) list-1 4. select 3 results 6. add to: new list, list-2, public 7. using lists drop-down, view and delete list-1 and list-2 --- opac/opac-addbybiblionumber.pl |

[Koha-patches] [PATCH] Bug 7872 - C4::Items::GetItemsInfo marc_subfield_structure

2012-04-02 Thread Dobrica Pavlinusic
SQL queries fetch all results and use first row. Adding frameworkcode to SQL queries will help returning just one (correct) row, improve performance and allow caching of values in future. --- C4/Items.pm |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/C4/Items.pm

[Koha-patches] [PATCH] Bug 7847 - OPAC search dies with plack

2012-04-04 Thread Dobrica Pavlinusic
This bug was uncovered by @mglavica during HackFest in Marseille It also showed it's ugly head during my plack presentation there. Following chang removes circural dependecy introduced by commit b65efdaacaf77fb53fee479da7f2e990ba0adeed which is part of Bug 6027 --- C4/Items.pm |1 - 1 files

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-04-04 Thread Dobrica Pavlinusic
koha.psgi example and plackup.sh script to run any Koha site intranet or opac interface under plack with optional multi-process Starman server plackup.sh site-name [intranet] site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml All configuration is specified in koha.psgi,

[Koha-patches] [PATCH] Bug 7886 - C4/ShelfBrowser slow SQL performance

2012-04-04 Thread Dobrica Pavlinusic
ShelfBrowser uses two SQL queries with syntax WHERE ((cn_sort = ? AND itemnumber ?) OR cn_sort ?) AND homebranch = ? AND location = ? AND ccode = ? homebranch already has index, and adding indexes on ccode and location improves performance by 30% for each query since MySQL is able to use

[Koha-patches] [PATCH] Bug 7872 - C4::Items::GetItemsInfo should use C4::Koha instead of SQL queries directly

2012-04-05 Thread Dobrica Pavlinusic
This simplifies code, and has nice side-effect that memoize of C4::Koha functions will be more effective. --- C4/Items.pm | 68 ++ 1 files changed, 7 insertions(+), 61 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index

[Koha-patches] [PATCH] Bug 7886 - C4/ShelfBrowser slow SQL performance

2012-04-06 Thread Dobrica Pavlinusic
ShelfBrowser uses two SQL queries with syntax WHERE ((cn_sort = ? AND itemnumber ?) OR cn_sort ?) AND homebranch = ? AND location = ? AND ccode = ? homebranch already has index, and adding indexes on ccode and location improves performance by 30% for each query since MySQL is able to use

Re: [Koha-patches] [PATCH] Bug 7886 - C4/ShelfBrowser slow SQL performance

2012-04-06 Thread Dobrica Pavlinusic
On Fri, Apr 06, 2012 at 10:04:26PM +0200, Marc Balmer wrote: Am 06.04.12 19:10, schrieb Dobrica Pavlinusic: ShelfBrowser uses two SQL queries with syntax WHERE ((cn_sort = ? AND itemnumber ?) OR cn_sort ?) AND homebranch = ? AND location = ? AND ccode = ? homebranch already has

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-04-11 Thread Dobrica Pavlinusic
koha.psgi example and plackup.sh script to run any Koha site intranet or opac interface under plack with optional multi-process Starman server plackup.sh site-name [intranet] site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml All configuration is specified in koha.psgi,

[Koha-patches] [PATCH] Bug 7846 - get_batch_summary massive speedup

2012-04-13 Thread Dobrica Pavlinusic
current code is using DISTINCT and another SQL query which can be replaced with GROUP BY for massive speedup. In our case, generating Manage Batches screen DBI time decreased from 24.762 s to 0.147 s Aside from correct usage of relational database, this change also cleans up code nicely. Test

[Koha-patches] [PATCH] Bug 7846 - get_batch_summary massive speedup

2012-04-13 Thread Dobrica Pavlinusic
current code is using DISTINCT and another SQL query which can be replaced with GROUP BY for massive speedup. In our case, generating Manage Batches screen DBI time decreased from 24.762 s to 0.147 s Aside from correct usage of relational database, this change also cleans up code nicely. This

Re: [Koha-patches] [PATCH] Bug 7846 - get_batch_summary massive speedup

2012-04-13 Thread Dobrica Pavlinusic
On Fri, Apr 13, 2012 at 12:49:34PM +0200, Dobrica Pavlinusic wrote: +use Carp; +use Data::Dump qw(dump); + sub html_table { +Carp::cluck(# html_table ,dump(@_)); my $headers = shift; my $data = shift; return undef if scalar(@$data) == 0; # no need to generate a table

[Koha-patches] [PATCH] Bug 7961 - Local cover images should support CSV link files

2012-04-14 Thread Dobrica Pavlinusic
Corrent code doesn't have support for filenames which contain spaces or commans which breaks CSV files saved from spreadsheet similar to: 12345, conver image, with spaces.jpg This patch tweaks file parsing a bit. We are always splitting line to only two values (to support commas as part of

[Koha-patches] [PATCH] Bug 7500 - Use CSS Sprites for faster page loading

2012-04-18 Thread Dobrica Pavlinusic
I don't think can be done using this technique). A follow-up patch should remove the individual images which have been replaced by the sprite. Signed-off-by: Dobrica Pavlinusic dpav...@rot13.org --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 273 +++- .../opac-tmpl

[Koha-patches] [PATCH] Bug 7213 - simple /svc/ HTTP example

2012-04-19 Thread Dobrica Pavlinusic
Simple command-line client which can authorize itself to Koha, get MARC XML record based on biblio number and update record This script can also be used as module using require koha-svc.pl from other scripts which can implement MARC XML creation or parsing. This is follow up version which now

[Koha-patches] [PATCH] Bug 7213 - simple /svc/ HTTP example

2012-04-19 Thread Dobrica Pavlinusic
Simple command-line client which can authorize itself to Koha, get MARC XML record based on biblio number and update record This script can also be used as module using require koha-svc.pl from other scripts which can implement MARC XML creation or parsing. This is follow up version which now

Re: [Koha-patches] [PATCH] Bug 7213 - simple /svc/ HTTP example

2012-04-19 Thread Dobrica Pavlinusic
On Thu, Apr 19, 2012 at 04:48:42PM +0200, Dobrica Pavlinusic wrote: Simple command-line client which can authorize itself to Koha, get MARC XML record based on biblio number and update record This script can also be used as module using require koha-svc.pl from other scripts which can

[Koha-patches] [PATCH] Bug 8178 - circ/circulation.pl under plack duplicates checkout rows

2012-06-01 Thread Dobrica Pavlinusic
Bug 7851 introduced our scoping for vairables, unfortunatly it has side-effect that checkout rows accumulate on page reloads instead of being initialized to empty array (which this patch fixes) Test scenario: 1. start intranet under plack 2. open /cgi-bin/koha/circ/circulation.pl and reload page

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-06-01 Thread Dobrica Pavlinusic
koha.psgi example and plackup.sh script to run any Koha site intranet or opac interface under plack with optional multi-process Starman server plackup.sh site-name [intranet] site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml All configuration is specified in koha.psgi,

[Koha-patches] [PATCH] Bug 8180 - cataloguing/additem.pl plack scoping

2012-06-01 Thread Dobrica Pavlinusic
$dbh needs our scoping when using Add item to prevent error Can't call method prepare on an undefined value at /srv/koha/cataloguing/additem.pl line 88. Test scenario: 1. start intranet with plack 2. select one Edit items on one record 3. fill in new item and click on Add item ---

[Koha-patches] [PATCH] Bug 8178 - circ/circulation.pl under plack duplicates checkout rows

2012-06-01 Thread Dobrica Pavlinusic
Bug 7851 introduced our scoping for vairables, unfortunatly it has side-effect that checkout rows accumulate on page reloads instead of being initialized to empty array (which this patch fixes) This also fixes %renew_failed initialization on each request. Test scenario: 1. start intranet under

[Koha-patches] [PATCH] Bug 8183 - acqui/parcels.pl plack scoping

2012-06-01 Thread Dobrica Pavlinusic
Scope our $template for plack to prevent following error: Can't call method param on an undefined value at /srv/koha_ffzg/acqui/parcels.pl line 177. Test scenario: 1. Home Acquisitions Search for vendor 2. click on Receive shipment --- acqui/parcels.pl |2 +- 1 files changed, 1

[Koha-patches] [PATCH] Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser

2012-06-01 Thread Dobrica Pavlinusic
Without name option to prFile, PDF::Reuse opens '-' file which is real console STDOUT on plack so pdf file gets emited to terminal instead of sending it to browser. This change creates temporary file using File::Temp, pass it to PDF::Reuse and then reads it back and prints it out for plack (or

[Koha-patches] [PATCH] Bug 7961 - Local cover images should support CSV link files

2012-06-06 Thread Dobrica Pavlinusic
Corrent code doesn't have support for filenames which contain spaces or commans which breaks CSV files saved from spreadsheet similar to: 12345, conver image, with spaces.jpg This patch tweaks file parsing a bit. We are always splitting line to only two values (to support commas as part of

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-06-10 Thread Dobrica Pavlinusic
koha.psgi example and plackup.sh script to run any Koha site intranet or opac interface under plack with optional multi-process Starman server plackup.sh site-name [intranet] site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml All configuration is specified in koha.psgi,

[Koha-patches] [PATCH] Bug 7952 - PDF::Reuse under plack writes to console STDOUT instead to browser

2012-06-10 Thread Dobrica Pavlinusic
Without name option to prFile, PDF::Reuse opens '-' file which is real console STDOUT on plack so pdf file gets emited to terminal instead of sending it to browser. This change creates temporary file using File::Temp, pass it to PDF::Reuse and then reads it back and prints it out for plack (or

[Koha-patches] [PATCH] Bug 7961 - Local cover images should support CSV link files

2012-06-10 Thread Dobrica Pavlinusic
Corrent code doesn't have support for filenames which contain spaces or commans which breaks CSV files saved from spreadsheet similar to: 12345, conver image, with spaces.jpg This patch tweaks file parsing a bit. We are always splitting line to only two values (to support commas as part of

[Koha-patches] [PATCH] Bug 7844 - plack intranet tooling for developers

2012-06-11 Thread Dobrica Pavlinusic
koha.psgi example and plackup.sh script to run any Koha site intranet or opac interface under plack with optional multi-process Starman server plackup.sh site-name [intranet] site-name is used to find config /etc/koha/sites/site-name/koha-conf.xml All configuration is specified in koha.psgi,

[Koha-patches] [PATCH] Bug 7952 - followup to fix t/Creators.t

2012-06-14 Thread Dobrica Pavlinusic
Since we are now using temporary file, we are creating test.pdf at end of test and checking if it exists and have non-zero size. --- t/Creators.t | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/t/Creators.t b/t/Creators.t index 720aa2c..85701c2 100755 ---

[Koha-patches] [PATCH] Bug 8247 - adding basket doesn't save basket name, internal or vendor note

2012-06-14 Thread Dobrica Pavlinusic
URL: /cgi-bin/koha/acqui/basketheader.pl?booksellerid=32op=add_form I'm also getting mysql referential integrity error: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_srvgit`.`aqbasket`, CONSTRAINT `aqbasket_ibfk_1` FOREIGN KEY

[Koha-patches] [PATCH] Bug 8418 - Koha::Calendar is_holiday ignores repeating holidays

2012-07-11 Thread Dobrica Pavlinusic
This is simple fix since day_month_closed_days hash has wrong arguments order. --- Koha/Calendar.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index dc132cd..ab01e53 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -150,7

[Koha-patches] [PATCH 1/3] Bug 8418 - Koha::Calendar is_holiday ignores repeating holidays

2012-07-11 Thread Dobrica Pavlinusic
This is simple fix since day_month_closed_days hash has wrong arguments order. --- Koha/Calendar.pm |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index dc132cd..ab01e53 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -150,7

[Koha-patches] [PATCH 2/3] Bug 8418 - fix dt-truncate( to = 'day' )

2012-07-11 Thread Dobrica Pavlinusic
--- Koha/Calendar.pm |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm index ab01e53..2c372f2 100644 --- a/Koha/Calendar.pm +++ b/Koha/Calendar.pm @@ -147,7 +147,7 @@ sub is_holiday { if ( $self-{weekly_closed_days}-[$dow] == 1

[Koha-patches] [PATCH] Bug 8439 - Printing basketgroup does not work on plack

2012-07-16 Thread Dobrica Pavlinusic
scope $input CGI object with our for plack --- acqui/basketgroup.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 3300cea..fd49c30 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -58,7 +58,7 @@ use

[Koha-patches] [PATCH 1/2] Bug 8439 - Printing basketgroup does not work on plack

2012-07-19 Thread Dobrica Pavlinusic
scope $input CGI object with our for plack --- acqui/basketgroup.pl |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 3300cea..fd49c30 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -58,7 +58,7 @@ use

[Koha-patches] [PATCH 2/2] Bug 8439 - plack code cleanup

2012-07-19 Thread Dobrica Pavlinusic
- remove all exit(1) and replace them with __END__ which benefits CGI - insert correct =cut markers at end of POD (required for CGI::Compile under plack to correctly parse source code and exeute it) - scope variables with our which are used inside sub for plack --- labels/label-create-csv.pl |

[Koha-patches] [PATCH] Bug 8482 - labels creator fixes for plack

2012-07-20 Thread Dobrica Pavlinusic
- remove all exit(1) and replace them with __END__ which benefits CGI - insert correct =cut markers at end of POD (required for CGI::Compile under plack to correctly parse source code and exeute it) - scope variables with our which are used inside sub for plack --- labels/label-create-csv.pl |

[Koha-patches] [PATCH] Bug 8442 - labels creator fixes for plack

2012-07-20 Thread Dobrica Pavlinusic
- remove all exit(1) and replace them with __END__ which benefits CGI - insert correct =cut markers at end of POD (required for CGI::Compile under plack to correctly parse source code and exeute it) - scope variables with our which are used inside sub for plack --- labels/label-create-csv.pl |

Re: [Koha-patches] [PATCH] Bug 8482 - labels creator fixes for plack

2012-07-20 Thread Dobrica Pavlinusic
Sorry for confusion, this patch was surposed to be attached to Bug 8442, but it seems it's too hot it Croatia for me to do it correctly :-) -- Dobrica Pavlinusic 2share!2flamedpav...@rot13.org Unix addict. Internet consultant. http://www.rot13.org/~dpavlin

[Koha-patches] [PATCH] Bug 8919 - ExtendedPatronAttributes not populated from LDAP

2012-10-16 Thread Dobrica Pavlinusic
Current code is overly complex and assumes that C4::Members::AttributeTypes::GetAttributeTypes returns array of attribute codes which is not true. Instead it return array of hashes so none of extended attributes will be replicated from LDAP. This code correctly extracts extended attributes from

[Koha-patches] [PATCH] Bug 8919 - ExtendedPatronAttributes not populated from LDAP

2012-10-16 Thread Dobrica Pavlinusic
Current code is overly complex and assumes that C4::Members::AttributeTypes::GetAttributeTypes returns array of attribute codes which is not true. Instead it return array of hashes so none of extended attributes will be replicated from LDAP. This code correctly extracts extended attributes from

[Koha-patches] [PATCH] Bug 8953 - opac-userupdate encoding issues

2012-10-22 Thread Dobrica Pavlinusic
This script has various encoding problems: 1. parametars from CGI are not encoded in utf-8, so when they are compared with utf-8 strings from database every field with utf-8 characters will be reported in e-mail as changed 2. when sending e-mail, wide characters are passed to Mail::Sendmail

[Koha-patches] [PATCH] Bug 9346 - acqui/neworderempty.pl ignores exchange rates and destroys user data on page load

2013-01-03 Thread Dobrica Pavlinusic
This restores behaviour of new order form before Bug 5335 merge Test scenario: 1. load Receipt summary for existing customer 2. take note of Unit cost and Order cost 3. open existing order line and verify that Replacement cost, Budgeted cost and Total are not re-calculated on page load 4.

[Koha-patches] [PATCH] Bug 9662 - ISSN search field not passed to Z3950Search

2013-02-19 Thread Dobrica Pavlinusic
Seems like simple omission when passing $pars hash to Z3950Search function. Test scenario: 1. select any Z39.50 search form and enter valid ISSN 2. verify that you don't get any results from remote servers 3. apply this patch and re-check that results are now availble ---

[Koha-patches] [PATCH] Bug 9727: Fix typo in variable name

2013-03-18 Thread Dobrica Pavlinusic
name at Koha/SearchEngine/Solr/Index.pm line 43. Koha/SearchEngine/Solr/Index.pm had compilation errors. after Koha/SearchEngine/Solr/Index.pm syntax OK Signed-off-by: Dobrica Pavlinusic dpav...@rot13.org --- Koha/SearchEngine/Solr/Index.pm |2 +- 1 files changed, 1 insertions(+), 1

[Koha-patches] [PATCH] Bug 10451 - Firefox prints only first page of table with shrink to fit option

2013-11-14 Thread Dobrica Pavlinusic
According to Firefox bug tracker, versions up to 21 doesn't print tables correctly when using shrink to fit option. See: https://bugzilla.mozilla.org/show_bug.cgi?id=684622 However, even with v21 or newer, we still need to add css to print media which instruct it not to break table tag to print

[Koha-patches] [PATCH] Bug 10670 - koha-common fails to start zebra without log permissions

2013-11-14 Thread Dobrica Pavlinusic
If koha-common is started when zebra log files are owned by root it will fail to start without any useful message (since zebra can't write errors in log files because it lacks permissions to do so). This patch creates empty log files and ensure they have correct permissions. I can't pin-point

[Koha-patches] [PATCH] Bug 10451 - Firefox prints only first page of table with shrink to fit option

2013-11-14 Thread Dobrica Pavlinusic
According to Firefox bug tracker, versions up to 21 doesn't print tables correctly when using shrink to fit option. See: https://bugzilla.mozilla.org/show_bug.cgi?id=684622 However, even with v21 or newer, we still need to add css to print media which instruct it not to break table tag to print

[Koha-patches] [PATCH 2/2] Bug 8378 - show all items columns and new items.fine

2013-11-14 Thread Dobrica Pavlinusic
This allows users to select any columns from items and adds new items.fine field introduced by previous patch to user interface. --- tools/letter.pl |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/letter.pl b/tools/letter.pl index a462aba..68c6701 100755 ---

  1   2   >