From chrisc at catalyst.net.nz Fri Oct 1 04:39:01 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 1 Oct 2010 15:39:01 +1300 Subject: [Koha-patches] [PATCH] Updating history doc Message-ID: <1285900742-28166-1-git-send-email-chrisc@catalyst.net.nz> --- docs/history.txt | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index cf9f5ab..e71d6d3 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -493,3 +493,10 @@ May 4 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Commun May 5 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_Meeting,_May_5_2010 May 5 2010 Matthew Hunt becomes the 114th committer to have a patch accepted May 19 2010 Marcel de Rooy becomes the 115th committer to have a patch accepted +July 19 2010 Andrew Chilton becomes the 116th committer to have a patch accepted +June 2 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_June_2010 +July 7 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_July_2010 +July 13 2010 License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010 +August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010 +September 1 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010 + -- 1.7.0.4 From chrisc at catalyst.net.nz Fri Oct 1 04:39:02 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Fri, 1 Oct 2010 15:39:02 +1300 Subject: [Koha-patches] [PATCH] Missed adding the beta release In-Reply-To: <1285900742-28166-1-git-send-email-chrisc@catalyst.net.nz> References: <1285900742-28166-1-git-send-email-chrisc@catalyst.net.nz> Message-ID: <1285900742-28166-2-git-send-email-chrisc@catalyst.net.nz> --- docs/history.txt | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index e71d6d3..a1179d5 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -496,6 +496,7 @@ May 19 2010 Marcel de Rooy becomes the 115th committer to have a patch accepted July 19 2010 Andrew Chilton becomes the 116th committer to have a patch accepted June 2 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_June_2010 July 7 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_July_2010 +June 25 2010 Koha 3.2 Beta released http://koha-community.org/koha-3-2-beta-released/ July 13 2010 License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010 August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010 September 1 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010 -- 1.7.0.4 From oleonard at myacpl.org Fri Oct 1 16:47:10 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Fri, 1 Oct 2010 10:47:10 -0400 Subject: [Koha-patches] [PATCH] Changes to list contents view to make it consistent with search results Message-ID: <1285944430-3643-1-git-send-email-oleonard@myacpl.org> My intention is to make the OPAC more consistent in the way it displays lists of items, whether it be in search results, lists, etc. This patch adds data to the list contents output and reformats it to that end. The other significant change is the removal of jQuery table sorting. Since list contents are both sorted and paginated on the server side. Adding a client-side sort to one page of many doesn't make sense. Other changes include: - Change "Your lists" to "Your private lists" - Remove "sort by" column because it seems unnecessary - Adding logic to control display of count (item or items rather than item(s) - Styling pagination bar and placing at the bottom of the page, consistent with other instances of pagination navigation --- C4/VirtualShelves.pm | 3 +- C4/VirtualShelves/Page.pm | 25 +++- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 53 ++---- .../opac-tmpl/prog/en/modules/opac-shelves.tmpl | 199 ++++++++++++------- koha-tmpl/opac-tmpl/prog/images/download.png | Bin 369 -> 425 bytes 5 files changed, 169 insertions(+), 111 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index fa599bd..6dfd13b 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -126,6 +126,7 @@ sub GetShelves ($$$$) { $firstname, $category, $sortfield, $count ) = $sth2->fetchrow ) { $shelflist{$shelfnumber}->{'shelfname'} = $shelfname; $shelflist{$shelfnumber}->{'count'} = $count; + if($count eq 1){ $shelflist{$shelfnumber}->{'single'} = 1; } $shelflist{$shelfnumber}->{'sortfield'} = $sortfield; $shelflist{$shelfnumber}->{'category'} = $category; $shelflist{$shelfnumber}->{'owner'} = $owner; @@ -266,7 +267,7 @@ sub GetShelfContents ($;$$$) { } my $query = " SELECT vc.biblionumber, vc.shelfnumber, vc.dateadded, itemtypes.*, - biblio.*, biblioitems.itemtype, biblioitems.publicationyear + biblio.*, biblioitems.itemtype, biblioitems.publicationyear, biblioitems.publishercode, biblioitems.place, biblioitems.size, biblioitems.pages FROM virtualshelfcontents vc LEFT JOIN biblio ON vc.biblionumber = biblio.biblionumber LEFT JOIN biblioitems ON biblio.biblionumber = biblioitems.biblionumber diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 73ca42d..c70b08c 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -31,6 +31,7 @@ use C4::Auth qw/get_session/; use C4::Members; use C4::Output; use C4::Dates qw/format_date/; +use C4::Tags qw(get_tags); use Exporter; use Data::Dumper; use C4::Csv; @@ -61,6 +62,7 @@ sub shelfpage ($$$$$) { my $itemoff = ( $query->param('itemoff') ? $query->param('itemoff') : 1 ); my $displaymode = ( $query->param('display') ? $query->param('display') : 'publicshelves' ); my ( $shelflimit, $shelfoffset, $shelveslimit, $shelvesoffset ); + my $marcflavour = C4::Context->preference("marcflavour"); # FIXME: These limits should not be hardcoded... $shelflimit = 20; # Limits number of items returned for a given query @@ -174,11 +176,19 @@ sub shelfpage ($$$$$) { } if ( $shelfnumber = $query->param('viewshelf') ) { + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); + if (C4::Context->preference('TagsEnabled')) { + $template->param(TagsEnabled => 1); + foreach (qw(TagsShowOnList TagsInputOnList)) { + C4::Context->preference($_) and $template->param($_ => 1); + } + } #check that the user can view the shelf if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'view' ) ) { my $items; my $authorsort; my $yearsort; + my $tag_quantity; my $sortfield = ( $query->param('sortfield') ? $query->param('sortfield') : 'title' ); if ( $sortfield eq 'author' ) { $authorsort = 'author'; @@ -198,11 +208,22 @@ sub shelfpage ($$$$$) { $this_item->{'imageurl'} = getitemtypeinfo( $this_item->{'itemtype'} )->{'imageurl'}; $this_item->{'coins'} = GetCOinSBiblio( $this_item->{'biblionumber'} ); $this_item->{'subtitle'} = GetRecordValue('subtitle', $record, GetFrameworkCode($this_item->{'biblionumber'})); - + $this_item->{'normalized_upc'} = GetNormalizedUPC( $record,$marcflavour); + $this_item->{'normalized_ean'} = GetNormalizedEAN( $record,$marcflavour); + $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour); + $this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour); # Getting items infos for location display my @items_infos = &GetItemsInfo( $this_item->{'biblionumber'}, $type ); + $this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} ); $this_item->{'ITEM_RESULTS'} = \@items_infos; + if (C4::Context->preference('TagsEnabled') and $tag_quantity = C4::Context->preference('TagsShowOnList')) { + $this_item->{'TagLoop'} = get_tags({ + biblionumber=>$this_item->{'biblionumber'}, approved=>1, 'sort'=>'-weight', + limit=>$tag_quantity + }); + } + } push @paramsloop, { display => 'privateshelves' } if $category == 1; $showadd = 1; @@ -255,7 +276,7 @@ sub shelfpage ($$$$$) { if ( my $count = scalar @$contents ) { unless ( scalar grep { /^CONFIRM-$number$/ } $query->param() ) { if ( defined $shelflist->{$number} ) { - push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $count } ); + push( @paramsloop, { need_confirm => $shelflist->{$number}->{shelfname}, count => $count, single => ($count eq 1 ? 1:0) } ); $shelflist->{$number}->{confirm} = $number; } else { push( @paramsloop, { need_confirm => $privshelflist->{$number}->{shelfname}, count => $count } ); diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 5142dd2..ecbb4ac 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -436,6 +436,14 @@ a .term { /* toolbar buttons */ +#toolbar { +background-color:#EEEEEE; +border:1px solid #E8E8E8; +margin : .5em 0; +padding:3px 3px 5px 5px; +vertical-align:middle; +} + #toolbar a, #toolbar input { white-space : nowrap; @@ -1053,38 +1061,9 @@ td.resultscontrol img { line-height : 1.8em; text-align: center; } -a:link.current { - background-color: transparent; - color: #3366CC; - font-weight: bold; - padding: 1px 5px 1px 5px; - text-decoration: none; -} -a:visited.current { - background-color: transparent; - color: #3366CC; - font-weight: bold; - padding: 1px 5px 1px 5px; - text-decoration: none; -} - -a:hover.current { - background-color: #CCFF00; - color: #CC3333; - font-weight: bold; - padding: 1px 5px 1px 5px; - text-decoration: none; -} - -a:active.current { - background-color: #99CC00; - color: #FFFF99; - font-weight: bold; - padding: 1px 5px 1px 5px; - text-decoration: none; -} -.current { +.current, +.currentPage { background-color: #FFFFFF; color: #3366CC; font-weight: bold; @@ -1092,7 +1071,8 @@ a:active.current { text-decoration: none; } -a:link.nav { +a:link.nav, +div.pages a:link { background-color: #EEE; border: 1px solid #CCCC99; color: #3366CC; @@ -1101,7 +1081,8 @@ a:link.nav { text-decoration: none; } -a:visited.nav { +a:visited.nav, +div.pages a:visited { background-color: #EEE; border: 1px solid #CCCC99; color: #3366CC; @@ -1110,7 +1091,8 @@ a:visited.nav { text-decoration: none; } -a:hover.nav { +a:hover.nav, +div.pages a:hover { background-color: #FFFFCC; border: 1px solid #CCCC99; color: #CC3333; @@ -1119,7 +1101,8 @@ a:hover.nav { text-decoration: none; } -a:active.nav { +a:active.nav, +div.pages a:active { background-color: #FFFFCC; border: 1px solid #CCCC99; color: #D25500; diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl index bb2078a..769e274 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shelves.tmpl @@ -6,12 +6,6 @@ var MSG_NO_TAG_SPECIFIED = _("No tag was specified."); var MSG_REMOVE_FROM_LIST = _("Are you sure you want to remove these items from the list?"); var MSG_CONFIRM_DELETE_LIST = _("Are you sure you want to delete this list?"); -$.tablesorter.addParser({ - id: 'articles', - is: function(s) {return false; }, - format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); }, - type: 'text' -}); function holdSelections() { var checkedBoxes = $(":checkbox:checked"); @@ -73,6 +67,7 @@ function tagAdded() { } $(function() { + $(".addtocart").show(); $("span.clearall").html(""+_('Clear All')+"<\/a>|"); $("span.checkall").html(""+_('Select All')+"<\/a>"); $("a.print").show(); @@ -81,18 +76,6 @@ $(function() { holdSelections(); return false; }); - $("#listcontents").tablesorter({ - widgets : ['zebra'], - - sortList: [[2,0]], - - sortList: [[3,1]], - - sortList: [[1,0]], - - headers: { 0: { sorter: false },1:{sorter: 'articles'} - } - }); $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -101,17 +84,32 @@ $(function() { $(".checkboxed").unCheckCheckboxes(); return false; }); - - $("#addtags").click(function(){ - tagSelected(); - return false; - }); - $("#addtags").html(""+_("Tag")+"<\/a> |"); - $("#tagsel_button").click(function(){ - tagAdded(); - return false; - }); + + $("#addtags").html(""+_("Tag")+"<\/a> |"); + $(".tagbutton").click(KOHA.Tags.add_tag_button); + + + $("#tagsel_tag").click(function(){ + tagSelected(); + return false; + }); + $("#tagsel_cancel").click(function(){ + tagCanceled(); + return false; + }); + $("#tagsel_button").click(function(){ + tagAdded(); + return false; + }); + + $("#tagsel_tag").click(function(){ + window.location = "/cgi-bin/koha/opac-user.pl"; + return false; + }); + + + KOHA.Google.GetCoverFromIsbn(); }); function Check(f) { var _alertString=""; @@ -152,7 +150,7 @@ $(function() {
The list is not empty. -
It has entries. +
It has entryentries.
Use the "Confirm" button below to confirm deletion.
@@ -180,7 +178,6 @@ $(function() {
-

Lists /../images/caret.gif" width="16" height="16" alt=">" border="0" />

@@ -227,16 +224,8 @@ $(function() { " /> - +
- - - - - - - - @@ -251,35 +240,105 @@ $(function() { " alt="" title="" /> - - - - +
 Item TypeTitleAuthorYearLocation
"> - "> "> + + " title="View details for this title"> + + " title="View details for this title"> + " title="View details for this title"> + + + No title + by " title="Search for works by this author" class="author"> +   + + Publication: + + + . + , + + + Holdings: + , + + ()., + + This record has no items. + + + + +
+ Tags: + + + + +
" method="post" action="/cgi-bin/koha/opac-tags.pl"> + + " id="newtag" maxlength="100" /> + " type="submit" value="Add" /> +
+ _status" class="tagstatus" style="display:none;"> + Tag status here. + + Log in to add tags. + + + +
+ + + +Actions: + + + + + ">Place Hold + + + ">Place Hold + + + + + + + " onclick="Dopop('opac-addbybiblionumber.pl?biblionumber='); return false;">Save to another list + + + '); return false;">Add to Cartnocart + + + + ">
_status" class="tagstatus results_summary" style="display:none">Tag status here.
- - - - - - - -

- , - - () - -

- This record has no items. -
+ "> + .01.TZZZZZZZ.jpg" alt="" class="thumbnail" />No cover image available + + + /SC.GIF&client=&type=xw10&upc=&oclc=" alt="" class="thumbnail" /> + + /SC.GIF&client=&type=xw10&upc=&oclc=" alt="" class="thumbnail" /> + +
" class="" id="gbs-thumbnail">
No cover image available +
+ ">See Baker & Taylor" />No cover image available +
+
+
This List is empty. You can add to your lists from the results of any search!
@@ -338,14 +397,14 @@ $(function() {

Lists

@@ -359,12 +418,10 @@ $(function() {
New List
- - @@ -375,9 +432,7 @@ $(function() { - - +
List Name ContentsSort by Type  
&sortfield="> item(s)AuthorYearTitle - itemitemsEmpty Private Public @@ -407,6 +462,7 @@ $(function() {
+
No Private Lists. @@ -429,12 +485,10 @@ $(function() {
Log in to create new Lists.
- - @@ -444,9 +498,7 @@ $(function() { - - +
List Name ContentsSort by Type 
&sortfield="> item(s)AuthorYearTitle - itemitem(s) Private Public @@ -474,6 +526,7 @@ $(function() {
+
No Public Lists. diff --git a/koha-tmpl/opac-tmpl/prog/images/download.png b/koha-tmpl/opac-tmpl/prog/images/download.png index bf1394d0c3a442ff33170c608aabe262ce0851c5..0d5bcb89a59037437ffceaa95099057b805c46b3 100644 GIT binary patch delta 345 zcmey!w32y3WPL?|Pl&6cfBn~A{}lb}mL9yT6xgJjFtKj-_OIVAzWDT4Ewr_6*7o0j z|7*weKKk(I{kMO52@^xAm+UzI%pq^i|NsA=fBLH((-%^+C<*cl2AV|- zVA!`xPXef?+0(@_q~camKzMj~Kmfxe2F4={M|=(`2q`o;L`<5^>cPY!(7dZ>kImve zJj<;d7z|gOKK1dWr}ybq%q#){)7)E}V?ttOgA^Jhu84|8R{j(fy~@bc(dZi*8p_nM zlYyzj(bZLwBXr7Cps1rmXRN2E=Y&Wekn$^6mb5HsP;qErWTOV delta 289 zcmV++0p9+p1MvcoS$}mxhTQ4)A5DBHSc*MtoF!F- z-0Ao3_WgL4v`%-S?)LuO>Gq<(+xz|h=<@t8VwFB at o9OcWBT<3%`u^|s{vuI=VTGwC zRfXd4{Pp(GD_o5sPk$?1j From: Srdjan Jankovic Raise warning rather than disallowing Remove due date js validation when checking out Signed-off-by: Robin Sheat --- C4/Circulation.pm | 9 +++++++-- circ/circulation.pl | 12 ++++++------ .../prog/en/modules/circ/circulation.tmpl | 13 ++++++++++--- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 644ab27..1962d57 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -641,7 +641,7 @@ reserved for someone else. =head3 INVALID_DATE -sticky due date is invalid +sticky due date is invalid or due date in the past =head3 TOO_MANY @@ -679,7 +679,12 @@ sub CanBookBeIssued { # Offline circ calls AddIssue directly, doesn't run through here # So issuingimpossible should be ok. } - $issuingimpossible{INVALID_DATE} = $duedate->output('syspref') unless ( $duedate && $duedate->output('iso') ge C4::Dates->today('iso') ); + if ($duedate) { + $needsconfirmation{INVALID_DATE} = $duedate->output('syspref') + unless $duedate->output('iso') ge C4::Dates->today('iso'); + } else { + $issuingimpossible{INVALID_DATE} = $duedate->output('syspref'); + } # # BORROWER STATUS diff --git a/circ/circulation.pl b/circ/circulation.pl index 4b67920..4a79695 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -142,13 +142,13 @@ if($duedatespec_allow){ if ($duedatespec) { if ($duedatespec =~ C4::Dates->regexp('syspref')) { my $tempdate = C4::Dates->new($duedatespec); - if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) { - # i.e., it has to be later than today/now +# if ($tempdate and $tempdate->output('iso') gt C4::Dates->new()->output('iso')) { +# # i.e., it has to be later than today/now $datedue = $tempdate; - } else { - $invalidduedate = 1; - $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); - } +# } else { +# $invalidduedate = 1; +# $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); +# } } else { $invalidduedate = 1; $template->param(IMPOSSIBLE=>1, INVALID_DATE=>$duedatespec); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index 980d195..73bc536 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -267,7 +267,14 @@ function refocus(calendar) { " /> + +

+ " /> + +

+ " /> + " /> " /> @@ -420,7 +427,7 @@ No patron matched - + >"/> @@ -449,8 +456,8 @@ No patron matched inputField : "duedatespec", ifFormat : "", button : "CalendarDueDate", - disableFunc : validate1, - dateStatusFunc : validate1, +// disableFunc : validate1, +// dateStatusFunc : validate1, onClose : refocus } ); -- 1.7.1 From oleonard at myacpl.org Mon Oct 4 15:54:18 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 4 Oct 2010 09:54:18 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5269 - link to patron edit form when editing turned off Message-ID: <1286200458-6328-1-git-send-email-oleonard@myacpl.org> --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl index 2b62407..001d947 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -102,13 +102,13 @@ $.tablesorter.addParser({
    -
  • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please consult a librarian.
  • +
  • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
  • -
  • Please note: According to our records, we don't have up-to-date contact information on file. Please contact your librarian, or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)
  • +
  • Please note: According to our records, we don't have up-to-date contact informationcontact information on file. Please contact the library or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online).
  • -
  • Please note: Your library card has been marked as lost or stolen. If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.
  • +
  • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
  • Please note: Since you have more than in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
  • -- 1.7.0.4 From oleonard at myacpl.org Mon Oct 4 16:32:42 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 4 Oct 2010 10:32:42 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5265, error message on lists is misleading Message-ID: <1286202762-6738-1-git-send-email-oleonard@myacpl.org> The check to see if an item exists always evaluates as true. Correcting this lets the script handle the error as it was designed to. --- C4/VirtualShelves/Page.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 73ca42d..9d15847 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -89,7 +89,8 @@ sub shelfpage ($$$$$) { if ( $shelfnumber = $query->param('viewshelf') ) { if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ) ) { if ( $barcode = $query->param('addbarcode') ) { - if ( $item = GetItem( 0, $barcode ) ) { + $item = GetItem( 0, $barcode ); + if (defined $item && $item->{'itemnumber'}){ $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'} ); AddToShelf( $biblio->{'biblionumber'}, $shelfnumber ) or push @paramsloop, { duplicatebiblio => $barcode }; -- 1.7.0.4 From oleonard at myacpl.org Mon Oct 4 17:11:33 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Mon, 4 Oct 2010 11:11:33 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5240 - next link hidden on edit subfields Message-ID: <1286205093-6991-1-git-send-email-oleonard@myacpl.org> This patch removes the pagination altogether, displaying everything on one page. It also moves some HTML out of the script and into the template. --- admin/marc_subfields_structure.pl | 23 +------------------ .../en/modules/admin/marc_subfields_structure.tmpl | 2 +- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index bae9c65..372a811 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -76,7 +76,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( debug => 1, } ); -my $pagesize = 30; + my $op = $input->param('op'); $tagfield =~ s/\,//g; @@ -531,12 +531,7 @@ elsif ( $op eq 'delete_confirmed' ) { else { # DEFAULT my ( $count, $results ) = string_search( $tagfield, $frameworkcode ); my @loop_data = (); - for ( - my $i = $offset ; - $i < ( $offset + $pagesize < $count ? $offset + $pagesize : $count ) ; - $i++ - ) - { + for ( my $i = 0; $i < $count; $i++ ) { my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{tagsubfield} = $results->[$i]{'tagsubfield'}; @@ -552,10 +547,6 @@ else { # DEFAULT $row_data{hidden} = $results->[$i]{'hidden'}; $row_data{isurl} = $results->[$i]{'isurl'}; $row_data{link} = $results->[$i]{'link'}; - $row_data{delete} = -"$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=" - . $results->[$i]{'tagsubfield'} - . "&frameworkcode=$frameworkcode"; if ( $row_data{tab} eq -1 ) { $row_data{subfield_ignored} = 1; @@ -569,16 +560,6 @@ else { # DEFAULT edit_frameworkcode => $frameworkcode ); - if ( $offset > 0 ) { - my $prevpage = $offset - $pagesize; - $template->param( - prev => "" ); - } - if ( $offset + $pagesize < $count ) { - my $nextpage = $offset + $pagesize; - $template->param( - next => "" ); - } } #---- END $OP eq DEFAULT output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index 2ea58de..201aad5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -207,7 +207,7 @@ | Link:, - ">Delete + &tagsubfield=&frameworkcode=">Delete -- 1.7.0.4 From nengard at bywatersolutions.com Mon Oct 4 17:11:11 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Mon, 4 Oct 2010 11:11:11 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5265, error message on lists is misleading Message-ID: <1286205071-2336-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard The check to see if an item exists always evaluates as true. Correcting this lets the script handle the error as it was designed to. Signed-off-by: Nicole Engard --- C4/VirtualShelves/Page.pm | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/C4/VirtualShelves/Page.pm b/C4/VirtualShelves/Page.pm index 73ca42d..9d15847 100644 --- a/C4/VirtualShelves/Page.pm +++ b/C4/VirtualShelves/Page.pm @@ -89,7 +89,8 @@ sub shelfpage ($$$$$) { if ( $shelfnumber = $query->param('viewshelf') ) { if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ) ) { if ( $barcode = $query->param('addbarcode') ) { - if ( $item = GetItem( 0, $barcode ) ) { + $item = GetItem( 0, $barcode ); + if (defined $item && $item->{'itemnumber'}){ $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'} ); AddToShelf( $biblio->{'biblionumber'}, $shelfnumber ) or push @paramsloop, { duplicatebiblio => $barcode }; -- 1.5.6.5 From nengard at bywatersolutions.com Mon Oct 4 17:23:22 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Mon, 4 Oct 2010 11:23:22 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5240 - next link hidden on edit subfields Message-ID: <1286205802-2458-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard This patch removes the pagination altogether, displaying everything on one page. It also moves some HTML out of the script and into the template. Signed-off-by: Nicole Engard --- admin/marc_subfields_structure.pl | 23 +------------------ .../en/modules/admin/marc_subfields_structure.tmpl | 2 +- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index bae9c65..372a811 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -76,7 +76,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( debug => 1, } ); -my $pagesize = 30; + my $op = $input->param('op'); $tagfield =~ s/\,//g; @@ -531,12 +531,7 @@ elsif ( $op eq 'delete_confirmed' ) { else { # DEFAULT my ( $count, $results ) = string_search( $tagfield, $frameworkcode ); my @loop_data = (); - for ( - my $i = $offset ; - $i < ( $offset + $pagesize < $count ? $offset + $pagesize : $count ) ; - $i++ - ) - { + for ( my $i = 0; $i < $count; $i++ ) { my %row_data; # get a fresh hash for the row data $row_data{tagfield} = $results->[$i]{'tagfield'}; $row_data{tagsubfield} = $results->[$i]{'tagsubfield'}; @@ -552,10 +547,6 @@ else { # DEFAULT $row_data{hidden} = $results->[$i]{'hidden'}; $row_data{isurl} = $results->[$i]{'isurl'}; $row_data{link} = $results->[$i]{'link'}; - $row_data{delete} = -"$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=" - . $results->[$i]{'tagsubfield'} - . "&frameworkcode=$frameworkcode"; if ( $row_data{tab} eq -1 ) { $row_data{subfield_ignored} = 1; @@ -569,16 +560,6 @@ else { # DEFAULT edit_frameworkcode => $frameworkcode ); - if ( $offset > 0 ) { - my $prevpage = $offset - $pagesize; - $template->param( - prev => "" ); - } - if ( $offset + $pagesize < $count ) { - my $nextpage = $offset + $pagesize; - $template->param( - next => "" ); - } } #---- END $OP eq DEFAULT output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl index 2ea58de..201aad5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_subfields_structure.tmpl @@ -207,7 +207,7 @@ | Link:, - ">Delete + &tagsubfield=&frameworkcode=">Delete -- 1.5.6.5 From nengard at bywatersolutions.com Mon Oct 4 17:38:48 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Mon, 4 Oct 2010 11:38:48 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5269 - link to patron edit form when editing turned off Message-ID: <1286206728-2575-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard Signed-off-by: Nicole Engard --- koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl index 2b62407..001d947 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-user.tmpl @@ -102,13 +102,13 @@ $.tablesorter.addParser({
      -
    • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please consult a librarian.
    • +
    • Please note: Your account has been frozen. Usually the reason for freezing an account is old overdues or damage fees.If your account page shows your account to be clear, please contact the library.
    • -
    • Please note: According to our records, we don't have up-to-date contact information on file. Please contact your librarian, or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online)
    • +
    • Please note: According to our records, we don't have up-to-date contact informationcontact information on file. Please contact the library or use the online update form to submit current information (Please note: there may be a delay in restoring your account if you submit online).
    • -
    • Please note: Your library card has been marked as lost or stolen. If this is an error, please take your card to the circulation desk at your local library and the error will be corrected.
    • +
    • Please note: Your library card has been marked as lost or stolen. If this is an error, please contact the library.
    • Please note: Since you have more than in fines, you cannot renew your books online. Please pay your fines if you wish to renew your books.
    • -- 1.5.6.5 From colin.campbell at ptfs-europe.com Tue Oct 5 11:32:36 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Tue, 5 Oct 2010 10:32:36 +0100 Subject: [Koha-patches] [PATCH] Bug 2664: Add item should preselect logged in branch Message-ID: <1286271156-3388-1-git-send-email-colin.campbell@ptfs-europe.com> An earlier fix to stop branch values being overwritten in edit items was causing the branch value to be unset when adding items --- cataloguing/additem.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index ea4daf9..e6f19d2 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -433,7 +433,10 @@ foreach my $tag (sort keys %{$tagslib}) { foreach my $thisbranch (@$branches) { push @authorised_values, $thisbranch->{value}; $authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname}; - # $value = $thisbranch->{value} if $thisbranch->{selected}; + # in edit item this is set to the data value otherwise use default + if ($op ne 'edititem' && $thisbranch->{selected} ) { + $value = $thisbranch->{value}; + } } } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { -- 1.7.2.3 From nengard at bywatersolutions.com Tue Oct 5 13:48:25 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Tue, 5 Oct 2010 07:48:25 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 2664: Add item should preselect logged in branch Message-ID: <1286279305-2326-1-git-send-email-nengard@bywatersolutions.com> From: Colin Campbell An earlier fix to stop branch values being overwritten in edit items was causing the branch value to be unset when adding items Signed-off-by: Nicole Engard --- cataloguing/additem.pl | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index ea4daf9..e6f19d2 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -433,7 +433,10 @@ foreach my $tag (sort keys %{$tagslib}) { foreach my $thisbranch (@$branches) { push @authorised_values, $thisbranch->{value}; $authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname}; - # $value = $thisbranch->{value} if $thisbranch->{selected}; + # in edit item this is set to the data value otherwise use default + if ($op ne 'edititem' && $thisbranch->{selected} ) { + $value = $thisbranch->{value}; + } } } elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { -- 1.5.6.5 From chrisc at catalyst.net.nz Tue Oct 5 21:53:49 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Wed, 6 Oct 2010 08:53:49 +1300 Subject: [Koha-patches] [SIGNED-OFF] [PATCH] Bug 5194 - Patron notification on new issues not working Message-ID: <1286308429-29392-1-git-send-email-chrisc@catalyst.net.nz> From: Katrin Fischer Signed-off-by: Chris Cormack --- C4/Letters.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 885ed5f..62b339a 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -275,7 +275,7 @@ sub SendAlerts { # and parse borrower ... my $innerletter = $letter; - my $borinfo = GetMember( 'borrowernumber' => $_->{'borrowernumber'}); + my $borinfo = C4::Members::GetMember('borrowernumber' => $_->{'borrowernumber'}); parseletter( $innerletter, 'borrowers', $_->{'borrowernumber'} ); # ... then send mail -- 1.7.0.4 From mason at kohaaloha.com Wed Oct 6 04:09:03 2010 From: mason at kohaaloha.com (Mason James) Date: Wed, 06 Oct 2010 15:09:03 +1300 Subject: [Koha-patches] [PATCH] [PATCH] (bug 5277) (HEAD) cant search by barcode in OPAC search-page Message-ID: <1286330943-27499-1-git-send-email-mason@kohaaloha.com> --- .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index 52b00e7..2f762f5 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -93,6 +93,7 @@ + -- 1.7.1 From gmcharlt at gmail.com Wed Oct 6 13:43:15 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 07:43:15 -0400 Subject: [Koha-patches] [PATCH] bug 5086: fix setting claim date Message-ID: <1286365395-11607-1-git-send-email-gmcharlt@gmail.com> Also removed a locus for SQL injection. Signed-off-by: Galen Charlton --- C4/Serials.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 9c22901..32e46be 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -287,10 +287,10 @@ sub UpdateClaimdateIssues { my $dbh = C4::Context->dbh; $date = strftime( "%Y-%m-%d", localtime ) unless ($date); my $query = " - UPDATE serial SET claimdate=$date,status=7 - WHERE serialid in (" . join( ",", @$serialids ) . ")"; + UPDATE serial SET claimdate = ?, status = 7 + WHERE serialid in (" . join( ",", map { '?' } @$serialids ) . ")"; my $rq = $dbh->prepare($query); - $rq->execute; + $rq->execute($date, @$serialids); return $rq->rows; } -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 13:45:05 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 07:45:05 -0400 Subject: [Koha-patches] [PATCH] Bug 5086 Pass claimed date correctly In-Reply-To: <1280930897.8220.3.camel@koha-dev> References: <1280922958-8096-1-git-send-email-colin.campbell@ptfs-europe.com> <1280930897.8220.3.camel@koha-dev> Message-ID: Hi, On Wed, Aug 4, 2010 at 10:08 AM, Michael Hafen wrote: > I would think that the $dbh->quote() function should be used here. > Especially if $date can come from the browser. ?A place holder and > passing $date through $rq->execute() would accomplish the same thing. ... and remove a possible entry point for SQL injection. I've submitted and will push a new patch that uses placeholders. Direct interpolation of strings in to queries should be removed on sight, and if for some reason a placeholder cannot be used, $dbh->quote() should be used. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Wed Oct 6 14:29:12 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 08:29:12 -0400 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: <4ece90a0715addbb380df4817d6d3302@cilea.it> References: <4ece90a0715addbb380df4817d6d3302@cilea.it> Message-ID: Hi, I have a question about one of the changes to record.abs: -melm 995$h ccode,item ... +melm 995$8 ccode,item Would this not break indexing of the ccode for existing UNIMARC users? Regards, Galen 2010/8/12 tajoli : > Hi, > > I have problem with git-send; I will able to use it > only from 28/Aug. > So I sent the patch as attach. > > Bye > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > -- Galen Charlton gmcharlt at gmail.com From henridamien.laurent at biblibre.com Wed Oct 6 15:04:34 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Wed, 06 Oct 2010 15:04:34 +0200 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: References: <4ece90a0715addbb380df4817d6d3302@cilea.it> Message-ID: <4CAC73E2.6050907@biblibre.com> Le 06/10/2010 14:29, Galen Charlton a ?crit : > Hi, > > I have a question about one of the changes to record.abs: > > -melm 995$h ccode,item > ... > +melm 995$8 ccode,item > > Would this not break indexing of the ccode for existing UNIMARC users? > > Regards, > > Galen Yes, I confirm this would be quite bad for french users. -- Herni-Damien LAURENT From gmcharlt at gmail.com Wed Oct 6 15:30:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 09:30:47 -0400 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: <4CAC73E2.6050907@biblibre.com> References: <4ece90a0715addbb380df4817d6d3302@cilea.it> <4CAC73E2.6050907@biblibre.com> Message-ID: Hi, On Wed, Oct 6, 2010 at 9:04 AM, LAURENT Henri-Damien wrote: > Yes, I confirm this would be quite bad for french users. Thanks for confirming. Since the rest of the patch is for the English UNIMARC framework, I think that the keeping the 995$h for ccode is required; once that's rectified, the patch can be pushed. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From tajoli at cilea.it Wed Oct 6 15:33:58 2010 From: tajoli at cilea.it (Zeno Tajoli) Date: Wed, 06 Oct 2010 15:33:58 +0200 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: References: <4ece90a0715addbb380df4817d6d3302@cilea.it> Message-ID: <4CAC7AC6.101@cilea.it> Hi Galen, Il 06/10/2010 14:29, Galen Charlton ha scritto: > I have a question about one of the changes to record.abs: > > -melm 995$h ccode,item > ... > +melm 995$8 ccode,item > > Would this not break indexing of the ccode for existing UNIMARC users? > I think no. Why? 1) A 995 subfield for ccode (for Unimarc setup) is a new thing in 3.2. A value for items.ccode is not present in file record.abs of 3.0.6 2)In 3.2 the en SQL Unimarc definition for items.ccode is 995$8 file ../installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql line 182: ('995', '8', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), 3)In 3.2 all fr SQL Unimarc defintions use 995$h for "code ? barres, incr?mentation" All french SQL definitions don't setup a subfield for items.ccode file ..installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql line 2023: ('995', 'h', 'code ? barres, incr?mentation', '', 0, 0, '', -1, '', '', '', NULL, 0, '', NULL, NULL, ''), 3b)In 3.2 all fr SQL Unimarc defintions don't use 995$8 4)In my wiki proposal of 995 for 3.2 Unimarc I inserted 995$8 for items.ccode. So I think we can use 995$8 for items.ccode and connect index. Bye -- Zeno Tajoli CILEA - Segrate (MI) tajoliAT_SPAM_no_prendiATcilea.it (Indirizzo mascherato anti-spam; sostituisci qaunto tra AT con @) From henridamien.laurent at biblibre.com Wed Oct 6 15:51:35 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Wed, 06 Oct 2010 15:51:35 +0200 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: <4CAC7AC6.101@cilea.it> References: <4ece90a0715addbb380df4817d6d3302@cilea.it> <4CAC7AC6.101@cilea.it> Message-ID: <4CAC7EE7.4070704@biblibre.com> Le 06/10/2010 15:33, Zeno Tajoli a ?crit : > Hi Galen, > > Il 06/10/2010 14:29, Galen Charlton ha scritto: >> I have a question about one of the changes to record.abs: >> >> -melm 995$h ccode,item >> ... >> +melm 995$8 ccode,item >> >> Would this not break indexing of the ccode for existing UNIMARC users? >> > > I think no. Why? > > 1) A 995 subfield for ccode (for Unimarc setup) is a new thing in 3.2. A > value for items.ccode is not present in file record.abs of 3.0.6 > > 2)In 3.2 the en SQL Unimarc definition for items.ccode is 995$8 > file > ../installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql > > line 182: ('995', '8', 'Koha collection', 'Koha collection', 0, 0, > 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), > > 3)In 3.2 all fr SQL Unimarc defintions use 995$h for "code ? barres, > incr?mentation" > All french SQL definitions don't setup a subfield for items.ccode > file > ..installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql > > line 2023: ('995', 'h', 'code ? barres, incr?mentation', '', 0, 0, '', > -1, '', '', '', NULL, 0, '', NULL, NULL, ''), > > 3b)In 3.2 all fr SQL Unimarc defintions don't use 995$8 > > 4)In my wiki proposal of 995 for 3.2 Unimarc > > I inserted 995$8 for items.ccode. > > So I think we can use 995$8 for items.ccode and connect index. > > Bye This would mean that all french unimarc users would have to a) edit zebra configuration b) change their frameworks c) use sync_items_in_marc_bib d) reindex All that would turn out to be quite heavy for big libraries (sync_items_in_marc_bib is quite slow). How many UNIMARC foreign users is there compared to french ? -- Henri-Damien LAURENT From gmcharlt at gmail.com Wed Oct 6 16:41:25 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 10:41:25 -0400 Subject: [Koha-patches] [PATCH 2/4] fix test plan and false test errors in Search.t In-Reply-To: <1286376087-20304-1-git-send-email-gmcharlt@gmail.com> References: <1286376087-20304-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1286376087-20304-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- t/db_dependent/Search.t | 26 ++++++++++++++------------ 1 files changed, 14 insertions(+), 12 deletions(-) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 00d5b7c..31316f2 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -5,24 +5,26 @@ use strict; use warnings; +use utf8; + use YAML; use C4::Debug; use C4::Context; use C4::Search; -use Test::More tests => 3; +use Test::More tests => 4; -BEGIN { - use_ok('C4::Search'); -} -foreach my $string ("Le??on","mod\xc3\xa8les"){ -my @results=C4::Search::_remove_stopwords($string,"kw"); -$debug && warn "$string ",Dump(@results); -ok($results[0] eq $string,"$string is not modified"); +use_ok('C4::Search'); + +foreach my $string ("Le??on","mod??les") { + my @results=C4::Search::_remove_stopwords($string,"kw"); + $debug && warn "$string ",Dump(@results); + ok($results[0] eq $string,"$string is not modified"); } -foreach my $string ("Les chaussettes de l'archiduchesse"){ -my @results=C4::Search::_remove_stopwords($string,"kw"); -$debug && warn "$string ",Dump(@results); -ok($results[0] ne $string,"$results[0] from $string"); + +foreach my $string ("Les chaussettes de l'archiduchesse") { + my @results=C4::Search::_remove_stopwords($string,"kw"); + $debug && warn "$string ",Dump(@results); + ok($results[0] ne $string,"$results[0] from $string"); } -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 16:41:27 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 10:41:27 -0400 Subject: [Koha-patches] [PATCH 4/4] various improvements to t/db_dependent/VirtualShelves.t In-Reply-To: <1286376087-20304-3-git-send-email-gmcharlt@gmail.com> References: <1286376087-20304-1-git-send-email-gmcharlt@gmail.com> <1286376087-20304-2-git-send-email-gmcharlt@gmail.com> <1286376087-20304-3-git-send-email-gmcharlt@gmail.com> Message-ID: <1286376087-20304-4-git-send-email-gmcharlt@gmail.com> * updated to reflect recent (and old) changes to the API * corrected test plan * adopted Test::More * correctly handle and test functionality to not add duplicate bibs to a list Signed-off-by: Galen Charlton --- t/db_dependent/VirtualShelves.t | 103 ++++++++++++++++---------------------- 1 files changed, 43 insertions(+), 60 deletions(-) diff --git a/t/db_dependent/VirtualShelves.t b/t/db_dependent/VirtualShelves.t index 00cb032..041c3fc 100755 --- a/t/db_dependent/VirtualShelves.t +++ b/t/db_dependent/VirtualShelves.t @@ -5,13 +5,11 @@ # Author : Antoine Farnault, antoine at koha-fr.org # -use Test; use strict; -#use warnings; FIXME - Bug 2505 +use warnings; use C4::Context; -# Making 30 tests. -BEGIN { plan tests => 112 } +use Test::More tests => 92; # Getting some borrowers from database. my $dbh = C4::Context->dbh; @@ -27,26 +25,13 @@ while(my $borrower = $sth->fetchrow){ push @borrowers, $borrower; } -# Getting some itemnumber from database -my $query = qq/ - SELECT itemnumber - FROM items - LIMIT 10 -/; -my $sth = $dbh->prepare($query); -$sth->execute; -my @items; -while(my $item = $sth->fetchrow){ - push @items, $item; -} - # Getting some biblionumbers from database -my $query = qq/ +$query = qq/ SELECT biblionumber FROM biblio LIMIT 10 /; -my $sth = $dbh->prepare($query); +$sth = $dbh->prepare($query); $sth->execute; my @biblionumbers; while(my $biblionumber = $sth->fetchrow){ @@ -61,9 +46,9 @@ my $delete_virtualshelfcontent =qq/ DELETE FROM virtualshelfcontents WHERE 1 /; -my $sth = $dbh->prepare($delete_virtualshelf); +$sth = $dbh->prepare($delete_virtualshelf); $sth->execute; -my $sth = $dbh->prepare($delete_virtualshelfcontent); +$sth = $dbh->prepare($delete_virtualshelfcontent); $sth->execute; # --- @@ -73,12 +58,7 @@ $sth->execute; # #----------------------------------------------------------------------# -use C4::VirtualShelves; -my $version = C4::VirtualShelves->VERSION; -print "\n----------Testing C4::VirtualShelves version ".$version."--------\n"; - -ok($version); # First test: the module is loaded & the version is readable. - +use_ok('C4::VirtualShelves'); #-----------------------TEST AddShelf function------------------------# # usage : $shelfnumber = &AddShelf( $shelfname, $owner, $category); @@ -88,38 +68,49 @@ my @shelves; for(my $i=0; $i<10;$i++){ my $ShelfNumber = AddShelf("Shelf_".$i,$borrowers[$i] || '',int(rand(3))+1); die "test Not ok, remove some shelves before" if ($ShelfNumber == -1); - ok($ShelfNumber); # Shelf creation successful; - push @shelves, $ShelfNumber if ok($ShelfNumber); + ok($ShelfNumber > -1, "created shelf"); # Shelf creation successful; + push @shelves, $ShelfNumber if $ShelfNumber > -1; } -ok(10,scalar @shelves); # 10 shelves in @shelves; +ok(10 == scalar @shelves, 'created 10 lists'); # 10 shelves in @shelves; # try to create some shelf which already exists. for(my $i=0;$i<10;$i++){ my $badNumShelf = AddShelf("Shelf_".$i,$borrowers[$i] || '',''); - ok(-1,$badNumShelf); # AddShelf returns -1 if name already exist. + ok(-1 == $badNumShelf, 'do not create lists with duplicate names'); # AddShelf returns -1 if name already exist. } -#-----------TEST AddToShelf & &AddToShelfFromBiblio & GetShelfContents & DelFromShelf functions--------------# -# usage : &AddToShelf($itemnumber, $shelfnumber); -# usage : $itemlist = &GetShelfContents($shelfnumber); -# usage : $itemlist = GetShelfContents($shelfnumber); +#-----------TEST AddToShelf & GetShelfContents & DelFromShelf functions--------------# +# usage : &AddToShelf($biblionumber, $shelfnumber); +# usage : $biblist = &GetShelfContents($shelfnumber); +# usage : $biblist = GetShelfContents($shelfnumber); +my %used = (); for(my $i=0; $i<10;$i++){ - my $item = $items[int(rand(9))]; + my $bib = $biblionumbers[int(rand(9))]; my $shelfnumber = $shelves[int(rand(9))]; - - my ($itemlistBefore,$countbefore) = GetShelfContents($shelfnumber); - AddToShelf($item,$shelfnumber); - my ($itemlistAfter,$countafter) = GetShelfContents($shelfnumber); - ok($countbefore,$countafter - 1); # the item has been successfuly added. + + my $key = "$bib\t$shelfnumber"; + my $should_fail if exists $used{$key}; + + my ($biblistBefore,$countbefore) = GetShelfContents($shelfnumber); + my $status = AddToShelf($bib,$shelfnumber); + my ($biblistAfter,$countafter) = GetShelfContents($shelfnumber); + + if ($should_fail) { + ok(!defined($status), 'failed to add to list when we should'); + } else { + ok(defined($status), 'added to list when we should'); + } + + if (defined $status) { + ok($countbefore == $countafter - 1, 'added bib to list'); # the bib has been successfuly added. + } else { + ok($countbefore == $countafter, 'did not add duplicate bib to list'); # the bib has been successfuly added. + } + + $used{$key}++; - - # same thing with AddToShelfFromBiblio - my $biblionumber = $biblionumbers[int(rand(9))]; - &AddToShelfFromBiblio($biblionumber, $shelfnumber); - my ($AfterAgain,$countagain) = GetShelfContents($shelfnumber); - ok($countafter, $countagain -1); } #-----------------------TEST ModShelf & GetShelf functions------------------------# @@ -136,25 +127,17 @@ for(my $i=0; $i<10;$i++){ ModShelf($numA,$shelf); my ($numB,$nameB,$ownerB,$categoryB) = GetShelf($numA); - ok($numA,$numB); - ok($shelf->{shelfname},$nameB); - ok($shelf->{owner},$ownerB); - ok($shelf->{category},$categoryB); + ok($numA == $numB, 'modified shelf'); + ok($shelf->{shelfname} eq $nameB, '... and name change took'); + ok($shelf->{owner} eq $ownerB, '... and owner change took'); + ok($shelf->{category} eq $categoryB, '... and category change took'); } #-----------------------TEST DelShelf & DelFromShelf functions------------------------# # usage : ($status) = &DelShelf($shelfnumber); -# usage : &DelFromShelf( $itemnumber, $shelfnumber); for(my $i=0; $i<10;$i++){ my $shelfnumber = $shelves[$i]; my $status = DelShelf($shelfnumber); - if($status){ - my ($items,$count) = GetShelfContents($shelfnumber); - ok($status,$count); - foreach (@$items){ # delete all the item in this shelf - DelFromShelf($_{'itemnumber'},$shelfnumber); - } - ok(DelShelf($shelfnumber)); - } + ok(1 == $status, "deleted shelf $shelfnumber and its contents"); } -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 16:41:24 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 10:41:24 -0400 Subject: [Koha-patches] [PATCH 1/4] fix test plan for SQLHelper.t Message-ID: <1286376087-20304-1-git-send-email-gmcharlt@gmail.com> Also removed incorrect comments about test case numbers - we should just let Test::More number them. Signed-off-by: Galen Charlton --- t/db_dependent/SQLHelper.t | 24 +++--------------------- 1 files changed, 3 insertions(+), 21 deletions(-) diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t index 80c4478..f783393 100755 --- a/t/db_dependent/SQLHelper.t +++ b/t/db_dependent/SQLHelper.t @@ -10,12 +10,10 @@ use YAML; use C4::Debug; use C4::SQLHelper qw(:all); -use Test::More tests => 19; +use Test::More tests => 20; + +use_ok('C4::SQLHelper'); -#1 -BEGIN { - use_ok('C4::SQLHelper'); -} use C4::Category; use C4::Branch; my @categories=C4::Category->all; @@ -28,24 +26,17 @@ ok($borrid=InsertInTable("borrowers",{firstname=>"Jean",surname=>"Valjean",city= $borrtmp=InsertInTable("borrowers",{firstname=>"Jean",surname=>"cocteau",city=>" ",zipcode=>" ",email=>"email",categorycode=>$categories[0]->{categorycode}, branchcode=>$branchcodes[0]}); ok(my $status=UpdateInTable("borrowers",{borrowernumber=>$borrid,firstname=>"Jean",surname=>"Valjean",city=>"Dampierre",zipcode=>" ",email=>"email", branchcode=>$branchcodes[1]}),"Update In Table"); my $borrowers=SearchInTable("borrowers"); -#4 ok(@$borrowers>0, "Search In Table All values"); $borrowers=SearchInTable("borrowers",{borrowernumber=>$borrid}); -#5 ok(@$borrowers==1, "Search In Table by primary key on table"); $borrowers=SearchInTable("borrowers",{firstname=>"Jean"}); -#6 ok(@$borrowers>0, "Search In Table hashref"); $borrowers=SearchInTable("borrowers",{firstname=>"Jean"},[{firstname=>1},{borrowernumber=>1}],undef, [qw(borrowernumber)]); -#7 ok(($$borrowers[0]{borrowernumber} + 0) > ($$borrowers[1]{borrowernumber} + 0), "Search In Table Order"); $borrowers=SearchInTable("borrowers",{firstname=>"Jean"},[{surname=>0},{firstname=>1}], undef, [qw(firstname surname)]); -#8 ok(uc($$borrowers[0]{surname}) lt uc($$borrowers[1]{surname}), "Search In Table Order"); $borrowers=SearchInTable("borrowers","Jean"); -#9 ok(@$borrowers>0, "Search In Table string"); -#10 #FIXME : When searching on All the fields of the table, seems to return Junk eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,[qw(firstname surname borrowernumber cardnumber)],"start_with")}; #eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,undef,"start_with")}; @@ -54,31 +45,22 @@ eval{$borrowers=SearchInTable("borrowers","Jean Valjean",undef,undef,undef,[qw(f $debug && warn Dump(@$borrowers); ok(scalar(@$borrowers)==1 && !($@), "Search In Table does an implicit AND of all the words in strings"); $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}]); -#11 ok(@$borrowers>0, "Search In Table arrayref"); $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)]); -#12 ok(keys %{$$borrowers[0]} ==1, "Search In Table columns out limit"); $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname surname title)]); -#13 ok(@$borrowers>0, "Search In Table columns out limit to borrowernumber AND filter firstname surname title"); $borrowers=SearchInTable("borrowers",["Valjean",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)]); -#14 ok(@$borrowers==0, "Search In Table columns filter firstname title limit Valjean not in other fields than surname "); $borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"start_with"); -#15 ok(@$borrowers>0, "Search In Table columns filter surname Val on a wide search found "); $borrowers=SearchInTable("borrowers",["Val",{firstname=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(surname)],"exact"); -#16 ok(@$borrowers==0, "Search In Table columns filter surname Val in exact search not found "); $borrowers=eval{SearchInTable("borrowers",["Val",{member=>"Jean"}],undef,undef,[qw(borrowernumber)],[qw(firstname title)],"exact")}; -#17 ok(@$borrowers==0 && !($@), "Search In Table fails gracefully when no correct field passed in hash"); -#18 $borrowers=eval{SearchInTable("borrowers",["Jea"],undef,undef,undef,[qw(firstname surname borrowernumber)],"start_with")}; ok(@$borrowers>0 && !($@), "Search on simple value in firstname"); $status=DeleteInTable("borrowers",{borrowernumber=>$borrid}); -#19 ok($status>0 && !($@), "DeleteInTable OK"); $status=DeleteInTable("borrowers",{borrowernumber=>$borrtmp}); -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 16:41:26 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 10:41:26 -0400 Subject: [Koha-patches] [PATCH 3/4] removed AddToShelfFromBiblio from C4::VirtualShelves In-Reply-To: <1286376087-20304-2-git-send-email-gmcharlt@gmail.com> References: <1286376087-20304-1-git-send-email-gmcharlt@gmail.com> <1286376087-20304-2-git-send-email-gmcharlt@gmail.com> Message-ID: <1286376087-20304-3-git-send-email-gmcharlt@gmail.com> Back in the day, lists could contain item records instead or in addition to bibs, but that hasn't been the case for a while. Therefore, removed AddToShelfFromBiblio, which does exactly the same thing that AddToShelf does. Signed-off-by: Galen Charlton --- C4/VirtualShelves.pm | 50 +++++------------------------------ opac/opac-addbybiblionumber.pl | 2 +- virtualshelves/addbybiblionumber.pl | 2 +- 3 files changed, 9 insertions(+), 45 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index fa599bd..715cace 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -40,7 +40,7 @@ BEGIN { @ISA = qw(Exporter); @EXPORT = qw( &GetShelves &GetShelfContents &GetShelf - &AddToShelf &AddToShelfFromBiblio &AddShelf + &AddToShelf &AddShelf &ModShelf &ShelfPossibleAction &DelFromShelf &DelShelf @@ -67,7 +67,7 @@ C4::VirtualShelves - Functions for manipulating Koha virtual virtualshelves This module provides functions for manipulating virtual virtualshelves, including creating and deleting virtualshelves, and adding and removing -items to and from virtualshelves. +bibs to and from virtualshelves. =head1 FUNCTIONS @@ -237,7 +237,7 @@ sub GetShelf ($) { =head2 GetShelfContents - $itemlist = &GetShelfContents($shelfnumber); + $biblist = &GetShelfContents($shelfnumber); Looks up information about the contents of virtual virtualshelves number C<$shelfnumber>. Sorted by a field in the biblio table. copyrightdate @@ -331,8 +331,8 @@ sub AddShelf { &AddToShelf($biblionumber, $shelfnumber); -Adds item number C<$biblionumber> to virtual virtualshelves number -C<$shelfnumber>, unless that item is already on that shelf. +Adds bib number C<$biblionumber> to virtual virtualshelves number +C<$shelfnumber>, unless that bib is already on that shelf. =cut @@ -364,42 +364,6 @@ sub AddToShelf { $sth->execute( $shelfnumber ); } -=head2 AddToShelfFromBiblio - - &AddToShelfFromBiblio($biblionumber, $shelfnumber) - -this function allow to add a virtual into the shelf number $shelfnumber -from biblionumber. - -=cut - -sub AddToShelfFromBiblio { - my ( $biblionumber, $shelfnumber ) = @_; - return unless $biblionumber; - my $query = qq( - SELECT * - FROM virtualshelfcontents - WHERE shelfnumber=? AND biblionumber=? - ); - my $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $biblionumber ); - unless ( $sth->rows ) { - my $query =qq( - INSERT INTO virtualshelfcontents - (shelfnumber, biblionumber, flags) - VALUES - (?, ?, 0) - ); - $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber, $biblionumber ); - $query = qq(UPDATE virtualshelves - SET lastmodified = CURRENT_TIMESTAMP - WHERE shelfnumber = ?); - $sth = $dbh->prepare($query); - $sth->execute( $shelfnumber ); - } -} - =head2 ModShelf ModShelf($shelfnumber, $hashref) @@ -486,8 +450,8 @@ sub ShelfPossibleAction { &DelFromShelf( $biblionumber, $shelfnumber); -Removes item number C<$biblionumber> from virtual virtualshelves number -C<$shelfnumber>. If the item wasn't on that virtualshelves to begin with, +Removes bib number C<$biblionumber> from virtual virtualshelves number +C<$shelfnumber>. If the bib wasn't on that virtualshelves to begin with, nothing happens. =cut diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl index b04e662..8cbd239 100755 --- a/opac/opac-addbybiblionumber.pl +++ b/opac/opac-addbybiblionumber.pl @@ -42,7 +42,7 @@ sub AddBibliosToShelf { @biblionumber = (split /\//,$biblionumber[0]); } for my $bib (@biblionumber){ - AddToShelfFromBiblio($bib, $shelfnumber); + AddToShelf($bib, $shelfnumber); } } diff --git a/virtualshelves/addbybiblionumber.pl b/virtualshelves/addbybiblionumber.pl index 7af17c8..a0d9fdd 100755 --- a/virtualshelves/addbybiblionumber.pl +++ b/virtualshelves/addbybiblionumber.pl @@ -77,7 +77,7 @@ sub AddBibliosToShelf { @biblionumber = (split /\//,$biblionumber[0]); } for my $bib (@biblionumber){ - AddToShelfFromBiblio($bib, $shelfnumber); + AddToShelf($bib, $shelfnumber); } } -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 16:42:45 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 10:42:45 -0400 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: <4CAC7EE7.4070704@biblibre.com> References: <4ece90a0715addbb380df4817d6d3302@cilea.it> <4CAC7AC6.101@cilea.it> <4CAC7EE7.4070704@biblibre.com> Message-ID: Hi, On Wed, Oct 6, 2010 at 9:51 AM, LAURENT Henri-Damien wrote: > This would mean that all french unimarc users would have to > a) edit zebra configuration > b) change their frameworks > c) use sync_items_in_marc_bib > d) reindex > All that would turn out to be quite heavy for big libraries > (sync_items_in_marc_bib is quite slow). > How many UNIMARC foreign users is there compared to french ? And this is not a burden I care to impose on French UNIMARC users without a *really* good reason. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From henridamien.laurent at biblibre.com Wed Oct 6 16:51:43 2010 From: henridamien.laurent at biblibre.com (LAURENT Henri-Damien) Date: Wed, 06 Oct 2010 16:51:43 +0200 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: References: <4ece90a0715addbb380df4817d6d3302@cilea.it> <4CAC7AC6.101@cilea.it> <4CAC7EE7.4070704@biblibre.com> Message-ID: <4CAC8CFF.8020900@biblibre.com> Le 06/10/2010 16:42, Galen Charlton a ?crit : > Hi, > > On Wed, Oct 6, 2010 at 9:51 AM, LAURENT Henri-Damien > wrote: >> This would mean that all french unimarc users would have to >> a) edit zebra configuration >> b) change their frameworks >> c) use sync_items_in_marc_bib >> d) reindex >> All that would turn out to be quite heavy for big libraries >> (sync_items_in_marc_bib is quite slow). >> How many UNIMARC foreign users is there compared to french ? > > And this is not a burden I care to impose on French UNIMARC users > without a *really* good reason. > > Regards, > > Galen thanks. -- Henri-Damien LAURENT From gmcharlt at gmail.com Wed Oct 6 17:14:01 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 11:14:01 -0400 Subject: [Koha-patches] [PATCH 1/2] fix typo/thinko in list test Message-ID: <1286378042-21302-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- t/db_dependent/VirtualShelves.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/VirtualShelves.t b/t/db_dependent/VirtualShelves.t index 041c3fc..a50f81e 100755 --- a/t/db_dependent/VirtualShelves.t +++ b/t/db_dependent/VirtualShelves.t @@ -91,7 +91,7 @@ for(my $i=0; $i<10;$i++){ my $shelfnumber = $shelves[int(rand(9))]; my $key = "$bib\t$shelfnumber"; - my $should_fail if exists $used{$key}; + my $should_fail = exists($used{$key}) ? 1 : 0; my ($biblistBefore,$countbefore) = GetShelfContents($shelfnumber); my $status = AddToShelf($bib,$shelfnumber); -- 1.7.0 From gmcharlt at gmail.com Wed Oct 6 17:14:02 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 11:14:02 -0400 Subject: [Koha-patches] [PATCH 2/2] cleanup of DB-dependent fund test cases In-Reply-To: <1286378042-21302-1-git-send-email-gmcharlt@gmail.com> References: <1286378042-21302-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1286378042-21302-2-git-send-email-gmcharlt@gmail.com> * remove test that was adding a second active budget period, which was throwing off later tests * updated to reflect current API Signed-off-by: Galen Charlton --- t/db_dependent/Budgets.t | 23 +++-------------------- 1 files changed, 3 insertions(+), 20 deletions(-) diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t index 7d5732f..6ec8b57 100755 --- a/t/db_dependent/Budgets.t +++ b/t/db_dependent/Budgets.t @@ -1,12 +1,11 @@ use strict; use warnings; -use Test::More tests=>18; +use Test::More tests=>17; BEGIN {use_ok('C4::Budgets') } use C4::Budgets; use C4::Dates; -print "ok 1\n"; use YAML; # @@ -23,21 +22,6 @@ ok($bpid=AddBudgetPeriod( , budget_description => "MAPERI"}), "AddBudgetPeriod with iso dates OK"); -if (C4::Context->preference('dateformat') eq "metric"){ - ok($bpid=AddBudgetPeriod( - { budget_period_startdate => '01-01-2008' - , budget_period_enddate => '31-12-2008' - , budget_description => "MAPERI"}), - "AddBudgetPeriod returned $bpid"); -} -elsif (C4::Context->preference('dateformat') eq "us"){ - ok($bpid=AddBudgetPeriod( - { budget_period_startdate => '01-01-2008' - , budget_period_enddate => '12-31-2008' - , budget_description => "MAPERI"}), - "AddBudgetPeriod returned $bpid"); -} - ok($budgetperiod=GetBudgetPeriod($bpid), "GetBudgetPeriod($bpid) returned ".Dump($budgetperiod)); ok(!GetBudgetPeriod(0) ,"GetBudgetPeriod(0) returned undef : noactive BudgetPeriod"); @@ -95,7 +79,6 @@ ok($budget_id=AddBudget( #| budget_encumb | decimal(28,6) | YES | | 0.000000 | | #| budget_expend | decimal(28,6) | YES | | 0.000000 | | #| budget_notes | mediumtext | YES | | NULL | | -#| budget_description | mediumtext | YES | | NULL | | #| timestamp | timestamp | NO | | CURRENT_TIMESTAMP | | #| budget_period_id | int(11) | YES | MUL | NULL | | #| sort1_authcat | varchar(80) | YES | | NULL | | @@ -111,9 +94,9 @@ ok(GetBudgets()>0, "GetBudgets OK"); ok(GetBudgets({budget_period_id=>$bpid})>0, "GetBudgets With Filter OK"); -ok(GetBudgets({budget_period_id=>$bpid},{"budget_description"=>0})>0, +ok(GetBudgets({budget_period_id=>$bpid},[{"budget_name"=>0}])>0, "GetBudgets With Order OK"); -ok(GetBudgets({budget_period_id=>GetBudgetPeriod(0)->{budget_period_id}},{"budget_description"=>0})>0, +ok(GetBudgets({budget_period_id=>GetBudgetPeriod($bpid)->{budget_period_id}},[{"budget_name"=>0}])>0, "GetBudgets With Order Getting Active budgetPeriod OK"); ok($del_status=DelBudget($budget_id), -- 1.7.0 From tajoli at cilea.it Wed Oct 6 17:57:33 2010 From: tajoli at cilea.it (Zeno Tajoli) Date: Wed, 06 Oct 2010 17:57:33 +0200 Subject: [Koha-patches] Bug 5128 [3.2] To define default 9xx fields for Unimarc In-Reply-To: References: <4ece90a0715addbb380df4817d6d3302@cilea.it> Message-ID: <4CAC9C6D.7080108@cilea.it> Hi to all, I have insert here all text. Attention that I read koha-patch list with digest Il 06/10/2010 14:29, Galen Charlton ha scritto: >>> I have a question about one of the changes to record.abs: >>> >>> -melm 995$h ccode,item ... +melm 995$8 >>> ccode,item >>> >>> Would this not break indexing of the ccode for existing UNIMARC >>> users? >>> From Zeno Tajoli >> I think no. Why? >> 1) A 995 subfield for ccode (for Unimarc setup) is a new thing in >> 3.2. > A value for items.ccode is not present in file record.abs of 3.0.6 >> 2)In 3.2 the en SQL Unimarc definition for items.ccode is 995$8 >> file ../installer/data/mysql/en/marcflavour/unimarc/mandatory >> /unimarc_framework_DEFAULT.sql line 182: ('995', '8', 'Koha >> collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', >> '', '', 0, 0, '', '', '', NULL), >> 3)In 3.2 all fr SQL Unimarc defintions use 995$h for "code ? >> barres, incr?mentation" All french SQL definitions don't setup a >> subfield for items.ccode file >> ..installer/data/mysql/fr-FR/marcflavour/unimarc_complet >> /Obligatoire/framework_DEFAULT.sql line 2023: ('995', 'h', 'code ? >> barres, incr?mentation', '', 0, 0,'', -1, '', '', '', NULL, 0, '', >> NULL, NULL, ''), >> 3b)In 3.2 all fr SQL Unimarc defintions don't use 995$8 >> 4)In my wiki proposal of 995 for 3.2 Unimarc > > I inserted 995$8 for items.ccode. >> So I think we can use 995$8 for items.ccode and connect index. From: LAURENT Henri-Damien > This would mean that all french unimarc users would have to a) edit > zebra configuration b) change their frameworks c) use > sync_items_in_marc_bib d) reindex All that would turn out to be quite > heavy for big libraries (sync_items_in_marc_bib is quite slow). How > many UNIMARC foreign users is there compared to french ? Henry Damien writes that the present setup of French 3.2 use 995$h for ccode index. But this, for me, is very strange. All French Unimarc setups don't use 995$h for ccode. In fact ccode is not used in France Unimarc setups. It is a new feature. Attention that for me the Unimarc setup are the SQL files installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql In those two file the definiton for 995$h is: ('995', 'h', 'code ? barres, incr?mentation', '', 0, 0, '', -1, '', '', '', 0, 0, '', '', '', NULL); I seek the sting 'ccode'; it is not present. I use the last version of "master" from git://git.koha-community.org/koha.git So, before to correct the patch, I need to know the correct version of French Unimarc setups. Probably the files installer/data/mysql/fr-FR/marcflavour/unimarc_complet/Obligatoire/framework_DEFAULT.sql and installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql need an update for 3.2 Bye -- Zeno Tajoli CILEA - Segrate (MI) tajoliAT_SPAM_no_prendiATcilea.it (Indirizzo mascherato anti-spam; sostituisci qaunto tra AT con @) From gmcharlt at gmail.com Wed Oct 6 17:57:12 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 11:57:12 -0400 Subject: [Koha-patches] [PATCH] more test case fixes Message-ID: <1286380632-21855-1-git-send-email-gmcharlt@gmail.com> SQLHelper.t - clean up after itself better Context.t - fix reporting of test plan Signed-off-by: Galen Charlton --- t/db_dependent/Context.t | 8 +++----- t/db_dependent/SQLHelper.t | 5 ++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/t/db_dependent/Context.t b/t/db_dependent/Context.t index 31b0684..eac3265 100755 --- a/t/db_dependent/Context.t +++ b/t/db_dependent/Context.t @@ -4,7 +4,7 @@ use strict; use warnings; -use Test::More tests => 91; +use Test::More; use vars qw($debug $koha $dbh $config $ret); BEGIN { @@ -42,8 +42,6 @@ foreach (grep {defined $koha->{$_}} sort @keys) { } ok($config = $koha->{config}, 'Getting $koha->{config} '); -# diag("Examining configuration."); -diag("Note: The overall number of tests may vary by configuration. Disregard the projected number."); -1; -__END__ +done_testing(); +1; diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t index f783393..6be0192 100755 --- a/t/db_dependent/SQLHelper.t +++ b/t/db_dependent/SQLHelper.t @@ -10,7 +10,7 @@ use YAML; use C4::Debug; use C4::SQLHelper qw(:all); -use Test::More tests => 20; +use Test::More tests => 22; use_ok('C4::SQLHelper'); @@ -64,3 +64,6 @@ ok(@$borrowers>0 && !($@), "Search on simple value in firstname"); $status=DeleteInTable("borrowers",{borrowernumber=>$borrid}); ok($status>0 && !($@), "DeleteInTable OK"); $status=DeleteInTable("borrowers",{borrowernumber=>$borrtmp}); +ok($status>0 && !($@), "DeleteInTable OK"); +$status=DeleteInTable("branches", {branchcode => 'ZZZZ'}); +ok($status>0 && !($@), "DeleteInTable (branch) OK"); -- 1.7.0 From ian.walls at bywatersolutions.com Wed Oct 6 18:46:26 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Wed, 6 Oct 2010 12:46:26 -0400 Subject: [Koha-patches] [PATCH] Followup to Bug 4305: multiple ISBNS in biblioitems.isbn breaks patron Message-ID: <1286383586-11388-1-git-send-email-ian.walls@bywatersolutions.com> This patch adds a scrub for ' | ' when the ISBN comes from the biblioitems table, in the event that Koha has attempted to store multiple ISBNs in the field. The ISBN presented to Business::ISBN will now be something it can handle. --- C4/Koha.pm | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index fb27ee2..cbcd048 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1241,6 +1241,9 @@ sub GetNormalizedISBN { my ($isbn,$record,$marcflavour) = @_; my @fields; if ($isbn) { + # Koha attempts to store multiple ISBNs in biblioitems.isbn, separated by " | " + # anything after " | " should be removed, along with the delimiter + $isbn =~ s/(.*)( \| )(.*)/$1/; return _isbn_cleanup($isbn); } return undef unless $record; -- 1.5.6.5 From nengard at bywatersolutions.com Wed Oct 6 07:19:55 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Wed, 6 Oct 2010 01:19:55 -0400 Subject: [Koha-patches] [PATCH] [bug 4935] fix for allowing authorized values to be "unset" Message-ID: <1286342395-5048-1-git-send-email-nengard@bywatersolutions.com> From: Liz Rea --- tools/batchMod.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index f5138d1..e4e2ed0 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -500,7 +500,7 @@ sub UpdateMarcWith($$){ my @fields_to=$marcto->field($itemtag); foreach my $subfield ($fieldfrom->subfields()){ foreach my $field_to_update (@fields_to){ - $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1]); + $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1] != '' or $$subfield[1] == '0'); } } #warn "TO edited:",$marcto->as_formatted; -- 1.5.6.5 From nengard at gmail.com Wed Oct 6 18:52:18 2010 From: nengard at gmail.com (Nicole Engard) Date: Wed, 6 Oct 2010 12:52:18 -0400 Subject: [Koha-patches] [PATCH] [bug 4935] fixed ability to unset statuses such as "lost" or "damaged" In-Reply-To: <1285858141-11228-1-git-send-email-lrea@nekls.org> References: <1285858141-11228-1-git-send-email-lrea@nekls.org> Message-ID: patch doesn't apply - new one being sent On Thu, Sep 30, 2010 at 10:49 AM, Liz Rea wrote: > --- > ?tools/batchMod.pl | ? ?5 +++-- > ?1 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/batchMod.pl b/tools/batchMod.pl > index e85f45a..b183487 100755 > --- a/tools/batchMod.pl > +++ b/tools/batchMod.pl > @@ -319,6 +319,7 @@ foreach my $tag (sort keys %{$tagslib}) { > ? ? ? ? ? ? ? push @authorised_values, $value; > ? ? ? ? ? ? ? $authorised_lib{$value} = $lib; > ? ? ? ? ? } > + ? ? ? ? ? ? ? $value = ''; > ? ? ? } > ? ? ? $subfield_data{marc_value} =CGI::scrolling_list( ? ? ?# FIXME: factor out scrolling_list > ? ? ? ? ? -name ? ? => "field_value", > @@ -500,9 +501,9 @@ sub UpdateMarcWith($$){ > ? ? ? ?my @fields_to=$marcto->field($itemtag); > ? ? foreach my $subfield ($fieldfrom->subfields()){ > ? ? ? ? ? ? ? ?foreach my $field_to_update (@fields_to){ > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($$subfield[0] or $$subfield[0]=0) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($$subfield[0]!='' or $$subfield[0]=='0') { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$field_to_update->update($$subfield[0]=>$$subfield[1]); > - ? ? ? ? ? ? ? ? ? ? ? } > + ? ? ? ? ? ? ? ? ? ? ? } > ? ? ? ? ? ? ? ?} > ? ? } > ? #warn "TO edited:",$marcto->as_formatted; > -- > 1.5.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From nengard at bywatersolutions.com Wed Oct 6 07:21:26 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Wed, 6 Oct 2010 01:21:26 -0400 Subject: [Koha-patches] [PATCH] fix for allowing authorized values to be "unset" Message-ID: <1286342486-5101-1-git-send-email-nengard@bywatersolutions.com> From: Liz Rea Signed-off-by: Nicole Engard --- tools/batchMod.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 5271d81..80ac58d 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -499,7 +499,7 @@ sub UpdateMarcWith { my @fields_to=$marcto->field($itemtag); foreach my $subfield ($fieldfrom->subfields()){ foreach my $field_to_update (@fields_to){ - $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1]); + $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1] != '' or $$subfield[1] == '0'); } } #warn "TO edited:",$marcto->as_formatted; -- 1.5.6.5 From nengard at gmail.com Wed Oct 6 18:53:23 2010 From: nengard at gmail.com (Nicole Engard) Date: Wed, 6 Oct 2010 12:53:23 -0400 Subject: [Koha-patches] [PATCH] [bug 4935] fix for allowing authorized values to be "unset" In-Reply-To: <1286342395-5048-1-git-send-email-nengard@bywatersolutions.com> References: <1286342395-5048-1-git-send-email-nengard@bywatersolutions.com> Message-ID: sorry - did the sign off wrong - right one on the way On Wed, Oct 6, 2010 at 1:19 AM, Nicole Engard wrote: > From: Liz Rea > > --- > ?tools/batchMod.pl | ? ?2 +- > ?1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/tools/batchMod.pl b/tools/batchMod.pl > index f5138d1..e4e2ed0 100755 > --- a/tools/batchMod.pl > +++ b/tools/batchMod.pl > @@ -500,7 +500,7 @@ sub UpdateMarcWith($$){ > ? ? ? ?my @fields_to=$marcto->field($itemtag); > ? ? foreach my $subfield ($fieldfrom->subfields()){ > ? ? ? ? ? ? ? ?foreach my $field_to_update (@fields_to){ > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1]); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $field_to_update->update($$subfield[0]=>$$subfield[1]) if ($$subfield[1] != '' or $$subfield[1] == '0'); > ? ? ? ? ? ? ? ?} > ? ? } > ? #warn "TO edited:",$marcto->as_formatted; > -- > 1.5.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From gmcharlt at gmail.com Wed Oct 6 18:54:37 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 12:54:37 -0400 Subject: [Koha-patches] [PATCH] fix invalid invocation of GetBranches in test case Message-ID: <1286384077-23033-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- t/db_dependent/SQLHelper.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t index 6be0192..cb26ed1 100755 --- a/t/db_dependent/SQLHelper.t +++ b/t/db_dependent/SQLHelper.t @@ -19,7 +19,7 @@ use C4::Branch; my @categories=C4::Category->all; my $insert; ok(($insert=InsertInTable("branches",{branchcode=>"ZZZZ",branchname=>"Brancheinconnue",city=>" ",zipcode=>" "},1))==0,"AddBranch (Insert In Table with primary key defined)"); -my $branches=C4::Branch->GetBranches; +my $branches=C4::Branch::GetBranches; my @branchcodes=keys %$branches; my ($borrid, $borrtmp); ok($borrid=InsertInTable("borrowers",{firstname=>"Jean",surname=>"Valjean",city=>" ",zipcode=>" ",email=>"email",categorycode=>$categories[0]->{categorycode}, branchcode=>$branchcodes[0]}),"Insert In Table"); -- 1.7.0 From frederic at demians.fr Wed Oct 6 19:11:47 2010 From: frederic at demians.fr (Frederic Demians) Date: Wed, 06 Oct 2010 19:11:47 +0200 Subject: [Koha-patches] [PATCH] Followup to Bug 4305: multiple ISBNS in biblioitems.isbn breaks patron In-Reply-To: <1286383586-11388-1-git-send-email-ian.walls@bywatersolutions.com> References: <1286383586-11388-1-git-send-email-ian.walls@bywatersolutions.com> Message-ID: <4CACADD3.6040301@demians.fr> > This patch adds a scrub for ' | ' when the ISBN comes from the > biblioitems table, in the event that Koha has attempted to store > multiple ISBNs in the field. The ISBN presented to Business::ISBN will > now be something it can handle. Couldn't you do it in _isbn_cleanup function and rather than taking the first isbn you could try each one by one and retain the first which is correct for Business::ISBN. -- Fr?d?ric DEMIANS From frederic at tamil.fr Wed Oct 6 19:14:11 2010 From: frederic at tamil.fr (Frederic Demians) Date: Wed, 06 Oct 2010 19:14:11 +0200 Subject: [Koha-patches] [PATCH] Bug 4472 Fix how   are injected into XSL files In-Reply-To: <1278863601-25667-1-git-send-email-f.demians@tamil.fr> References: <1278863601-25667-1-git-send-email-f.demians@tamil.fr> Message-ID: <4CACAE63.2010007@tamil.fr> > tmpl_process is patched to handle properly specific XML directives. > UNIMARC XSL files are modified to gain knowledge of HTML   entity > which isn't the case by default. It may be necessary to do the same > thing for MARC21 XSL. This patch still apply on HEAD. Without it, fr-FR XSL files are broken after translation process. From ian.walls at bywatersolutions.com Wed Oct 6 19:35:14 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Wed, 6 Oct 2010 13:35:14 -0400 Subject: [Koha-patches] [PATCH] Followup to Bug 4305: multiple ISBNS in biblioitems.isbn breaks patron In-Reply-To: <4CACADD3.6040301@demians.fr> References: <1286383586-11388-1-git-send-email-ian.walls@bywatersolutions.com> <4CACADD3.6040301@demians.fr> Message-ID: The second ISBN is often cut off because of the character limit of the biblioitems.isbn field. If both ISBNs in the MARC record were straight ISBNs with no dashes or additional junk at the end (like "(pbk.)", it may be possible to fit two in the field (limit 30 characters), but I have my doubts that this will happen often enough to justify processing multiple ISBNs per call. That's why I went with the simple scrub, until a more robust solution can be developed to prevent (and cleanup) multiple ISBNs crammed into biblioitems.isbn. -Ian On Wed, Oct 6, 2010 at 1:11 PM, Frederic Demians wrote: > > This patch adds a scrub for ' | ' when the ISBN comes from the >> biblioitems table, in the event that Koha has attempted to store >> multiple ISBNs in the field. The ISBN presented to Business::ISBN will >> now be something it can handle. >> > > Couldn't you do it in _isbn_cleanup function and rather than taking the > first isbn you could try each one by one and retain the first which is > correct for Business::ISBN. > > -- > Fr?d?ric DEMIANS > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > -- Ian Walls Lead Development Specialist ByWater Solutions Phone # (888) 900-8944 http://bywatersolutions.com ian.walls at bywatersolutions.com Twitter: @sekjal -------------- next part -------------- An HTML attachment was scrubbed... URL: From f.demians at tamil.fr Wed Oct 6 19:35:22 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Wed, 6 Oct 2010 19:35:22 +0200 Subject: [Koha-patches] [PATCH] Bug 4305 Follow up Ian patch Message-ID: <1286386522-18233-1-git-send-email-f.demians@tamil.fr> Retain the first valid ISBN--if multiple ISBN are stored in biblioitems.isbn--from Business::ISBN perspective. --- C4/Koha.pm | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index ab9131a..6baf97b 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1242,9 +1242,6 @@ sub GetNormalizedISBN { my ($isbn,$record,$marcflavour) = @_; my @fields; if ($isbn) { - # Koha attempts to store multiple ISBNs in biblioitems.isbn, separated by " | " - # anything after " | " should be removed, along with the delimiter - $isbn =~ s/(.*)( \| )(.*)/$1/; return _isbn_cleanup($isbn); } return undef unless $record; @@ -1327,12 +1324,20 @@ sub _normalize_match_point { } sub _isbn_cleanup ($) { - my $isbn = Business::ISBN->new( shift ); - return undef unless $isbn; - $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13'; - $isbn = $isbn->as_string; - $isbn =~ s/-//g; - return $isbn; + my $isbns = shift; + return undef unless $isbns; + + # Koha attempts to store multiple ISBNs in biblioitems.isbn, separated by + # |. We retain the first valid ISBN + for my $isbn ( split /\|/, $isbns ) { + $isbn = Business::ISBN->new( $isbn ); + next unless $isbn; + $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13'; + $isbn = $isbn->as_string; + $isbn =~ s/-//g; + return $isbn; + } + return undef; } 1; -- 1.7.1 From gmcharlt at gmail.com Wed Oct 6 23:44:56 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 17:44:56 -0400 Subject: [Koha-patches] [PATCH] fix invalid invocation of GetBranches in test case Message-ID: <1286401496-27278-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- t/db_dependent/SQLHelper.t | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/t/db_dependent/SQLHelper.t b/t/db_dependent/SQLHelper.t index 6be0192..cb26ed1 100755 --- a/t/db_dependent/SQLHelper.t +++ b/t/db_dependent/SQLHelper.t @@ -19,7 +19,7 @@ use C4::Branch; my @categories=C4::Category->all; my $insert; ok(($insert=InsertInTable("branches",{branchcode=>"ZZZZ",branchname=>"Brancheinconnue",city=>" ",zipcode=>" "},1))==0,"AddBranch (Insert In Table with primary key defined)"); -my $branches=C4::Branch->GetBranches; +my $branches=C4::Branch::GetBranches; my @branchcodes=keys %$branches; my ($borrid, $borrtmp); ok($borrid=InsertInTable("borrowers",{firstname=>"Jean",surname=>"Valjean",city=>" ",zipcode=>" ",email=>"email",categorycode=>$categories[0]->{categorycode}, branchcode=>$branchcodes[0]}),"Insert In Table"); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 7 03:01:57 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 21:01:57 -0400 Subject: [Koha-patches] [PATCH] translator hack to avoid failure on opac-opensearch.tmpl Message-ID: <1286413317-31521-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- misc/translator/TmplTokenizer.pm | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/misc/translator/TmplTokenizer.pm b/misc/translator/TmplTokenizer.pm index 1413f77..12076e6 100644 --- a/misc/translator/TmplTokenizer.pm +++ b/misc/translator/TmplTokenizer.pm @@ -527,7 +527,10 @@ sub _next_token_intermediate { if (!$this->cdata_mode_p) { $it = $this->_next_token_internal($h); if (defined $it && $it->type == TmplTokenType::TAG) { - if ($it->string =~ /^<(script|style|textarea)\b/is) { + if ($it->string =~ /^<(script|style|textarea)\b/is || + ($this->filename =~ /opensearch/ && $it->string =~ /^<(description)\b/) # FIXME special case to handle + # a CDATA in opac-opensearch.tmpl + ) { $this->_set_cdata_mode( 1 ); $this->_set_cdata_close( "" ); $this->_set_pcdata_mode( 0 ); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 7 03:13:20 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 6 Oct 2010 21:13:20 -0400 Subject: [Koha-patches] [PATCH 2/2] defer rotating collections Message-ID: <1286414000-31756-1-git-send-email-gmcharlt@gmail.com> Disabling rotating collections for 3.2.0 release; after more testing, candidate for 3.4 as well as backport into 3.2.1. Signed-off-by: Galen Charlton --- circ/returns.pl | 24 +++++++++++-------- .../intranet-tmpl/prog/en/includes/tools-menu.inc | 2 + .../prog/en/modules/tools/tools-home.tmpl | 2 + 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index 2611099..51ac9de 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -554,16 +554,20 @@ $template->param( soundon => C4::Context->preference("SoundOn"), ); -my $itemnumber = GetItemnumberFromBarcode( $query->param('barcode') ); -if ( $itemnumber ) { - my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); - if ( ! ( $holdingBranch eq $collectionBranch ) ) { - $template->param( - collectionItemNeedsTransferred => 1, - collectionBranch => GetBranchName($collectionBranch), - ); - } -} +### Comment out rotating collections for now to allow it a little more time to bake +### for 3.4; in particular, must ensure that it doesn't fight with transfers required +### to fill hold requests +### -- Galen Charlton 2010-10-06 +#my $itemnumber = GetItemnumberFromBarcode( $query->param('barcode') ); +#if ( $itemnumber ) { +# my ( $holdingBranch, $collectionBranch ) = GetCollectionItemBranches( $itemnumber ); +# if ( ! ( $holdingBranch eq $collectionBranch ) ) { +# $template->param( +# collectionItemNeedsTransferred => 1, +# collectionBranch => GetBranchName($collectionBranch), +# ); +# } +#} # actually print the page! output_html_with_http_headers $query, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc index e926358..bc7c7e7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/tools-menu.inc @@ -59,9 +59,11 @@
    • Label creator
    • Quick spine label creator
    • +
    • Rotating collections
    • +-->
    • Stage MARC for import
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl index d081021..6b11e2f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/tools-home.tmpl @@ -123,10 +123,12 @@
      Enter a barcode to generate a printable spine label. For use with dedicated label printers
      +
      Rotating collections
      Manage Rotating Collections
      +-->
      Stage MARC records for import
      -- 1.7.0 From cnighswonger at foundations.edu Thu Oct 7 05:31:57 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Wed, 6 Oct 2010 23:31:57 -0400 Subject: [Koha-patches] [PATCH] Adding a temporary workaround to keep template tests from borking on very large templates Message-ID: <1286422317-29539-1-git-send-email-cnighswonger@foundations.edu> NOTE: This should be properly fixed at some point in 3.4 This may help: http://www.perlmonks.org/?node_id=150748 --- xt/author/valid-templates.t | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/xt/author/valid-templates.t b/xt/author/valid-templates.t index 95825a6..df7c515 100644 --- a/xt/author/valid-templates.t +++ b/xt/author/valid-templates.t @@ -69,11 +69,14 @@ sub gen_template_test { my $pid = open3(\*CHILD_IN, \*CHILD_OUT, \*CHILD_ERR, "$FindBin::Bin/test_template.pl", $File::Find::name, $include_dir); my @errors = (); + while () { + #FIXME: This is here just to ensure that STDOUT is read which avoids a deadlock in some instances, but probably not all + #FIXME: The real solution probably lies within the information found here: http://www.perlmonks.org/?node_id=150748 + } while () { push @errors, $_; } waitpid($pid, 0); - @errors = grep { ! /^EXPR:.*non-initialized variable/ } @errors; # ignoring EXPR errors for now my $rel_filename = File::Spec->abs2rel($File::Find::name); ok(@errors == 0, "no errors in $rel_filename") or diag(join("", @errors) ); -- 1.7.0.4 From glawson at rhcl.org Wed Oct 6 18:20:02 2010 From: glawson at rhcl.org (Greg Lawson) Date: Wed, 6 Oct 2010 11:20:02 -0500 Subject: [Koha-patches] [PATCH] adding receipt printers to the docs Message-ID: <1286382002-14548-1-git-send-email-glawson@rhcl.org> --- en/koha3-2manual.xml | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 48 insertions(+), 2 deletions(-) diff --git a/en/koha3-2manual.xml b/en/koha3-2manual.xml index ed5b69c..7b394e5 100644 --- a/en/koha3-2manual.xml +++ b/en/koha3-2manual.xml @@ -25341,6 +25341,48 @@ print theme('pages_catalog'); + +
      + RHCL + 2010 + + For Star SP542 Printers + + + +
      + Installing the Printer + + While the following comments are based on the Star SP542 receipt printer, + they probably apply to all printers in the SP5xx series. + + + The Star SP542 receipt printer works well with Koha and Firefox on + Windows XP SP3. This printer, with either the parallel or USB interface, + is fairly easy to install and configure. You will need the following + executable file which is available from numerous places on the Internet: + + linemode_2k-xp_20030205.exe + + This executable actually does all of the installation; + you will not need to use the Microsoft Windows "Add Printer" program. + We recommend that when installing, the option for the software monitor + not be selected; we have experienced significant pauses and delays + in printing with it. Instead, simply choose to install the receipt printer + without the monitor. + + Additionally, the install program may not put the printer on the correct port, + especially if using the USB interface. This is easily corrected by going to + "Start -> Printers and Faxes -> Properties for the SP542 printer -> Ports", + then check the appropriate port./para> + + A reboot may be required, even if not indicated by the installation software + or the operating system. + +
      +
      + + @@ -26569,11 +26611,15 @@ $ zebraidx -c /etc/koha/zebradb/zebra-biblios.cfg -g iso2709 -d biblios init

      - Click 'MarcEditor' + Click 'MarcEditor' + + - Go to Tools > Edit Subfield Data + Go to Tools > Edit Subfield Data + + Edt subfield data -- 1.5.6 From M.de.Rooy at rijksmuseum.nl Thu Oct 7 11:50:52 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 7 Oct 2010 09:50:52 +0000 Subject: [Koha-patches] [PATCH] Enhancement 5074 (Adding possibility to cleanup_database.pl to purge only older sessions) [UPDATED for master] Message-ID: <809BE39CD64BFD4EB9036172EBCCFA31040D44@S-MAIL-1B.rijksmuseum.intra> Currently, the misc/cronjobs script cleanup_database truncates the session table (deleting all records, including active sessions). With an additional parameter sessdays, this behavior could be changed or (perhaps better) extended. If the parameter sessdays is passed along with a number of days, the script only deletes older session records. This is accomplished by examining the values of lasttime, atime or ctime in the record. So, calling the script like: ./cleanup_database.pl -v -sessions -sessdays 7 will only delete sessions records older than 7 days. The "old style" call ./cleanup_database.pl -v -sessions still works too and truncates the table as before. --- misc/cronjobs/cleanup_database.pl | 45 ++++++++++++++++++++++++++++++++++-- 1 files changed, 42 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index f811b24..7d5bcd1 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -37,12 +37,13 @@ use Getopt::Long; sub usage { print STDERR < \$help, 'sessions' => \$sessions, + 'sessdays:i' => \$sess_days, 'v|verbose' => \$verbose, 'm|mail' => \$mail, 'zebraqueue:i' => \$zebraqueue_days, @@ -77,7 +79,7 @@ my $sth; my $sth2; my $count; -if ($sessions) { +if ($sessions && !$sess_days) { #old behavior if ($verbose){ print "Session purge triggered.\n"; $sth = $dbh->prepare("SELECT COUNT(*) FROM sessions"); @@ -91,6 +93,15 @@ if ($sessions) { print "Done with session purge.\n"; } } +elsif($sessions && $sess_days>0) { #new behavior with number of days old + if ($verbose){ + print "Session purge triggered with days>$sess_days.\n"; + } + RemoveOldSessions(); + if ($verbose){ + print "Done with session purge with days>$sess_days.\n"; + } +} if ($zebraqueue_days){ $count = 0; @@ -122,3 +133,31 @@ if ($mail) { print "Done with purging the mail queue.\n" if ($verbose); } exit(0); + +sub RemoveOldSessions { + my ($id, $a_session, $limit, $lasttime); + $limit= time() - 24*3600*$sess_days; + + $sth= $dbh->prepare("SELECT id, a_session FROM sessions"); + $sth->execute or die $dbh->errstr; + $sth->bind_columns(\$id, \$a_session); + $sth2 = $dbh->prepare("DELETE FROM sessions WHERE id=?"); + $count=0; + + while ($sth->fetch) { + $lasttime=0; + if($a_session =~ /lasttime:\s+(\d+)/) { + $lasttime= $1; + } + elsif($a_session =~ /(ATIME|CTIME):\s+(\d+)/ ) { + $lasttime= $2; + } + if($lasttime && $lasttime < $limit) { + $sth2->execute($id) or die $dbh->errstr; + $count++; + } + } + if ($verbose){ + print "$count sessions were deleted.\n"; + } +} -- 1.6.0.6 From oleonard at myacpl.org Thu Oct 7 18:13:23 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Thu, 7 Oct 2010 12:13:23 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5254 - no need to scroll left to right on acq z search Message-ID: <1286468003-8558-1-git-send-email-oleonard@myacpl.org> - Adding inline preview/import menu to match cataloging z39.50 search - Improving behavior of inline menu on both pages - Adding white space to ISBN/ISSN output on both pages to allow line breaks, improving table width and horizontal scrolling. --- acqui/z3950_search.pl | 9 ++++- cataloguing/z3950_search.pl | 11 ++++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 ++++++++++++++++---- .../prog/en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 0215873..182e121 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -254,7 +254,14 @@ sub displayresults { ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; - $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 9b6c8f1..6311c0b 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -237,8 +237,15 @@ warn "query ".$query if $DEBUG; # In rel2_2 i am not sure what encoding is so no character conversion is done here ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); - $oldbiblio->{isbn} =~ s/ |-|\.//g, - $oldbiblio->{issn} =~ s/ |-|\.//g, + $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index f9f96ae..2219dfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -14,6 +14,7 @@ $.tablesorter.addParser({ }); $(document).ready(function(){ + $.tablesorter.defaults.widgets = ['zebra']; $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -22,23 +23,48 @@ $.tablesorter.addParser({ $(".checkboxed").unCheckCheckboxes(); return false; }); + + $("#closemenu").click(function(e){ + $(".linktools").hide(); + $("tr").removeClass("selected"); + }); + $("#resultst").tablesorter({ sortList: [[1,0]], - headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} }); + /* Inline edit/delete links */ + $("td").click(function(event){ + var $tgt = $(event.target); + $(".linktools").hide(); + $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } + var row = $(this).parent(); + row.addClass("selected"); + }); }); //]]> - + -
      +

      Z39.50 Search Points

      @@ -114,13 +140,13 @@ $.tablesorter.addParser({ - + - " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card - &breedingid=&booksellerid=&basketno=">Order + " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card + &breedingid=&booksellerid=&basketno=">Order diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index 55859c7..f0b11f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -38,18 +38,19 @@ $(document).ready(function(){ }); /* Inline edit/delete links */ $("td").click(function(event){ + var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } var row = $(this).parent(); row.addClass("selected"); - - var $tgt = $(event.target); - if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { - var position = $(this).offset(); - var top = position.top+5; - var left = position.left+5; - $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); - } }); }); -- 1.7.0.4 From nengard at bywatersolutions.com Wed Oct 6 18:12:26 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Wed, 6 Oct 2010 12:12:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5254 - no need to scroll left to right on acq z search Message-ID: <1286381546-7017-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard - Adding inline preview/import menu to match cataloging z39.50 search - Improving behavior of inline menu on both pages - Adding white space to ISBN/ISSN output on both pages to allow line breaks, improving table width and horizontal scrolling. --- acqui/z3950_search.pl | 9 ++++- cataloguing/z3950_search.pl | 11 ++++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 ++++++++++++++++---- .../prog/en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 0215873..182e121 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -254,7 +254,14 @@ sub displayresults { ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; - $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 9b6c8f1..6311c0b 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -237,8 +237,15 @@ warn "query ".$query if $DEBUG; # In rel2_2 i am not sure what encoding is so no character conversion is done here ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); - $oldbiblio->{isbn} =~ s/ |-|\.//g, - $oldbiblio->{issn} =~ s/ |-|\.//g, + $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index f9f96ae..2219dfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -14,6 +14,7 @@ $.tablesorter.addParser({ }); $(document).ready(function(){ + $.tablesorter.defaults.widgets = ['zebra']; $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -22,23 +23,48 @@ $.tablesorter.addParser({ $(".checkboxed").unCheckCheckboxes(); return false; }); + + $("#closemenu").click(function(e){ + $(".linktools").hide(); + $("tr").removeClass("selected"); + }); + $("#resultst").tablesorter({ sortList: [[1,0]], - headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} }); + /* Inline edit/delete links */ + $("td").click(function(event){ + var $tgt = $(event.target); + $(".linktools").hide(); + $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } + var row = $(this).parent(); + row.addClass("selected"); + }); }); //]]> - + -
      +

      Z39.50 Search Points

      @@ -114,13 +140,13 @@ $.tablesorter.addParser({ - + - " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card - &breedingid=&booksellerid=&basketno=">Order + " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card + &breedingid=&booksellerid=&basketno=">Order diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index 55859c7..f0b11f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -38,18 +38,19 @@ $(document).ready(function(){ }); /* Inline edit/delete links */ $("td").click(function(event){ + var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } var row = $(this).parent(); row.addClass("selected"); - - var $tgt = $(event.target); - if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { - var position = $(this).offset(); - var top = position.top+5; - var left = position.left+5; - $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); - } }); }); -- 1.5.6.5 From nengard at bywatersolutions.com Wed Oct 6 18:13:02 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Wed, 6 Oct 2010 12:13:02 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5254 - no need to scroll left to right on acq z search Message-ID: <1286381582-7043-1-git-send-email-nengard@bywatersolutions.com> From: Owen Leonard - Adding inline preview/import menu to match cataloging z39.50 search - Improving behavior of inline menu on both pages - Adding white space to ISBN/ISSN output on both pages to allow line breaks, improving table width and horizontal scrolling. Signed-off-by: Nicole Engard --- acqui/z3950_search.pl | 9 ++++- cataloguing/z3950_search.pl | 11 ++++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 ++++++++++++++++---- .../prog/en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- 4 files changed, 60 insertions(+), 19 deletions(-) diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl index 0215873..182e121 100755 --- a/acqui/z3950_search.pl +++ b/acqui/z3950_search.pl @@ -254,7 +254,14 @@ sub displayresults { ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; - $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 9b6c8f1..6311c0b 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -237,8 +237,15 @@ warn "query ".$query if $DEBUG; # In rel2_2 i am not sure what encoding is so no character conversion is done here ##Add necessary encoding changes to here -TG my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); - $oldbiblio->{isbn} =~ s/ |-|\.//g, - $oldbiblio->{issn} =~ s/ |-|\.//g, + $oldbiblio->{isbn} =~ s/ |-|\.//g if $oldbiblio->{isbn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; + $oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; + + $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; + # pad | and ( with spaces to allow line breaks in the HTML + $oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; + $oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; my ( $notmarcrecord, $alreadyindb, $alreadyinfarm, $imported, $breedingid diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl index f9f96ae..2219dfa 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl @@ -14,6 +14,7 @@ $.tablesorter.addParser({ }); $(document).ready(function(){ + $.tablesorter.defaults.widgets = ['zebra']; $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -22,23 +23,48 @@ $.tablesorter.addParser({ $(".checkboxed").unCheckCheckboxes(); return false; }); + + $("#closemenu").click(function(e){ + $(".linktools").hide(); + $("tr").removeClass("selected"); + }); + $("#resultst").tablesorter({ sortList: [[1,0]], - headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} + headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} }); + /* Inline edit/delete links */ + $("td").click(function(event){ + var $tgt = $(event.target); + $(".linktools").hide(); + $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } + var row = $(this).parent(); + row.addClass("selected"); + }); }); //]]> - + -
      +

      Z39.50 Search Points

      @@ -114,13 +140,13 @@ $.tablesorter.addParser({ - + - " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card - &breedingid=&booksellerid=&basketno=">Order + " title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card + &breedingid=&booksellerid=&basketno=">Order diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index 55859c7..f0b11f8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -38,18 +38,19 @@ $(document).ready(function(){ }); /* Inline edit/delete links */ $("td").click(function(event){ + var $tgt = $(event.target); $(".linktools").hide(); $("tr").removeClass("selected"); + if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ + return true; + } else { + var position = $(this).offset(); + var top = position.top+5; + var left = position.left+5; + $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); + } var row = $(this).parent(); row.addClass("selected"); - - var $tgt = $(event.target); - if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { - var position = $(this).offset(); - var top = position.top+5; - var left = position.left+5; - $(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); - } }); }); -- 1.5.6.5 From nengard at gmail.com Thu Oct 7 18:20:50 2010 From: nengard at gmail.com (Nicole Engard) Date: Thu, 7 Oct 2010 12:20:50 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5254 - no need to scroll left to right on acq z search In-Reply-To: <1286381546-7017-1-git-send-email-nengard@bywatersolutions.com> References: <1286381546-7017-1-git-send-email-nengard@bywatersolutions.com> Message-ID: sorry - did it again - i forgot the actual sign off - new patch coming On Wed, Oct 6, 2010 at 12:12 PM, Nicole Engard wrote: > From: Owen Leonard > > - Adding inline preview/import menu to match cataloging z39.50 search > - Improving behavior of inline menu on both pages > - Adding white space to ISBN/ISSN output on both pages to allow > ?line breaks, improving table width and horizontal scrolling. > --- > ?acqui/z3950_search.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?9 ++++- > ?cataloguing/z3950_search.pl ? ? ? ? ? ? ? ? ? ? ? ?| ? 11 ++++- > ?.../prog/en/modules/acqui/z3950_search.tmpl ? ? ? ?| ? 42 ++++++++++++++++---- > ?.../prog/en/modules/cataloguing/z3950_search.tmpl ?| ? 17 ++++---- > ?4 files changed, 60 insertions(+), 19 deletions(-) > > diff --git a/acqui/z3950_search.pl b/acqui/z3950_search.pl > index 0215873..182e121 100755 > --- a/acqui/z3950_search.pl > +++ b/acqui/z3950_search.pl > @@ -254,7 +254,14 @@ sub displayresults { > ?##Add necessary encoding changes to here -TG > ? ? ? ? ? ? ? ? ? ? ? ? my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); > ? ? ? ? ? ? ? ? ? ? ? ? $oldbiblio->{isbn} ? =~ s/ |-|\.//g if $oldbiblio->{isbn}; > - ? ? ? ? ? ? ? ? ? ? ? ? $oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; > + ? ? ? ? ? ? ? ? ? ? ? ?# pad | and ( with spaces to allow line breaks in the HTML > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; > + > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; > + ? ? ? ? ? ? ? ? ? ? ? ?# pad | and ( with spaces to allow line breaks in the HTML > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; > ? ? ? ? ? ? ? ? ? ? ? ? ? my ( > ? ? ? ? ? ? ? ? ? ? ? ? ? ? $notmarcrecord, $alreadyindb, $alreadyinfarm, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? $imported, ? ? ?$breedingid > diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl > index 9b6c8f1..6311c0b 100755 > --- a/cataloguing/z3950_search.pl > +++ b/cataloguing/z3950_search.pl > @@ -237,8 +237,15 @@ warn "query ".$query ?if $DEBUG; > ?# In rel2_2 i am not sure what encoding is so no character conversion is done here > ?##Add necessary encoding changes to here -TG > ? ? ? ? ? ? ? ? ? ? ? ? my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, "" ); > - ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} ? =~ s/ |-|\.//g, > - ? ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/ |-|\.//g, > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} ? =~ s/ |-|\.//g if $oldbiblio->{isbn}; > + ? ? ? ? ? ? ? ? ? ? ? ?# pad | and ( with spaces to allow line breaks in the HTML > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} =~ s/\|/ \| /g if $oldbiblio->{isbn}; > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{isbn} =~ s/\(/ \(/g if $oldbiblio->{isbn}; > + > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/ |-|\.//g if $oldbiblio->{issn}; > + ? ? ? ? ? ? ? ? ? ? ? ?# pad | and ( with spaces to allow line breaks in the HTML > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/\|/ \| /g if $oldbiblio->{issn}; > + ? ? ? ? ? ? ? ? ? ? ? ?$oldbiblio->{issn} =~ s/\(/ \(/g if $oldbiblio->{issn}; > ? ? ? ? ? ? ? ? ? ? ? ? ? my ( > ? ? ? ? ? ? ? ? ? ? ? ? ? ? $notmarcrecord, $alreadyindb, $alreadyinfarm, > ? ? ? ? ? ? ? ? ? ? ? ? ? ? $imported, ? ? ?$breedingid > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl > index f9f96ae..2219dfa 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tmpl > @@ -14,6 +14,7 @@ $.tablesorter.addParser({ > ?}); > > ? ? ? ?$(document).ready(function(){ > + ? ?$.tablesorter.defaults.widgets = ['zebra']; > ? ? $("#CheckAll").click(function(){ > ? ? ? ? $(".checkboxed").checkCheckboxes(); > ? ? ? ? return false; > @@ -22,23 +23,48 @@ $.tablesorter.addParser({ > ? ? ? ? $(".checkboxed").unCheckCheckboxes(); > ? ? ? ? return false; > ? ? }); > + > + ? ?$("#closemenu").click(function(e){ > + ? ? ? ?$(".linktools").hide(); > + ? ? ? ?$("tr").removeClass("selected"); > + ? ?}); > + > ? ? ? ?$("#resultst").tablesorter({ > ? ? ? ? ? ? ? ?sortList: [[1,0]], > - ? ? ? ? ? ? ? headers: { 0: {sorter:false}, 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} > + ? ? ? ? ? ? ? headers: { 1: { sorter: 'articles' },5: { sorter: false },6: { sorter: false }} > ? ? ? ?}); > + ? ? ? ?/* Inline edit/delete links */ > + ? ? ? ?$("td").click(function(event){ > + ? ? ? ? ? ?var $tgt = $(event.target); > + ? ? ? ? ? ?$(".linktools").hide(); > + ? ? ? ? ? ?$("tr").removeClass("selected"); > + ? ? ? ? ? ?if($tgt.is("a")||$tgt.is(":nth-child(5)")||$tgt.is(":nth-child(6)")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")){ > + ? ? ? ? ? ? ? ?return true; > + ? ? ? ? ? ?} else { > + ? ? ? ? ? ? ? ?var position = $(this).offset(); > + ? ? ? ? ? ? ? ?var top = position.top+5; > + ? ? ? ? ? ? ? ?var left = position.left+5; > + ? ? ? ? ? ? ? ?$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); > + ? ? ? ? ? ?} > + ? ? ? ? ? ?var row = $(this).parent(); > + ? ? ? ? ? ?row.addClass("selected"); > + ? ? ? ?}); > ?}); > ?//]]> > ? > - ? > + > ? > ? > ? > ? > > ? > -
      > +
      > ? ? ?
      > ? ? ? ? ? > ?

      Z39.50 Search Points

      > @@ -114,13 +140,13 @@ $.tablesorter.addParser({ > ? ? ? ? > > ? ? ? ? > - ? ? ? ? ? ? > + ? ? ? ? ? ? > ? ? ? ? ? ? > ? ? ? ? ? ? > ? ? ? ? ? ? > ? ? ? ? ? ? > - ? ? ? ? ? ?" title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card > - ? ? ? ? ? ? ? ? ? ? ? &breedingid=&booksellerid=&basketno=">Order > + ? ? ? ? ? ?" title="MARC" rel="gb_page_center[600,500]">MARC" title="MARC" rel="gb_page_center[600,500]">Card > + ? ? ? ? ? ? ? ? ? ? ? &breedingid=&booksellerid=&basketno=">Order > > ? ? ? ? > ? ? ? ? > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl > index 55859c7..f0b11f8 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl > @@ -38,18 +38,19 @@ $(document).ready(function(){ > ? ? }); > ? ? ? ? /* Inline edit/delete links */ > ? ? ? ? $("td").click(function(event){ > + ? ? ? ? ? ?var $tgt = $(event.target); > ? ? ? ? ? ? $(".linktools").hide(); > ? ? ? ? ? ? $("tr").removeClass("selected"); > + ? ? ? ? ? ?if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ > + ? ? ? ? ? ? ? ?return true; > + ? ? ? ? ? ?} else { > + ? ? ? ? ? ? ? ?var position = $(this).offset(); > + ? ? ? ? ? ? ? ?var top = position.top+5; > + ? ? ? ? ? ? ? ?var left = position.left+5; > + ? ? ? ? ? ? ? ?$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); > + ? ? ? ? ? ?} > ? ? ? ? ? ? var row = $(this).parent(); > ? ? ? ? ? ? row.addClass("selected"); > - > - ? ? ? ? ? ?var $tgt = $(event.target); > - ? ? ? ? ? ?if($tgt.is("a")||$tgt.is(":nth-child(7)")||$tgt.is(":nth-child(8)")||$tgt.is(":nth-child(9)")||$tgt.is(":nth-child(10)")){ return true; } else { > - ? ? ? ? ? ?var position = $(this).offset(); > - ? ? ? ? ? ?var top = position.top+5; > - ? ? ? ? ? ?var left = position.left+5; > - ? ? ? ? ? ?$(".linktools",row).show().css("position","absolute").css("top",top).css("left",left); > - ? ? ? ? ? ?} > ? ? ? ? }); > ?}); > > -- > 1.5.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From lrea at nekls.org Thu Oct 7 21:53:28 2010 From: lrea at nekls.org (Liz Rea) Date: Thu, 7 Oct 2010 14:53:28 -0500 Subject: [Koha-patches] [PATCH] Added example/instructions on what to do to ParserDetails.ini for XML::LibXML::SAX::Parser Message-ID: <1C70F59C-E1D5-4E0C-A899-799403605A65@nekls.org> for debian-lenny (this may not apply anymore) --- INSTALL.debian-lenny | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/INSTALL.debian-lenny b/INSTALL.debian-lenny index da6c023..1cbb498 100644 --- a/INSTALL.debian-lenny +++ b/INSTALL.debian-lenny @@ -134,6 +134,10 @@ You can test your SAX parser by running: /etc/perl/XML/SAX/ParserDetails.ini + Example (in most cases, this example would be the correct entry to have at the bottom of the file): + [XML::LibXML::SAX::Parser] + + The parser you are using should be at the bottom of the file, the last listed entry. Otherwise, you may get errors. 3. Run the Koha installer -- 1.5.6.5 From lrea at nekls.org Thu Oct 7 21:54:20 2010 From: lrea at nekls.org (Liz Rea) Date: Thu, 7 Oct 2010 14:54:20 -0500 Subject: [Koha-patches] [PATCH] Left off a line of instructions re: ParserDetails.ini instructions/example. Message-ID: <8DB91C0B-0D36-4485-B5F8-B703119D0BF6@nekls.org> For debian-lenny. May not apply. --- INSTALL.debian-lenny | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/INSTALL.debian-lenny b/INSTALL.debian-lenny index 1cbb498..f822ee8 100644 --- a/INSTALL.debian-lenny +++ b/INSTALL.debian-lenny @@ -128,7 +128,6 @@ You can test your SAX parser by running: You should see something like:: XML::LibXML::SAX::Parser=HASH(0x81fe220) - If you're using PurePerl or Expat, you'll need to edit your ini file, typically located at: @@ -136,6 +135,7 @@ You can test your SAX parser by running: Example (in most cases, this example would be the correct entry to have at the bottom of the file): [XML::LibXML::SAX::Parser] + http://xml.org/sax/features/namespaces = 1 The parser you are using should be at the bottom of the file, the last listed entry. Otherwise, you may get errors. -- 1.5.6.5 From lrea at nekls.org Thu Oct 7 21:52:37 2010 From: lrea at nekls.org (Liz Rea) Date: Thu, 7 Oct 2010 14:52:37 -0500 Subject: [Koha-patches] [PATCH] Added XML::LibXML::SAX::Parser example and instructions on how to edit the ParserDetails.ini file. Message-ID: --- INSTALL.debian | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/INSTALL.debian b/INSTALL.debian index bfb94e2..bc15d23 100644 --- a/INSTALL.debian +++ b/INSTALL.debian @@ -188,6 +188,12 @@ When the configuration is completed CPAN will install the Perl modules. /etc/perl/XML/SAX/ParserDetails.ini + Example (in most cases, this example would be the correct entry to have at the bottom of the file): + [XML::LibXML::SAX::Parser] + http://xml.org/sax/features/namespaces = 1 + + The parser you are using should be at the bottom of the file, the last listed entry. Otherwise, you may get errors. + 2.4 Install DBD::mysql Perl module In order to handle UTF-8 correctly, Koha requires at least version 4.004 -- 1.5.6.5 From robin at catalyst.net.nz Fri Oct 8 03:56:16 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 8 Oct 2010 14:56:16 +1300 Subject: [Koha-patches] [PATCH] Bug 5294 - Unescape vendor name when pushing back Message-ID: <1286502977-5825-1-git-send-email-robin@catalyst.net.nz> From: Srdjan Jankovic Signed-off-by: Robin Sheat --- .../en/modules/serials/acqui-search-result.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl index bacd1a9..f5a1577 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/acqui-search-result.tmpl @@ -6,7 +6,7 @@ function GetIt(aqbooksellerid,name) { opener.document.f.aqbooksellerid.value = aqbooksellerid; - opener.document.f.aqbooksellername.value = name; + opener.document.f.aqbooksellername.value = unescape(name); window.close(); } -- 1.7.1 From robin at catalyst.net.nz Fri Oct 8 03:56:17 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 8 Oct 2010 14:56:17 +1300 Subject: [Koha-patches] [PATCH] bug5027: skip unticked checkboxes when submitting in the background. In-Reply-To: <1286502977-5825-1-git-send-email-robin@catalyst.net.nz> References: <1286502977-5825-1-git-send-email-robin@catalyst.net.nz> Message-ID: <1286502977-5825-2-git-send-email-robin@catalyst.net.nz> From: Srdjan Jankovic Signed-off-by: Robin Sheat --- .../prog/en/includes/background-job.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc index 9d257f4..46922e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc @@ -47,7 +47,7 @@ // gather up form submission var inputs = []; $(':input', f).each(function() { - if (this.type == 'radio') { + if (this.type == 'radio' || this.type == 'checkbox') { if (this.checked) { inputs.push(this.name + '=' + escape(this.value)); } -- 1.7.1 From nengard at gmail.com Fri Oct 8 17:15:21 2010 From: nengard at gmail.com (Nicole Engard) Date: Fri, 8 Oct 2010 11:15:21 -0400 Subject: [Koha-patches] Fwd: [PATCH] Bug 5292 Google Preview Option for OPAC In-Reply-To: References: <1286477904-20782-1-git-send-email-darrellulm@smfpl.org> Message-ID: ---------- Forwarded message ---------- From: Darrell Ulm Date: Fri, Oct 8, 2010 at 9:47 AM Subject: Fwd: [PATCH] Bug 5292 Google Preview Option for OPAC To: Nicole Engard Nicole, Below is the patch, and it should have arrived at: koha-patches at lists.koha-community.org unless the email is down. --- ?installer/data/mysql/en/mandatory/sysprefs.sql ? ? | ? ?1 + ?.../admin/preferences/enhanced-content.pref ? ? ? ?| ? ?6 ++++++ ?.../opac-tmpl/prog/en/modules/opac-detail.tmpl ? ? | ? 10 ++++++++++ ?opac/opac-detail.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 ++ ?4 files changed, 19 insertions(+), 0 deletions(-) diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index 8bfed37..e2fe020 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -286,3 +286,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ?INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ILS-DI:Authorized_IPs','','.','Restricts usage of ILS-DI to some IPs','Free'); ?INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OverduesBlockCirc','noblock','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','noblock|confirmation|block','Choice'); ?INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('DisplayMultiPlaceHold','1','Display the ability to place multiple holds or not','','YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('GooglePreview','1','Display the ability to place multiple holds or not','','YesNo'); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref index cecb7a6..0650808 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/enhanced-content.pref @@ -130,6 +130,12 @@ Enhanced Content: ? ? ? ? ? ? ? ? ? yes: Add ? ? ? ? ? ? ? ? ? no: "Don't add" ? ? ? ? ? ? - cover images from Google Books to search results and item detail pages on the OPAC. + ? ? ? ?- + ? ? ? ? ? ?- pref: GooglePreview + ? ? ? ? ? ? ?choices: + ? ? ? ? ? ? ? ? ?yes: Add + ? ? ? ? ? ? ? ? ?no: "Don't add" + ? ? ? ? ? ?- add link to detail page to Google preview when it exists for a biblio (by isbn) ? ? Library Thing: ? ? ? ? # Awkward syntax below, due to quoting conflicts ? ? ? ? - diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl index b1fdf84..36cd7bb 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tmpl @@ -70,6 +70,16 @@ YAHOO.util.Event.onContentReady("furtherm", function () { ? ?
      ? ?
      + + ? + ? + ? + ?
      + ? + ? + ? ? /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> ? ? diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ?my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + ?$template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); ?$template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5 From nengard at gmail.com Fri Oct 8 17:15:37 2010 From: nengard at gmail.com (Nicole Engard) Date: Fri, 8 Oct 2010 11:15:37 -0400 Subject: [Koha-patches] Fwd: [PATCH] BUG 5283 NEWS ITEM FOR RECEIPT SLIP In-Reply-To: References: <1286550003-31752-1-git-send-email-darrellulm@smfpl.org> Message-ID: ---------- Forwarded message ---------- From: Darrell Ulm Date: Fri, Oct 8, 2010 at 11:08 AM Subject: Fwd: [PATCH] BUG 5283 NEWS ITEM FOR RECEIPT SLIP To: Nicole Engard ---------- Forwarded message ---------- From: Date: Fri, Oct 8, 2010 at 11:00 AM Subject: [PATCH] BUG 5283 NEWS ITEM FOR RECEIPT SLIP To: darrellulm at smfpl.org Cc: koha From: koha There is no on-off global parameter for it since if a library does not want to use it, then the library will not use the "slip" category in news - this is similar to the OPAC news and Staff news categories in the news feature. We have been using this for months in Koha 3.0 and the librarians like it and so does PR as it gives a way to advertise events and news to patrons with every checkout. The files modified are: koha-news.tmpl moremember-receipt.tmpl moremember.pl Darrell Ulm --- ?.../en/modules/members/moremember-receipt.tmpl ? ? | ? 16 +++++++++++++++- ?.../prog/en/modules/tools/koha-news.tmpl ? ? ? ? ? | ? 10 +++++++++- ?members/moremember.pl ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| ? 10 ++++++++++ ?3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl index a63e15d..1d097a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl @@ -2,7 +2,8 @@ ?Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> ? ?/includes/favicon.ico" type="image/x-icon" /> -/css/print.css" /> + /css/print.css" /> + ? +
      + + + /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5 From tajoli at cilea.it Fri Oct 8 17:54:56 2010 From: tajoli at cilea.it (Zeno Tajoli) Date: Fri, 8 Oct 2010 17:54:56 +0200 Subject: [Koha-patches] [PATCH] Bug 5128 [3.2] Unimarc default for holdings. Written with French default In-Reply-To: tajoli@cilea.it References: tajoli@cilea.it Message-ID: <1286553296-4720-1-git-send-email-tajoli@cilea.it> --- etc/zebradb/marc_defs/unimarc/biblios/record.abs | 5 +- .../mandatory/unimarc_framework_DEFAULT.sql | 153 ++++++-------------- 2 files changed, 48 insertions(+), 110 deletions(-) diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs index 586b60c..2a4258b 100644 --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs @@ -329,9 +329,10 @@ melm 995$d holdingbranch,Record-Source,item melm 995$e location,item melm 995$f barcode,item melm 995$h ccode,item -melm 995$j LC-card-number:s,item melm 995$k Call-Number,Local-Classification,lcn,Call-Number:p,Local-Classification:p,lcn:p,item -melm 995$s popularity:n,popularity:s,item melm 995$n onloan:d,onloan:n,onloan:s,onloan:w,item melm 995$u Note,Note:p,item melm 995 item # just to index every subfield + +### 942 local info +melm 942$0 popularity:n,popularity:s,item diff --git a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql index 16340c4..e03e58d 100644 --- a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql @@ -20,6 +20,17 @@ -- 2000. It includes the changes published in Update 3." - -- http://www.ifla.org/VI/3/p1996-1/sec-uni.htm . -- 2006-03-15 a + +-- From Zeno Tajoli (2010-08-12): +-- +-- Improved default id Koha field (090) and koha date field (099). +-- Insert link to sql coloum biblio.biblionumber in tag 001 +-- Insert the use of 942, local data +-- Insert a standard minimun on 995 (holding field) +-- *********************************************************************** + + + -- *********************************************************************** @@ -49,46 +60,38 @@ -- ****************************************************** --- Current Record ID Field/Subfields - -INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES - ('999', 'System Control Numbers (Koha)', 'System Control Numbers (Koha)', 0, 0, '', ''); - -INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES - ('999', '9', 'Koha biblio number (autogenerated)', 'Koha biblio number', 0, 0, 'biblio.biblionumber', -1, '', '', '', 0, -5, '', '', '', NULL), - ('999', 'a', 'Koha biblioitem number (autogenerated)', 'Koha biblioitem number', 0, 0, 'biblioitems.biblioitemnumber', -1, '', '', '', 0, -5, '', '', '', NULL); - - --- ****************************************************** +-- Current Record ID Field/Subfields (090) +insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values + ('090','System Control Numbers (Koha)','System Control Numbers (Koha)',0,0,'',''); --- Plugins which need to be written for primary biblioitems Field/Subfields. +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values + ('090','a','Koha biblioitem number (autogenerated)','Koha biblioitem number (autogenerated)',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'',NULL,'',''); +-- Local date field/Subfields (099) --- ('990', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), --- ('990', 'h', 'Classification part', 'Classification part', 0, 0, 'biblioitems.cn_class', 9, '', '', 'unimarc_callnumber.pl', NULL, 0, '', '', '', NULL), +insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values + ('099','local dates','',0,0,'',''); +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values + ('099','c','Date of creation (bib. record)','Date of creation (bib. record)',0,0,'biblio.datecreated',0,'','','',0,-5,'',NULL,'',''); + +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values + ('099','d','Last modified date (bib. record)','Last modified data (bib. record)',0,0,'biblio.timestamp',0,'','','',0,-5,'',NULL,'',''); --- Current primary biblioitems Field/Subfields +-- Current primary biblioitems Field/Subfields (942) INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES - ('990', 'ADDED ENTRY ELEMENTS (KOHA)', 'ADDED ENTRY ELEMENTS (KOHA)', 0, 0, '', ''); + ('942', 'ADDED ENTRY ELEMENTS (KOHA)', 'ADDED ENTRY ELEMENTS (KOHA)', 0, 0, '', ''); INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES - ('990', '0', 'Koha issues (borrowed), all copies', 'Koha issues (borrowed), all copies', 0, 0, 'biblioitems.totalissues', 9, '', '', '', NULL, -5, '', '', '', NULL), - ('990', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', '', NULL, 0, '', '', '', NULL), - ('990', '6', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'biblioitems.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), - ('990', 'a', 'Koha item type [OBSOLETE]', 'Koha item type [OBSOLETE]', 0, 0, '', 9, '', '', '', NULL, -5, '', '', '', NULL), - ('990', 'c', 'Koha item type', 'Koha item type', 0, 1, 'biblioitems.itemtype', 9, 'itemtypes', '', '', NULL, 0, '', '', '', NULL), - ('990', 'e', 'Edition', 'Edition', 0, 0, 'biblioitems.cn_edition', 9, 'CN_EDITION', '', '', NULL, 0, '', '', '', NULL), - ('990', 'h', 'Classification part', 'Classification part', 0, 0, 'biblioitems.cn_class', 9, '', '', '', NULL, 0, '', '', '', NULL), - ('990', 'i', 'Item part', 'Item part', 1, 0, 'biblioitems.cn_item', 9, '', '', '', NULL, 9, '', '', '', NULL), - ('990', 'k', 'Call number prefix', 'Call number prefix', 0, 0, 'biblioitems.cn_prefix', 9, '', '', '', NULL, 0, '', '', '', NULL), - ('990', 'm', 'Call number suffix', 'Call number suffix', 0, 0, 'biblioitems.cn_suffix', 9, '', '', '', 0, 0, '', '', '', NULL), - ('990', 'n', 'Suppress in OPAC', 'Suppress in OPAC', 0, 0, NULL, 9, '', '', '', 0, 0, '', '', '', NULL), - ('990', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL); + ('942', '0', 'Koha issues (borrowed), all copies', 'Koha issues (borrowed), all copies', 0, 0, 'biblioitems.totalissues', 9, '', '', '', NULL, -5, '', '', '', NULL), + ('942', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', '', NULL, 0, '', '', '', NULL), + ('942', '6', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'biblioitems.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), + ('942', 'c', 'Koha item type', 'Koha item type', 0, 1, 'biblioitems.itemtype', 9, 'itemtypes', '', '', NULL, 0, '', '', '', NULL), + ('942', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL); -- ****************************************************** @@ -112,59 +115,6 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` --- Recommended items Field/Subfields - --- INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES --- ('995', 'Location and Item Information (Koha)', 'Location and Item Information (Koha)', 0, 0, '', ''); - --- INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES --- ('995', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WTHDRAWN', '', '', 0, 0, '', '', '', NULL), --- ('995', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), --- ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), --- ('995', '3', 'Classification part', 'Classification part', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), --- ('995', '4', 'Item part', 'Item part', 1, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), --- ('995', '5', 'Use restrictions', 'Use restrictions', 0, 0, 'items.restricted', 10, 'RESTRICTED', '', '', 0, 0, '', '', '', NULL), --- ('995', '6', 'Coded location qualifier', 'Coded location qualifier', 1, 0, '', 10, '', '', 'marc21_locationqualifier.pl', NULL, 0, '', '', '', NULL), --- ('995', '7', 'Copy number', 'Copy number', 0, 0, 'items.copynumber', 10, '', '', '', NULL, 0, '', '', '', NULL), --- ('995', '8', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, 'items.uri', 10, '', '', '', 1, 0, '', '', '', NULL), --- ('995', '9', 'Internal item number (Koha itemnumber, autogenerated)', 'Internal itemnumber (Koha itemnumber)', 0, 0, 'items.itemnumber', -1, '', '', '', 0, -5, '', '', '', NULL), --- ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), --- ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'c', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), --- ('995', 'd', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'e', 'Genre detail', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'f', 'Barcode', 'Barcode', 0, 0, 'items.barcode', 10, '', '', 'barcode.pl', 0, 0, '', '', '', NULL), --- ('995', 'g', 'Barcode prefix', 'Barcode prefix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'h', 'Barcode incrementation', 'Barcode incrementation', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'i', 'Barcode suffix', 'Barcode suffix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'j', 'Section', 'Section', 0, 0, '', 10, '', '', '', 0, 0, '', '', '', NULL), --- ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', 'unimarc_itemcallnumber.pl', 0, 0, '', '', '', NULL), --- ('995', 'l', 'Numbering (volume or other part)', 'Numbering (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', 0, 0, '', '', '', NULL), --- ('995', 'm', 'Date of loan or deposit', 'Date of loan or deposit', 0, 0, 'items.datelastborrowed', 10, '', '', '', 0, -5, '', '', '', NULL), --- ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'o', 'Circulation type (not for loan)', 'Circulation type (not for loan)', 1, 0, 'items.notforloan', 10, '', '', '', 0, 0, '', '', '', NULL), --- ('995', 'p', 'Serial', 'Serial', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'q', 'Intended audience (age level)', 'Intended audience (age level)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), --- ('995', 's', 'Acquisition mode', 'Acquisition mode', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 't', 'Genre', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'u', 'Copy note', 'Copy note', 0, 0, 'items.itemnotes', 10, '', '', '', 0, 0, '', '', '', NULL), --- ('995', 'v', 'Periodical number', 'Periodical number', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'w', 'Recipient organisation code', 'Recipient organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'x', 'Recipient organisation, free text', 'Recipient organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'y', 'Recipient parent organisation code', 'Recipient parent organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), --- ('995', 'z', 'Recipient parent organisation, free text', 'Recipient parent organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL); - - - --- Plugins which need to be written for items Field/Subfields - - --- ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), --- ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', 'unimarc_itemcallnumber.pl', 0, 0, '', '', '', NULL), - - - -- Current items Field/Subfields INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES @@ -172,42 +122,29 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('995', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WTHDRAWN', '', '', 0, 0, '', '', '', NULL), - ('995', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), - ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), +i ('995', '2', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), ('995', '3', 'Use restrictions', 'Use restrictions', 0, 0, 'items.restricted', 10, 'RESTRICTED', '', '', 0, 0, '', '', '', NULL), - ('995', '4', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'items.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), - ('995', '5', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', 'marc21_locationqualifier.pl', NULL, 0, '', '', '', NULL), + ('995', '5', 'Date acquired', 'Coded location qualifier', 0, 0, 'items.dateaccessioned', 10, '', '', '', NULL, 0, '', '', '', NULL), ('995', '6', 'Copy number', 'Copy number', 0, 0, 'items.copynumber', 10, '', '', '', NULL, 0, '', '', '', NULL), ('995', '7', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 0, 0, 'items.uri', 10, '', '', '', 0, 0, '', '', '', NULL), - ('995', '8', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), ('995', '9', 'Internal item number (Koha itemnumber, autogenerated)', 'Internal itemnumber (Koha itemnumber)', 0, 0, 'items.itemnumber', -1, '', '', '', 0, -5, '', '', '', NULL), - ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), - ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'c', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), - ('995', 'd', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'e', 'Genre detail', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), + ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), + ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, 'items.homebranch', 10, 'branches', '', '', 0, -1, '', '', '', NULL), + ('995', 'c', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code ', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), + ('995', 'd', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), + ('995', 'e', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), ('995', 'f', 'Barcode', 'Barcode', 0, 0, 'items.barcode', 10, '', '', 'barcode.pl', 0, 0, '', '', '', NULL), - ('995', 'g', 'Barcode prefix', 'Barcode prefix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'h', 'Barcode incrementation', 'Barcode incrementation', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'i', 'Barcode suffix', 'Barcode suffix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'j', 'Section', 'Section', 0, 0, '', 10, '', '', '', 0, 0, '', '', '', NULL), + ('995', 'h', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), + ('995', 'j', 'Inventory number', 'Inventory number', 0, 0, 'items.stocknumber ', 10, '', '', '', 0, 0, '', '', '', NULL), ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', '', 0, 0, '', '', '', NULL), ('995', 'l', 'Numbering (volume or other part)', 'Numbering (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', 0, 0, '', '', '', NULL), ('995', 'm', 'Date of loan or deposit', 'Date of loan or deposit', 0, 0, 'items.datelastborrowed', 10, '', '', '', 0, -5, '', '', '', NULL), - ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), + ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, 'items.onloan', 10, '', '', '', 0, -1, '', '', '', NULL), ('995', 'o', 'Circulation type (not for loan)', 'Circulation type (not for loan)', 0, 0, 'items.notforloan', 10, '', '', '', 0, 0, '', '', '', NULL), - ('995', 'p', 'Serial', 'Serial', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'q', 'Intended audience (age level)', 'Intended audience (age level)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), - ('995', 's', 'Acquisition mode', 'Acquisition mode', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 't', 'Genre', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), ++ ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, 'items.itype', 10, 'itemtypes', '', '', 0, 0, '', '', '', NULL), ('995', 'u', 'Copy note', 'Copy note', 0, 0, 'items.itemnotes', 10, '', '', '', 0, 0, '', '', '', NULL), - ('995', 'v', 'Periodical number', 'Periodical number', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'w', 'Recipient organisation code', 'Recipient organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'x', 'Recipient organisation, free text', 'Recipient organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'y', 'Recipient parent organisation code', 'Recipient parent organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), - ('995', 'z', 'Recipient parent organisation, free text', 'Recipient parent organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL); - + ('995', 'v', 'Serial Enumeration / chronology', 'Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, -1, '', '', '', NULL); + -- ******************************************************* @@ -385,7 +322,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('000', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'unimarc_leader.pl', 0, 0, '', '', '', NULL), - ('001', '@', 'control field', 'control field', 0, 1, '', 0, '', '', '', 0, 0, '', '', '', NULL), + ('001', '@', 'control field', 'control field', 0, 1, 'biblio.biblionumber', -1, '', '', '', 0, 0, '', '', '', NULL), ('005', '@', 'control field', 'control field', 0, 0, '', 0, '', '', 'marc21_field_005.pl', 0, 0, '', '', '', NULL), ('010', 'a', 'Number (ISBN)', 'Number (ISBN)', 0, 0, 'biblioitems.isbn', 0, '', '', '', 0, 0, '', '', '', NULL), ('010', 'b', 'Qualification', 'Qualification', 0, 0, '', 0, '', '', '', 0, 0, '', '', '', NULL), -- 1.5.3.7 From koha at smfpl.org Fri Oct 8 17:52:38 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 11:52:38 -0400 Subject: [Koha-patches] [PATCH] BUG 5283 NEWS ITEM FOR RECEIPT SLIP Message-ID: <1286553158-827-1-git-send-email-koha@smfpl.org> From: koha There is no on-off global parameter for it since if a library does not want to use it, then the library will not use the "slip" category in news - this is similar to the OPAC news and Staff news categories in the news feature. We have been using this for months in Koha 3.0 and the librarians like it and so does PR as it gives a way to advertise events and news to patrons with every checkout. The files modified are: koha-news.tmpl moremember-receipt.tmpl moremember.pl Darrell Ulm --- .../en/modules/members/moremember-receipt.tmpl | 16 +++++++++++++++- .../prog/en/modules/tools/koha-news.tmpl | 10 +++++++++- members/moremember.pl | 10 ++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl index a63e15d..1d097a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl @@ -2,7 +2,8 @@ Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> /includes/favicon.ico" type="image/x-icon" /> -/css/print.css" /> + /css/print.css" /> + +
      + + + /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5 From koha at smfpl.org Fri Oct 8 17:56:44 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 11:56:44 -0400 Subject: [Koha-patches] [PATCH] BUG 5283 NEWS ITEM FOR RECEIPT SLIP Message-ID: <1286553404-920-1-git-send-email-koha@smfpl.org> From: koha There is no on-off global parameter for it since if a library does not want to use it, then the library will not use the "slip" category in news - this is similar to the OPAC news and Staff news categories in the news feature. We have been using this for months in Koha 3.0 and the librarians like it and so does PR as it gives a way to advertise events and news to patrons with every checkout. The files modified are: koha-news.tmpl moremember-receipt.tmpl moremember.pl Darrell Ulm --- .../en/modules/members/moremember-receipt.tmpl | 16 +++++++++++++++- .../prog/en/modules/tools/koha-news.tmpl | 10 +++++++++- members/moremember.pl | 10 ++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl index a63e15d..1d097a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl @@ -2,7 +2,8 @@ Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> /includes/favicon.ico" type="image/x-icon" /> -/css/print.css" /> + /css/print.css" /> + +
      + + + /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5 From koha at smfpl.org Fri Oct 8 18:02:41 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 12:02:41 -0400 Subject: [Koha-patches] [PATCH] Bug 5283 NEWS ITEM FOR RECEIPT SLIP Message-ID: <1286553761-1765-1-git-send-email-koha@smfpl.org> From: koha There is no on-off global parameter for it since if a library does not want to use it, then the library will not use the "slip" category in news - this is similar to the OPAC news and Staff news categories in the news feature. We have been using this for months in Koha 3.0 and the librarians like it and so does PR as it gives a way to advertise events and news to patrons with every checkout. The files modified are: koha-news.tmpl moremember-receipt.tmpl moremember.pl Darrell Ulm --- .../en/modules/members/moremember-receipt.tmpl | 16 +++++++++++++++- .../prog/en/modules/tools/koha-news.tmpl | 10 +++++++++- members/moremember.pl | 10 ++++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl index a63e15d..1d097a1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-receipt.tmpl @@ -2,7 +2,8 @@ Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> /includes/favicon.ico" type="image/x-icon" /> -/css/print.css" /> + /css/print.css" /> + +
      + + + /gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link" target="_blank">.01.MZZZZZZZ.jpg" alt="Cover Image" />/gp/reader//ref=sib_dp_pt/002-7879865-0184864#reader-link">.01.MZZZZZZZ.jpg" alt="Cover Image" /> diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 629ebd2..cec8e15 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -62,6 +62,8 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +$template->param( 'GooglePreview' => C4::Context->preference('GooglePreView') ); + $template->param( 'AllowOnShelfHolds' => C4::Context->preference('AllowOnShelfHolds') ); $template->param( 'ItemsIssued' => CountItemsIssued( $biblionumber ) ); -- 1.5.6.5 From koha at smfpl.org Fri Oct 8 19:46:16 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 13:46:16 -0400 Subject: [Koha-patches] [PATCH] Bug 5298 OPAC change password option for patron Message-ID: <1286559976-2927-1-git-send-email-koha@smfpl.org> This is an enhancement to allow a patron to change the password of their account saving librarian time and effort. The current password is required as well as two tries with an existing password. Darrell Ulm --- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index 26bf502..34d2a5f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -29,7 +29,6 @@
    • my lists
    • -
    -- 1.5.6.5 From koha at smfpl.org Fri Oct 8 19:47:18 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 13:47:18 -0400 Subject: [Koha-patches] [PATCH] Bug 5298 OPAC change password option for patron Message-ID: <1286560038-2995-1-git-send-email-koha@smfpl.org> This is an enhancement to allow a patron to change the password of their account saving librarian time and effort. The current password is required as well as two tries with an existing password. Darrell Ulm --- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index 26bf502..34d2a5f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -29,7 +29,6 @@
  • my lists
  • -
-- 1.5.6.5 From lrea at nekls.org Fri Oct 8 19:48:50 2010 From: lrea at nekls.org (Liz Rea) Date: Fri, 8 Oct 2010 12:48:50 -0500 Subject: [Koha-patches] [PATCH] Cleanup/deduping, adding additional necessary packages Message-ID: <1286560130-3767-1-git-send-email-lrea@nekls.org> --- install_misc/apt-get-debian-lenny.sh | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/install_misc/apt-get-debian-lenny.sh b/install_misc/apt-get-debian-lenny.sh index 4e48f59..84ec149 100755 --- a/install_misc/apt-get-debian-lenny.sh +++ b/install_misc/apt-get-debian-lenny.sh @@ -12,12 +12,15 @@ idzebra-2.0 \ idzebra-2.0-utils \ libalgorithm-checkdigits-perl \ libbiblio-endnotestyle-perl \ +<<<<<<< HEAD:install_misc/apt-get-debian-lenny.sh libbusiness-isbn-perl \ +======= libcgi-session-perl \ libcgi-session-serialize-yaml-perl \ libclass-accessor-perl \ libclass-factory-util-perl \ libdata-ical-perl \ +<<<<<<< HEAD:install_misc/apt-get-debian-lenny.sh libdate-calc-perl \ libdate-ical-perl \ libdate-manip-perl \ @@ -51,6 +54,7 @@ libgraphics-magick-perl \ libjson-perl \ libjson-xs-perl \ liblingua-ispell-perl \ +<<<<<<< HEAD:install_misc/apt-get-debian-lenny.sh liblingua-stem-perl \ liblist-moreutils-perl \ liblocale-gettext-perl \ @@ -69,6 +73,7 @@ libnumber-format-perl \ libpdf-api2-perl \ libpdf-reuse-barcode-perl \ libpdf-reuse-perl \ +<<<<<<< HEAD:install_misc/apt-get-debian-lenny.sh libpdf-table-perl \ libpoe-perl \ libschedule-at-perl \ @@ -101,6 +106,7 @@ libyaml-perl \ libyaml-syck-perl \ libyaz-dev \ libyaz3 \ +perl-doc\ make \ mysql-server \ yaz-doc \ -- 1.5.6.5 From cnighswonger at foundations.edu Fri Oct 8 21:04:29 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Fri, 8 Oct 2010 15:04:29 -0400 Subject: [Koha-patches] [PATCH] Bug 5298 OPAC change password option for patron In-Reply-To: <1286559976-2927-1-git-send-email-koha@smfpl.org> References: <1286559976-2927-1-git-send-email-koha@smfpl.org> Message-ID: This patch does not seem to change anything. Also, this functionality is already present in OPAC. Kind Regards, Chris On Fri, Oct 8, 2010 at 1:46 PM, Darrell Ulm wrote: > This is an enhancement to allow a patron to change the password of their > account saving librarian time and effort. > > The current password is required as well as two tries with an existing > password. > > ? Darrell Ulm > --- > ?koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | ? ?1 - > ?1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc > index 26bf502..34d2a5f 100644 > --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc > +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc > @@ -29,7 +29,6 @@ > ? > ?
  • my lists
  • > ? > - > ? > ?
    > ? > -- > 1.5.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From koha at smfpl.org Fri Oct 8 21:36:12 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 15:36:12 -0400 Subject: [Koha-patches] [PATCH] Bug 5299 Allow patron to update email if they are allowed to update password Message-ID: <1286566572-4456-1-git-send-email-koha@smfpl.org> The update email option is in a separate opac menu option. To update or add an email requires the patron to type in their password as well as the email address to change their email to. This is the patch I meant to send! Darrell Ulm --- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 5 +- .../prog/en/modules/opac-changeemail.tmpl | 87 +++++++++++++++ opac/opac-changeemail.pl | 115 ++++++++++++++++++++ 3 files changed, 206 insertions(+), 1 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl create mode 100755 opac/opac-changeemail.pl diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index 34d2a5f..3b1a901 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -12,6 +12,9 @@
  • change my password
  • + +
  • add or change email
  • +
  • my search history
  • @@ -28,7 +31,7 @@
  • my lists
  • - + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl new file mode 100644 index 0000000..dc78ed7 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl @@ -0,0 +1,87 @@ + + + +Koha Online + Catalog › Account for + + + +
    +
    + + +
    +
    +
    +

    's account l../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Change your Email or Add an Email

    + + +

    There was a problem with your submission

    +

    + + Your current password was entered incorrectly. If this problem persists, please ask a librarian to re-set your password for you. + + + When you tried to change your email, your current password was entered incorrectly. If this problem persists, please ask a librarian to re-set your password for you. + + + Your email was not changed because you did not provide your login password to verify. If you wish to + change your email then you need to include your password also. + + + You did not provide an email address to either add or change. Please provide an email address + if you wish to update your email. + +

    + + + +
      +
    • Current Email: +
    • +
    • Prior Email: +
    • +
    + + +
    +
    1. + +
    2. +
    3.  
    4. +
    +
    Cancel
    + + +
    You can't change your email.
    + + + + +

    Email Updated

    + Your Email has been changed to:
    +
    + " /> +

    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + \ No newline at end of file diff --git a/opac/opac-changeemail.pl b/opac/opac-changeemail.pl new file mode 100755 index 0000000..3eec937 --- /dev/null +++ b/opac/opac-changeemail.pl @@ -0,0 +1,115 @@ +#!/usr/bin/perl +# This script lets the users change their email by themselves. +# +# (c) 2005 Universidad ORT Uruguay. +# +# This file is part of the extensions and enhacments made to koha by Universidad ORT Uruguay +# +# Modification of Passwd.pl code by Darrell Ulm +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +use strict; + +use CGI; + +use C4::Auth; # checkauth, getborrowernumber. +use C4::Context; +use Digest::MD5 qw(md5_base64); +use C4::Circulation; +use C4::Members; +use C4::Output; + +my $query = new CGI; +my $dbh = C4::Context->dbh; + +my ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "opac-changeemail.tmpl", + query => $query, + type => "opac", + authnotrequired => 0, + flagsrequired => { borrow => 1 }, + debug => 1, + } +); + +# get borrower information .... +my ( $borr ) = GetMemberDetails( $borrowernumber ); +my $sth = $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?"); +my $minpasslen = C4::Context->preference("minPasswordLength"); + +my $oldemail = $borr->{'email'}; +my $oldemailpro = $borr->{'emailpro'}; + +if ( $query->param('Oldkey') + && $query->param('Newemail') ) + { + if ( goodkey( $dbh, $borrowernumber, $query->param('Oldkey') ) ) + { + my $sthemail = $dbh->prepare("UPDATE borrowers SET email = ? WHERE borrowernumber=?"); + $sthemail->execute( $query->param('Newemail'), $borrowernumber ); + $template->param( 'email_updated' => '1' ); + if ($oldemailpro =~ /^$/) + { + my $sthemail2 = $dbh->prepare("UPDATE borrowers SET emailpro = ? WHERE borrowernumber=?"); + $sthemail2->execute( $oldemail, $borrowernumber ); + } + } + else { + $template->param( 'Error_messages' => '1' ); + $template->param( 'EmailPassMismatch' => '1' ); + } + } +elsif ( $query->param('Newemail') + && ! $query->param('Oldkey') ) + { + $template->param( 'EmailNotChanged' => '1' ); + $template->param( 'Error_messages' => '1' ); + } +elsif ( ! $query->param('Newemail') + && $query->param('Oldkey') ) + { + $template->param( 'NoEmailAddress' => '1' ); + $template->param( 'Error_messages' => '1' ); + } +else { + $template->param( 'Ask_data' => '1' ); + $template->param( emailchangeview => 1 ); + } + +$template->param( firstname => $borr->{'firstname'}, + oldemail => $borr->{'email'}, + oldemailpro => $borr->{'emailpro'}, + surname => $borr->{'surname'}, + minpasslen => $minpasslen, + newemail => $query->param('Newemail'), + emailview => 1, + ); + +output_html_with_http_headers $query, $cookie, $template->output; + +sub goodkey { + my ( $dbh, $borrowernumber, $key ) = @_; + + my $sth = + $dbh->prepare("SELECT password FROM borrowers WHERE borrowernumber=?"); + $sth->execute($borrowernumber); + if ( $sth->rows ) { + my ($md5password) = $sth->fetchrow; + if ( md5_base64($key) eq $md5password ) { return 1; } + else { return 0; } + } + else { return 0; } +} \ No newline at end of file -- 1.5.6.5 From koha at smfpl.org Fri Oct 8 21:36:21 2010 From: koha at smfpl.org (Darrell Ulm) Date: Fri, 8 Oct 2010 15:36:21 -0400 Subject: [Koha-patches] [PATCH] Bug 5299 Allow patron to update email if they are allowed to update password Message-ID: <1286566581-4488-1-git-send-email-koha@smfpl.org> The update email option is in a separate opac menu option. To update or add an email requires the patron to type in their password as well as the email address to change their email to. This is the patch I meant to send! Darrell Ulm --- koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 5 +- .../prog/en/modules/opac-changeemail.tmpl | 87 +++++++++++++++ opac/opac-changeemail.pl | 115 ++++++++++++++++++++ 3 files changed, 206 insertions(+), 1 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl create mode 100755 opac/opac-changeemail.pl diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc index 34d2a5f..3b1a901 100644 --- a/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc +++ b/koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc @@ -12,6 +12,9 @@
  • change my password
  • + +
  • add or change email
  • +
  • my search history
  • @@ -28,7 +31,7 @@
  • my lists
  • - +
    diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl new file mode 100644 index 0000000..dc78ed7 --- /dev/null +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-changeemail.tmpl @@ -0,0 +1,87 @@ + + + +Koha Online + Catalog › Account for + + + +
    +
    + + +
    +
    +
    +

    's account l../../images/caret.gif" width="16" height="16" alt=">" border="0" /> Change your Email or Add an Email

    + + +

    There was a problem with your submission

    +

    + + Your current password was entered incorrectly. If this problem persists, please ask a librarian to re-set your password for you. + + + When you tried to change your email, your current password was entered incorrectly. If this problem persists, please ask a librarian to re-set your password for you. + + + Your email was not changed because you did not provide your login password to verify. If you wish to + change your email then you need to include your password also. + + + You did not provide an email address to either add or change. Please provide an email address + if you wish to update your email. + +

    + + + +
      +
    • Current Email: +
    • +
    • Prior Email: +
    • +
    + + +
    +
    1. + +
    2. +
    3.  
    4. +
    +
    Cancel
    + + +
    You can't change your email.
    + + + + +

    Email Updated

    + Your Email has been changed to:
    +
    + " /> +

    +
    + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    + \ No newline at end of file diff --git a/opac/opac-changeemail.pl b/opac/opac-changeemail.pl new file mode 100755 index 0000000..3eec937 --- /dev/null +++ b/opac/opac-changeemail.pl @@ -0,0 +1,115 @@ +#!/usr/bin/perl +# This script lets the users change their email by themselves. +# +# (c) 2005 Universidad ORT Uruguay. +# +# This file is part of the extensions and enhacments made to koha by Universidad ORT Uruguay +# +# Modification of Passwd.pl code by Darrell Ulm +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA + +use strict; + +use CGI; + +use C4::Auth; # checkauth, getborrowernumber. +use C4::Context; +use Digest::MD5 qw(md5_base64); +use C4::Circulation; +use C4::Members; +use C4::Output; + +my $query = new CGI; +my $dbh = C4::Context->dbh; + +my ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "opac-changeemail.tmpl", + query => $query, + type => "opac", + authnotrequired => 0, + flagsrequired => { borrow => 1 }, + debug => 1, + } +); + +# get borrower information .... +my ( $borr ) = GetMemberDetails( $borrowernumber ); +my $sth = $dbh->prepare("UPDATE borrowers SET password = ? WHERE borrowernumber=?"); +my $minpasslen = C4::Context->preference("minPasswordLength"); + +my $oldemail = $borr->{'email'}; +my $oldemailpro = $borr->{'emailpro'}; + +if ( $query->param('Oldkey') + && $query->param('Newemail') ) + { + if ( goodkey( $dbh, $borrowernumber, $query->param('Oldkey') ) ) + { + my $sthemail = $dbh->prepare("UPDATE borrowers SET email = ? WHERE borrowernumber=?"); + $sthemail->execute( $query->param('Newemail'), $borrowernumber ); + $template->param( 'email_updated' => '1' ); + if ($oldemailpro =~ /^$/) + { + my $sthemail2 = $dbh->prepare("UPDATE borrowers SET emailpro = ? WHERE borrowernumber=?"); + $sthemail2->execute( $oldemail, $borrowernumber ); + } + } + else { + $template->param( 'Error_messages' => '1' ); + $template->param( 'EmailPassMismatch' => '1' ); + } + } +elsif ( $query->param('Newemail') + && ! $query->param('Oldkey') ) + { + $template->param( 'EmailNotChanged' => '1' ); + $template->param( 'Error_messages' => '1' ); + } +elsif ( ! $query->param('Newemail') + && $query->param('Oldkey') ) + { + $template->param( 'NoEmailAddress' => '1' ); + $template->param( 'Error_messages' => '1' ); + } +else { + $template->param( 'Ask_data' => '1' ); + $template->param( emailchangeview => 1 ); + } + +$template->param( firstname => $borr->{'firstname'}, + oldemail => $borr->{'email'}, + oldemailpro => $borr->{'emailpro'}, + surname => $borr->{'surname'}, + minpasslen => $minpasslen, + newemail => $query->param('Newemail'), + emailview => 1, + ); + +output_html_with_http_headers $query, $cookie, $template->output; + +sub goodkey { + my ( $dbh, $borrowernumber, $key ) = @_; + + my $sth = + $dbh->prepare("SELECT password FROM borrowers WHERE borrowernumber=?"); + $sth->execute($borrowernumber); + if ( $sth->rows ) { + my ($md5password) = $sth->fetchrow; + if ( md5_base64($key) eq $md5password ) { return 1; } + else { return 0; } + } + else { return 0; } +} \ No newline at end of file -- 1.5.6.5 From nengard at bywatersolutions.com Mon Oct 11 22:31:10 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Mon, 11 Oct 2010 16:31:10 -0400 Subject: [Koha-patches] [PATCH] Updates to INSTALL.debian documentation for 3.2. Message-ID: <1286829070-3177-1-git-send-email-nengard@bywatersolutions.com> From: Liz Rea Signed-off-by: Nicole Engard --- INSTALL.debian | 190 +++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 121 insertions(+), 69 deletions(-) diff --git a/INSTALL.debian b/INSTALL.debian index cb38921..f0dac4d 100644 --- a/INSTALL.debian +++ b/INSTALL.debian @@ -7,7 +7,7 @@ Some parts copyright 2010 Chris Nighswonger Feedback/bug reports: Koha Developer's List: http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel -This document last modified: 19 May 2010 +This document last modified: October 8, 2010 Installation Instructions ============================= @@ -19,9 +19,9 @@ as indicated or by running the command directly as root. 1.1 Install Debian Lenny via Businesscard CD -See http://www.debian.org/releases/lenny/debian-installer/ + See http://www.debian.org/releases/lenny/debian-installer/ -1.3 Set up Indexdata apt sources for Yaz and Zebra packages +1.2 Set up Indexdata apt sources for Yaz and Zebra packages Edit your /etc/apt/sources.list file and add the following: @@ -31,30 +31,33 @@ Edit your /etc/apt/sources.list file and add the following: The Index Data packages are signed with a key you can install as follows: - $ wget http://ftp.indexdata.dk/debian/indexdata.asc - $ sudo apt-key add indexdata.asc + $ wget -O- http://ftp.indexdata.dk/debian/indexdata.asc | sudo apt-key add -1.4 Get Koha +Finally, update your apt sources: + $ sudo apt-get update -1.4.1 Option A: Download Koha via Git (optional) +1.3 Get Koha +Choose one of these options: + +1.3.1 Option A: Download Koha via Git (optional) $ sudo apt-get install git-core git-email - $ git clone git://git.koha-community.org/pub/scm/koha.git kohaclone - $ cd kohaclone + $ git clone git://git.koha-community.org/koha.git koha + $ cd koha $ git checkout -b myinstall origin Note: for more information about Git, please see the Koha Git Usage Guide: http://wiki.koha-community.org/wiki/Version_Control_Using_Git -1.4.2 Option B: Download Koha from http://download.koha-community.org +1.3.2 Option B: Download Koha from http://download.koha-community.org Find the latest Koha stable version on http://download.koha-community.org and get it: $ wget found on download.koha-community.org -1.5 Install additional Debian dependencies +1.4 Install additional Debian dependencies IMPORTANT: You should only use CPAN for Perl dependencies which are NOT available from the package maintainer. You have been warned! @@ -64,20 +67,21 @@ Zebra and all Debian packaged Perl module required by Koha: $ sudo install_misc/apt-get-debian-lenny.sh -1.6 Install Perl dependencies that aren't packaged into Debian Lenny +1.5 Install Perl dependencies that aren't packaged into Debian Lenny sources Run the following command: $ sudo cpan Algorithm::CheckDigits SMS::Send HTTP::OAI IPC::Cmd \ Memoize::Memcached PDF::API2::Simple PDF::Table Storable Test::More \ - Locale::Currency::Format + Locale::Currency::Format DateTime Lingua::Stem::Snowball Text::CSV::Encoded \ + UNIVERSAL::require YAML Authen::CAS::Client Note: you may need to run CPAN initialization if you've not run cpan before: /etc/perl/CPAN/Config.pm initialized. - + CPAN is the world-wide archive of perl resources. It consists of about 100 sites that all replicate the same contents all around the globe. Many countries have at least one CPAN site already. The resources @@ -94,23 +98,20 @@ When the configuration is completed CPAN will install the Perl modules. 2. Configuration of dependencies -2.1 Update root MySQL password (if dselect didn't do it for you already) +2.1 Create the Koha database - $ sudo mysqladmin password - -2.2 Create the Koha database - - Create the database and user with associated privileges: + Create the database and user with associated privileges (information inside <> brackets is + data you assign specifically to your installation. Do not include the <>'s when entering the commands): $ mysqladmin -uroot -p create $ mysql -uroot -p - + Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 Server version: 5.0.51a-24 (Debian) - + Type 'help;' or '\h' for help. Type '\c' to clear the buffer. - + mysql> grant all on .* to ''@'localhost' identified by ''; Query OK, 0 rows affected (0.00 sec) @@ -119,37 +120,64 @@ When the configuration is completed CPAN will install the Perl modules. mysql> quit -2.3 Test your SAX Parser and correct where necessary +You may want to document the database name, the database username, and the database password you just set. +Step 3 will require them. -You must be sure you're using the XML::LibXML SAX parser, not Expat or -PurePerl, both of which have outstanding bugs with pre-composed characters. +2.2 Test your SAX Parser and correct where necessary + +You must be sure you're using the XML::LibXML SAX parser, not Expat or +PurePerl, both of which have outstanding bugs with pre-composed characters. You can test your SAX parser by running: $ cd koha $ misc/sax_parser_print.pl - You should see something like:: +You should see something like: XML::LibXML::SAX::Parser=HASH(0x81fe220) - If you're using PurePerl or Expat, you'll need to edit your - ini file, typically located at: +If you are configured to use PurePerl or Expat, the script will say you have a problem and +you'll need to edit your ini file to correct it. + +The file is typically located at: /etc/perl/XML/SAX/ParserDetails.ini +The correct parser entry will need to be moved to the bottom of the file. +The following is the entry you are looking for: + + [XML::LibXML::SAX::Parser] + http://xml.org/sax/features/namespaces = 1 + +2.3 Create your Koha system user (if you haven't created one already) + + $ sudo adduser koha + +You can substitute any username for "koha," just be sure to write it down, you will need to know what it is in step 3. 3. Run the Koha installer $ perl Makefile.PL - ( answer questions ) + ( answer questions ) $ make $ make test $ sudo make install +3.1 Export the environment variables +Make install will tell you what the proper path for these environment variables is. +In case you missed it at the end of make install, here are some examples: + +Example (for standard install): + $ export KOHA_CONF=/etc/koha/koha-conf.xml + $ export PERL5LIB=/usr/share/koha/lib + +Example (for dev install. These paths are set during Makefile.PL.): + $ export KOHA_CONF=/path/to/your/koha-conf.xml + $ export PERL5LIB=/path/to/koha/lib + 4. Configure and start Apache $ sudo ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha - (note that the path to koha-httpd.conf may be different depending on your - installation choices) +(note that the path to koha-httpd.conf may be different if you chose a dev install) Add the following lines to /etc/apache2/ports.conf: @@ -163,75 +191,98 @@ Run the following commands: $ sudo apache2ctl restart Note: you may still see the usual Apache default site if your VirtualHost -configuration isn't correct. The command "sudo a2dissite default" may be a -quick fix, but may have side-effects. See the Apache HTTPD manual section on -virtual hosts for full instructions. + configuration isn't correct. If Koha is the only web application running on the server, + the command "sudo a2dissite default" may be a quick fix. For servers running other sites + alongside Koha, see the Apache HTTPD manual section on virtual hosts for full + instructions (http://httpd.apache.org/docs/2.0/vhosts/). + +5. Run the Web Installer, populate the database, initial configuration of settings + +Point your browser to http://:8080/ + +Note: is (usually) the IP of your server, or localhost (if you are connecting + from the same machine Koha is installed on. You can verify the location by checking + the VirtualHost settings for both the opac and intranet virtual hosts in koha-httpd.conf -5. Configure and start Zebra +Koha will redirect you to the Web Installer where you can continue the setup. You will be prompted to enter in your DATABASE username and password. It is through this interface +that +you can install the sample data for libraries, patrons, and much more. + +Be aware that removing sample data at a later time (when you may want to take the +server into production) may not be easy, and if your intent is to take this +install from testing to production, go with minimal sample data (no patrons or bibliographic records). + +6. Configure and start Zebra Note: it's recommended that you daemonize the Zebra process and add it to your -startup profile. For a non-production test/development installation, running -Zebra from the command line can be useful. Pick from the two available options -below, or roll your own :-) + startup profile. For a non-production test/development installation, running + Zebra from the command line can be useful. Pick one of the options below (or roll your own). Note: it's also recommended that you create a Koha system user, which you will -have specified during the install process. Alternatively, Zebra can be -configured to run as the root user. + have specified during the install process. Alternatively, Zebra can be + configured to run as the root user. -Option 1: run the Zebra processes from the command line: +Option 1: run the Zebra processes from the command line (manual indexing): -1.1 Zebra Search Server +6.1.1 Zebra Search Server This process send responses to search requests sent by Koha or Z39.50/SRU/SRW clients. - $ sudo -u ${KOHA_USER} zebrasrv -f /etc/koha/koha-conf.xml - (note that the path to koha-conf.xml may be different depending on your - installation choices) + $ sudo -u zebrasrv -f /etc/koha/koha-conf.xml + (note that the path to koha-conf.xml may be different if you chose a dev install, and that + refers to the user you set up in step 2.3) Note: the user you run Zebra as will be the only user with write permission on the Zebra index; in development mode, you may wish to use your system user. -1.2 Zebra Indexer + +6.1.2 Zebra Indexer Added/updated/deleted records in Koha MySQL database must be indexed into Zebra. A specific script must be launched each time a bibliographic or an authority record is edited. - $ sudo -u ${KOHA_USER} misc/migration_tools/rebuild_zebra -z -b -a - NOTE: This script should be run as the kohauser (the default is 'koha'). + $ sudo -u misc/migration_tools/rebuild_zebra.pl -z -b -a + +Note: This script should be run as the kohauser (the default is 'koha', but +this is the user you set up in step 2.3). -Option 2: run automatically Zebra process as a daemon: +Option 2: run the Zebra process as a daemon (automatic indexing): -Note that references to $SCRIPT_DIR refer to the directory where -Koha's command-line scripts are installed, e.g., /usr/share/koha/bin. +Note: References to refer to the directory where + Koha's command-line scripts are installed, the path + is /usr/share/koha/bin/ by default in a standard install. -1.1 Zebra Search Server +6.2.1 Zebra Search Server - $ sudo ln -s ${SCRIPT_DIR}/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon - (Note: ${SCRIPT_DIR} is /usr/share/koha/bin/ by default in a standard install) + $ sudo ln -s /koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon + (Note: is /usr/share/koha/bin/ by default in a standard install) $ sudo update-rc.d koha-zebra-daemon defaults - ( Note: see man chkconfig(8) on other distros ) - $ sudo ${SCRIPT_DIR}/koha-zebra-ctl.sh start + $ sudo /koha-zebra-ctl.sh start + (Note: is /usr/share/koha/bin/ by default in a standard install) -1.2 Zebra Indexer -Add an entry in Koha user crontab to scheduled added/updated/deleted records -indexing by Zebra with this command: +6.2.2 Zebra Indexer - /misc/migration_tools/rebuild_zebra -z -b -a +Add an entry in Koha user crontab to process scheduled added/updated/deleted records +indexing by Zebra. cronjobs/crontab.example contains examples for these cron jobs (and many more). -See check misc/cronjobs/crontab.example for usage examples. -NOTE: This job should be setup under the kohauser (the default is 'koha'). +NOTE: The cronjobs should be setup under the kohauser (the default is 'koha', but +this is the user you set up in step 2.3). -6. Run the Web Installer, populate the database, initial configuration of settings +Edit the crontab for the koha user by running + $ sudo -u crontab -e - Point your browser to http://:8080/ +For Zebra indexing, you are looking for the example that begins with + + # ZEBRA INDEX UPDATES with -z option, incremental index updates throughout the day + # for both authorities and bibs + +It may be easiest to copy/paste the example into your own crontab and modify as necessary. - It should redirect you to the Web Installer where you can continue the setup. - You can install the sample data for libraries, patrons, etc. via the Web Installer 7. What next? @@ -256,12 +307,12 @@ Authority data in MARC21 format $ misc/migration_tools/rebuild_zebra.pl -b -w Once the indexing has completed, you will be able to search for records in your system. - NOTE: This script should be run as the kohauser (the default is 'koha'). + NOTE: This script should be run as the kohauser (the default is 'koha', this is the user we set up in step 2.3). 7.3 Schedule regular index updates You need to run rebuild_zebra.pl -b -a -z as a regular cron job in orde to pick up new bibs and items as you add them. Check misc/cronjobs/crontab.example for usage examples. See 7.0 above. - NOTE: This job should be setup under the kohauser (the default is 'koha'). + NOTE: This job should be setup under the kohauser (the default is 'koha', this is the user we set up in step 2.3). 7.4 To enable public Z39.50/SRU servers, you'll need to edit your koha-conf.xml and change the options to listen on a TCP port; then restart the zebra daemon. @@ -318,3 +369,4 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -- 1.5.6.5 From lrea at nekls.org Tue Oct 12 16:19:17 2010 From: lrea at nekls.org (Liz Rea) Date: Tue, 12 Oct 2010 09:19:17 -0500 Subject: [Koha-patches] [PATCH] add new lenny dependency libmodule-install-perl to the apt-get-debian-lenny.sh script Message-ID: <1286893157-14327-1-git-send-email-lrea@nekls.org> --- install_misc/apt-get-debian-lenny.sh | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/install_misc/apt-get-debian-lenny.sh b/install_misc/apt-get-debian-lenny.sh index 4e48f59..015a32d 100755 --- a/install_misc/apt-get-debian-lenny.sh +++ b/install_misc/apt-get-debian-lenny.sh @@ -61,6 +61,7 @@ libmarc-crosswalk-dublincore-perl \ libmarc-record-perl \ libmarc-xml-perl \ libmime-lite-perl \ +libmodule-install-perl \ libmysqlclient15-dev \ libnet-ldap-perl \ libnet-z3950-zoom-perl \ -- 1.5.6.5 From ian.walls at bywatersolutions.com Tue Oct 12 17:32:44 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 12 Oct 2010 11:32:44 -0400 Subject: [Koha-patches] [PATCH] [SIGNED OFF] bug 5293 remove references to email on suggestions Message-ID: <1286897564-26169-1-git-send-email-ian.walls@bywatersolutions.com> From: Nicole Engard The purchase suggestions form in the opac says it will send an email to the patron, but there is no such functionality so I've removed that reference. Signed-off-by: Ian Walls --- .../prog/en/modules/opac-suggestions.tmpl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl index ab5b753..3c8dd47 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-suggestions.tmpl @@ -74,8 +74,8 @@ $.tablesorter.addParser({

    Enter a new purchase suggestion

    -

    Please fill out this form to make a purchase suggestion. You will receive an email when the library processes your suggestion

    -

    Only the title is required, but the more information you enter the easier it will be for the librarians to find title you're requesting. The "Notes" field can be used to provide any additional information.

    +

    Please fill out this form to make a purchase suggestion. You can follow the progress of your suggestion by going to 'my purchase suggestions' once you are logged in.

    +

    Only the title is required, but the more information you enter the easier it will be for the librarians to find title you're requesting. The 'Notes' field can be used to provide any additional information.

    1. -- 1.5.6.5 From oleonard at myacpl.org Tue Oct 12 17:38:44 2010 From: oleonard at myacpl.org (Owen Leonard) Date: Tue, 12 Oct 2010 11:38:44 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 4261 - keyword mapping should show which framework the map is for Message-ID: <1286897924-2671-1-git-send-email-oleonard@myacpl.org> --- admin/fieldmapping.pl | 10 +++++++++- .../prog/en/modules/admin/fieldmapping.tmpl | 8 ++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/admin/fieldmapping.pl b/admin/fieldmapping.pl index b7122b0..f7eca3c 100755 --- a/admin/fieldmapping.pl +++ b/admin/fieldmapping.pl @@ -46,8 +46,15 @@ my ($template, $loggedinuser, $cookie) # get framework list my $frameworks = getframeworks(); my @frameworkloop; +my $selected; +my $frameworktext; foreach my $thisframeworkcode (keys %$frameworks) { - my $selected = 1 if $thisframeworkcode eq $framework; + if ($thisframeworkcode eq $framework){ + $selected = 1; + $frameworktext = $frameworks->{$thisframeworkcode}->{'frameworktext'}; + } else { + $selected = 0; + } my %row =(value => $thisframeworkcode, selected => $selected, frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, @@ -70,6 +77,7 @@ my $fieldloop = GetFieldMapping($framework); $template->param( frameworkloop => \@frameworkloop, framework => $framework, + frameworktext => $frameworktext, fields => $fieldloop, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tmpl index 3781398..0e4e0a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/fieldmapping.tmpl @@ -25,15 +25,15 @@ $(document).ready(function() {

      Keyword to MARC Mapping

      -

      There are no mappings for this framework.

      +

      There are no mappings for the default framework.

      - + - + @@ -59,7 +59,7 @@ $(document).ready(function() { - + -- 1.5.6.5 From ian.walls at bywatersolutions.com Tue Oct 12 19:03:26 2010 From: ian.walls at bywatersolutions.com (Ian Walls) Date: Tue, 12 Oct 2010 13:03:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug5027: skip unticked checkboxes when submitting in the background. Message-ID: <1286903006-26758-1-git-send-email-ian.walls@bywatersolutions.com> From: Srdjan Jankovic Signed-off-by: Robin Sheat Signed-off-by: Ian Walls --- .../prog/en/includes/background-job.inc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc index 9d257f4..46922e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc @@ -47,7 +47,7 @@ // gather up form submission var inputs = []; $(':input', f).each(function() { - if (this.type == 'radio') { + if (this.type == 'radio' || this.type == 'checkbox') { if (this.checked) { inputs.push(this.name + '=' + escape(this.value)); } -- 1.5.6.5 From mjr at phonecoop.coop Wed Oct 13 03:18:40 2010 From: mjr at phonecoop.coop (MJ Ray) Date: Wed, 13 Oct 2010 02:18:40 +0100 Subject: [Koha-patches] Request to pull enh_bulkmarcimport Message-ID: <4cb508f0.N28gYnRkRgv/lSJh%mjr@phonecoop.coop> The following changes since commit df47a149b0a251c7705f3dfa53a1553277cc17d6: Galen Charlton (1): remove scratch files from the it-IT SQL files are available in the git repository at: git://gitorious.org/koha/mainline.git enh_bulkmarcimport MJ Ray (1): Display available error information during bulkmarcimport misc/migration_tools/bulkmarcimport.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) From f.demians at tamil.fr Wed Oct 13 21:43:55 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Wed, 13 Oct 2010 21:43:55 +0200 Subject: [Koha-patches] [PATCH] Bug 5303 Overdue notices subject is improperly encoded Message-ID: <1286999035-8771-1-git-send-email-f.demians@tamil.fr> --- C4/Letters.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 62b339a..5414adb 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -818,7 +818,7 @@ sub _send_message_by_email ($;$$$) { my %sendmail_params = ( To => $to_address, From => $message->{'from_address'} || C4::Context->preference('KohaAdminEmailAddress'), - Subject => $message->{'subject'}, + Subject => encode('utf8', $message->{'subject'}), charset => 'utf8', Message => $content, 'content-type' => $message->{'content_type'} || 'text/plain; charset="UTF-8"', -- 1.7.1 From mjr at phonecoop.coop Thu Oct 14 18:45:37 2010 From: mjr at phonecoop.coop (MJ Ray) Date: Thu, 14 Oct 2010 17:45:37 +0100 (BST) Subject: [Koha-patches] [PATCH] Add one new speech, bugfix a few other history lines Message-ID: <20101014164537.66014501CF@nail.towers.org.uk> --- docs/history.txt | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index a1179d5..185221a 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -132,7 +132,7 @@ April 12 2003 Koha 1.9.2 released April 16 2003 Paul Poulain presents on Koha at "Open Source Software in Libraries" at enssib (the French National School for librarians - www.enssib.fr) May 3 2003 Dorian Meid translate the opac into German translation, german May 9 2003 Ingrid resigns as QA manager -May 6 2003 software.coop (then TTLLP) offer Koha support +May 6 2003 software.coop (as TTLLP) publicly offer Koha support May 15 2003 Pat Eyler, Steve Tonnesen and Chris Cormack add RSS support to Koha May 21 2003 M J Ray becomes the 22nd committer to Koha May 22 2003 Paul Poulain commits new bulkmarcimport tool to Koha @@ -179,7 +179,7 @@ May 13-16 2004 Zeki Celikbas presents Koha at a linux festival in Ankara, Turke May 25 2004 doXulting becomes the 30th committer to Koha May 29 2004 Brooke adds the Newbie Guide to the wiki, newbies around the world rejoice May 31 2004 "When profit's not the only goal" http://computerworld.co.nz/news.nsf/devt/04240726AC168409CC25723600334225?Opendocument&HighLight=2,koha -June 3 2004 M J Ray (release maintainer for 2.0.x) starts expirementing with using arch for Koha version control +June 3 2004 MJ Ray (release maintainer for 2.0.x) starts experimenting with using arch for Koha version control June 4 2004 Paul commits first cut at online help June 23 2004 Ecole des Mines de Nantes funds the development of a suggestions module, to work with acquisitions June 24 2004 "And the winners are ..." http://computerworld.co.nz/news.nsf/news/6C696179245321F5CC256EBD006E50BC?Opendocument&HighLight=2,koha @@ -237,7 +237,8 @@ June 2 2005 Waylon Robertson becomes the 33rd committer to Koha June 3 2005 Gavin ?? becomes the 34th committer to Koha June 3 2005 Joshua Ferraro and Chris Cormack discuss trying out Koha for fulltext search on irc searching, fulltext June 3 2005 Friedrich zur Hellen becomes the 35th committer to Koha -June 5 2005 Joshuaexpirements with Zebra, finds very positive and encouraging results searching, fulltext +June 5 2005 Joshua experiments with Zebra, finds very positive and encouraging results searching, fulltext +June 11 2005 MJ Ray presents Koha to the British & Irish Association of Law Librarians 36th Annual Study Conference and Exhibition June 13 2005 Catalogue KOHA : mode d?emploi (in French) by the Biblioth?que de sociologie du CNRS, Paris is published on www.kohadocs.org June 13 2005 After more discussion on irc, Joshua Ferraro sets up a test site using zebra on liblime servers search, fulltext, liblime June 14 2005 Draft coding guidelines published @@ -248,7 +249,7 @@ July 4 2005 Paul Poulain proposes we rename Koha 2.4 to be 3.0 July 5 2005 Bug 1000 registered at bugs.koha.org July 6 2005 koha-zebra mailing list created July 12 2005 The first chapter of the Koha Users Guide -- "Setting Up Your Koha System" -- is now available in the "General Information" section of http://www.kohadocs.org/ -July 12 2005 M J Ray sets up Planet Koha +July 12 2005 MJ Ray sets up Planet Koha, gathering all Koha blogs on one page July 13 2005 hatem ibraheem writes to say that MSA university (Modern Sience and Arts university) http://www.msa.eun.eg/library.htm using Koha community, library, Egypt August 13 2005 "Koha Coding Standards and Guidelines for Contributors." on http://www.kohadocs.org documentation August 18 2005 An expanded version of the first chapter of the Koha Users Guide is now available at http://www.kohadocs.org/usersguide. documentation -- 1.5.3.7 From robin at catalyst.net.nz Fri Oct 15 02:53:11 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 15 Oct 2010 13:53:11 +1300 Subject: [Koha-patches] [PATCH] bug 5309: Adjust progres bar Message-ID: <1287103991-32079-1-git-send-email-robin@catalyst.net.nz> From: Srdjan Jankovic Also added some test facilities wr73785 --- .../prog/en/includes/background-job.inc | 4 +- .../intranet-tmpl/prog/en/modules/test/README | 1 + .../prog/en/modules/test/progressbar.tmpl | 43 ++++++++ test/README | 3 + test/progressbar.pl | 55 ++++++++++ test/progressbarsubmit.pl | 104 ++++++++++++++++++++ test/search.pl | 74 ++++++++++++++ 7 files changed, 282 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/test/README create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/test/progressbar.tmpl create mode 100644 test/README create mode 100755 test/progressbar.pl create mode 100755 test/progressbarsubmit.pl create mode 100755 test/search.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc index 9d257f4..ff37876 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/background-job.inc @@ -15,7 +15,7 @@ if (json.job_status == 'completed') { percentage = 100; } - var bgproperty = (parseInt(percentage)*2-300)+"px 0px"; + var bgproperty = (parseInt(percentage/2)*3-300)+"px 0px"; $("#jobprogress").css("background-position",bgproperty); $("#jobprogresspercent").text(percentage); @@ -66,7 +66,7 @@ data: inputs.join('&'), url: f.action, dataType: 'json', - type: 'post', + type: 'post', success: function(json) { jobID = json.jobID; inBackgroundJobProgressTimer = false; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/test/README b/koha-tmpl/intranet-tmpl/prog/en/modules/test/README new file mode 100644 index 0000000..20fe504 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/test/README @@ -0,0 +1 @@ +Test templates, to be used with test scripts diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/test/progressbar.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/test/progressbar.tmpl new file mode 100644 index 0000000..73f148f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/test/progressbar.tmpl @@ -0,0 +1,43 @@ + +Koha › Tools › Stage MARC Records For Import + + + + + + + +
      + +
      + + + + + + +
      +
      Job progress:
      0%
      +
      +
      + + +
      + +
      +Completed: +
      + diff --git a/test/README b/test/README new file mode 100644 index 0000000..fe2895c --- /dev/null +++ b/test/README @@ -0,0 +1,3 @@ +A collection of cgi and command line scripts that are useful for some testing, +but for one reason or another cannot be made into automated test in t. +Use with templates in koha-tmpl/intranet-tmpl/prog/en/modules/test diff --git a/test/progressbar.pl b/test/progressbar.pl new file mode 100755 index 0000000..142184b --- /dev/null +++ b/test/progressbar.pl @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +# Script for testing progressbar, part 1 - initial screem +# it is split into two scripts so we can use firebug to debug it + +# Koha library project www.koha.org + +# Licensed under the GPL + +# Copyright 2000-2002 Katipo Communications +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +#use warnings; FIXME - Bug 2505 + +# standard or CPAN modules used +use CGI; +use CGI::Cookie; + +# Koha modules used +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::BackgroundJob; + +my $input = new CGI; +my $dbh = C4::Context->dbh; +$dbh->{AutoCommit} = 0; + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "test/progressbar.tmpl", + query => $input, + type => "intranet", + debug => 1, + }); + +output_html_with_http_headers $input, $cookie, $template->output; + +exit 0; + + diff --git a/test/progressbarsubmit.pl b/test/progressbarsubmit.pl new file mode 100755 index 0000000..a0dbde1 --- /dev/null +++ b/test/progressbarsubmit.pl @@ -0,0 +1,104 @@ +#!/usr/bin/perl + +# Script for testing progressbar, part 2 - json submit handler +# and Z39.50 lookups + +# Koha library project www.koha.org + +# Licensed under the GPL + +# Copyright 2000-2002 Katipo Communications +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +#use warnings; FIXME - Bug 2505 + +# standard or CPAN modules used +use CGI; +use CGI::Cookie; + +# Koha modules used +use C4::Context; +use C4::Auth; +use C4::Output; +use C4::BackgroundJob; + +my $input = new CGI; + +my $submitted=$input->param('submitted'); +my $runinbackground = $input->param('runinbackground'); +my $jobID = $input->param('jobID'); +my $completedJobID = $input->param('completedJobID'); + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "test/progressbar.tmpl", + query => $input, + type => "intranet", + debug => 1, + }); + +my %cookies = parse CGI::Cookie($cookie); +my $sessionID = $cookies{'CGISESSID'}->value; +if ($completedJobID) { +} elsif ($submitted) { + my $job = undef; + if ($runinbackground) { + my $job_size = 100; + $job = C4::BackgroundJob->new($sessionID, undef, $ENV{'SCRIPT_NAME'}, $job_size); + $jobID = $job->id(); + + # fork off + if (my $pid = fork) { + # parent + # return job ID as JSON + + # prevent parent exiting from + # destroying the kid's database handle + # FIXME: according to DBI doc, this may not work for Oracle + + my $reply = CGI->new(""); + print $reply->header(-type => 'text/html'); + print "{ jobID: '$jobID' }"; + exit 0; + } elsif (defined $pid) { + # if we get here, we're a child that has detached + # itself from Apache + + # close STDOUT to signal to Apache that + # we're now running in the background + close STDOUT; + close STDERR; + + foreach (1..100) { + sleep 1; + $job->progress( $_ ); + } + $job->finish(); + } else { + # fork failed, so exit immediately + die "fork failed while attempting to run $ENV{'SCRIPT_NAME'} as a background job"; + } + + } +} else { + # initial form + die "We should not be here"; +} + +exit 0; + + diff --git a/test/search.pl b/test/search.pl new file mode 100755 index 0000000..4362791 --- /dev/null +++ b/test/search.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl -w + +use C4::Search; + +my @SEARCH = ( + { operators => [ + 'and', + 'and' + ], + operands => [ + 'shakespeare, "(william)"', + 'dream' + ], + indexes => [ + 'au,wrdl', + 'ti', + 'kw' + ], + limits => [ + 'yr,st-numeric=2000-' + ], + sort_by => [ + 'relevance' + ], + lang => 'en', + }, +); + + +foreach ( @SEARCH ) { + my ($expected, @mismatch); + my( $error, + $query, + $simple_query, + $query_cgi, + $query_desc, + $limit, + $limit_cgi, + $limit_desc, + $stopwords_removed, + $query_type ) + = buildQuery( $_->{operators}, $_->{operands}, $_->{indexes}, $_->{limits}, $_->{sort_by}, 0, $_->{lang} ); + + die $error if $error; + + $expected = $_->{query}; + push @mismatch, "Query: $query (not: $expected)" unless $query eq $expected; + + $expected = $_->{simple_query}; + push @mismatch, "Simple Query: $simple_query (not: $expected)" unless $simple_query eq $expected; + + $expected = $_->{query_cgi}; + push @mismatch, "Query CGI: $query_cgi (not: $expected)" unless $query_cgi eq $expected; + + $expected = $_->{query_desc}; + push @mismatch, "Query desc: $query_desc (not: $expected)" unless $query_desc eq $expected; + + $expected = $_->{limit}; + push @mismatch, "Limit: $limit (not: $expected)" unless $limit eq $expected; + + $expected = $_->{limit_cgi}; + push @mismatch, "Limit CGI: $limit_cgi (not: $expected)" unless $limit_cgi eq $expected; + + $expected = $_->{limit_desc}; + push @mismatch, "Limit desc: $limit_desc (not: $expected)" unless $limit_desc eq $expected; + + $expected = $_->{stopwords_removed}; + push @mismatch, "Stopwords removed: $stopwords_removed (not: $expected)" unless $stopwords_removed eq $expected; + + $expected = $_->{query_type}; + push @mismatch, "Query Type: $query_type (not: $expected)" unless $query_type eq $expected; + + die map "$_\n", @mismatch if @mismatch; +} -- 1.7.1 From robin at catalyst.net.nz Fri Oct 15 02:58:00 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 15 Oct 2010 13:58:00 +1300 Subject: [Koha-patches] [PATCH] bug 5308: subscriptionroutinglist more strict Message-ID: <1287104280-32299-1-git-send-email-robin@catalyst.net.nz> From: Srdjan Jankovic borrowernumber and subscriptionid NOT NULL, UNIQUE(subscriptionid, borrowernumber) --- installer/data/mysql/kohastructure.sql | 7 ++++--- installer/data/mysql/updatedatabase.pl | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e42652c..51e4c88 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1791,10 +1791,11 @@ CREATE TABLE `subscriptionhistory` ( DROP TABLE IF EXISTS `subscriptionroutinglist`; CREATE TABLE `subscriptionroutinglist` ( `routingid` int(11) NOT NULL auto_increment, - `borrowernumber` int(11) default NULL, + `borrowernumber` int(11) NOT NULL, `ranking` int(11) default NULL, - `subscriptionid` int(11) default NULL, - PRIMARY KEY (`routingid`) + `subscriptionid` int(11) NOT NULL, + PRIMARY KEY (`routingid`), + UNIQUE (`subscriptionid`, `borrowernumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2bd4e21..703a0fa 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3745,6 +3745,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } +$DBversion = "3.01.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("DELETE FROM subscriptionroutinglist WHERE borrowernumber IS NULL;"); + $dbh->do("ALTER TABLE subscriptionroutinglist MODIFY COLUMN `borrowernumber` int(11) NOT NULL;"); + $dbh->do("DELETE FROM subscriptionroutinglist WHERE subscriptionid IS NULL;"); + $dbh->do("ALTER TABLE subscriptionroutinglist MODIFY COLUMN `subscriptionid` int(11) NOT NULL;"); + $dbh->do("CREATE TEMPORARY TABLE del_subscriptionroutinglist + SELECT s1.routingid FROM subscriptionroutinglist s1 + WHERE EXISTS (SELECT * FROM subscriptionroutinglist s2 + WHERE s2.borrowernumber = s1.borrowernumber + AND s2.subscriptionid = s1.subscriptionid + AND s2.routingid < s1.routingid);"); + $dbh->do("DELETE FROM subscriptionroutinglist + WHERE routingid IN (SELECT routingid FROM del_subscriptionroutinglist);"); + $dbh->do("ALTER TABLE subscriptionroutinglist ADD UNIQUE (subscriptionid, borrowernumber);"); + print "Upgrade to $DBversion done (Make subscriptionroutinglist more strict)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 1.7.1 From gmcharlt at gmail.com Fri Oct 15 18:56:51 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 15 Oct 2010 12:56:51 -0400 Subject: [Koha-patches] [PATCH] bug 5309: Adjust progres bar In-Reply-To: <1287103991-32079-1-git-send-email-robin@catalyst.net.nz> References: <1287103991-32079-1-git-send-email-robin@catalyst.net.nz> Message-ID: Hi, On Thu, Oct 14, 2010 at 8:53 PM, Robin Sheat wrote: > +# Copyright 2000-2002 Katipo Communications Small nit to pick - could you correct the copyright notice, please? Regards, Galen -- Galen Charlton gmcharlt at gmail.com From f.demians at tamil.fr Sun Oct 17 16:18:23 2010 From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=) Date: Sun, 17 Oct 2010 16:18:23 +0200 Subject: [Koha-patches] [PATCH 2/2] Bug 4472 Fix   handling for UNIMARC intranet XSL Message-ID: <1287325103-18876-1-git-send-email-f.demians@tamil.fr> --- .../prog/en/xslt/UNIMARCslim2intranetDetail.xsl | 3 +++ .../prog/en/xslt/UNIMARCslimUtils.xsl | 5 ++++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl index b00a04e..55cd370 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2intranetDetail.xsl @@ -1,4 +1,7 @@ + +]> + + +]> + @@ -296,4 +299,4 @@ - \ No newline at end of file + -- 1.7.1 From gmcharlt at gmail.com Sun Oct 17 19:18:52 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 17 Oct 2010 13:18:52 -0400 Subject: [Koha-patches] [PATCH] bug 3164: fix OPAC holds in SingleBranchMode Message-ID: <1287335932-15578-1-git-send-email-gmcharlt@gmail.com> Account for case where no branch is explicitly supplied. Signed-off-by: Galen Charlton --- opac/opac-reserve.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index d5d39db..699179b 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -158,7 +158,8 @@ if ( $query->param('place_reserve') ) { $selectedItems = "$bib/$item/$branch/"; } - my @selectedItems = split /\//, $selectedItems; + $selectedItems =~ s!/$!!; + my @selectedItems = split /\//, $selectedItems, -1; # Make sure there is a biblionum/itemnum/branch triplet for each item. # The itemnum can be 'any', meaning next available. -- 1.7.0 From gmcharlt at gmail.com Sun Oct 17 19:45:21 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 17 Oct 2010 13:45:21 -0400 Subject: [Koha-patches] Request to pull enh_bulkmarcimport In-Reply-To: <4cb508f0.N28gYnRkRgv/lSJh%mjr@phonecoop.coop> References: <4cb508f0.N28gYnRkRgv/lSJh%mjr@phonecoop.coop> Message-ID: Hi, On Tue, Oct 12, 2010 at 9:18 PM, MJ Ray wrote: > The following changes since commit df47a149b0a251c7705f3dfa53a1553277cc17d6: > ?Galen Charlton (1): > ? ? ? ?remove scratch files from the it-IT SQL files > > are available in the git repository at: > > ?git://gitorious.org/koha/mainline.git enh_bulkmarcimport Pushed to for-3.4/enh_bulkmarcimport with my recommendation for Chris to merge. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Sun Oct 17 20:09:54 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 17 Oct 2010 14:09:54 -0400 Subject: [Koha-patches] Request to pull enh_bulkmarcimport In-Reply-To: References: <4cb508f0.N28gYnRkRgv/lSJh%mjr@phonecoop.coop> Message-ID: Hi, On Sun, Oct 17, 2010 at 1:45 PM, Galen Charlton wrote: > Pushed to for-3.4/enh_bulkmarcimport with my recommendation for Chris to merge. Correction - the branch name is new/for-3.4/enh_bulkmarcimport. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Sun Oct 17 20:13:27 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sun, 17 Oct 2010 14:13:27 -0400 Subject: [Koha-patches] new/for-3.4/spelling Message-ID: Hi, The following patches, mostly by Bernardo Gonzalez Kriegel, have been pushed to the branch new/for-3.4/spelling with my signoff and recommendation for early merge into 3.4. Bug 5130 - Misspelled words: biblographic delimeter extention Misspells: deleteing -> deleting Bug 5134 - Misspelled words: exisiting anomolies genereated Bug 5133 - Misspelled words: reservior notifiying deleete + recieving Bug 5132 - Misspelled words: Acquistion Succesfully professionnal Bug 5124 - Duplicate and Misspelled words: periodicy outputing Bug 5123 - Misspelled words: Depdending Commited flutucations Additional fix Bug 5122 - Misspelled word: transfered Bug 5122 - Misspelled word: transfered Bug 5121 - Misspelled words: stripts biographyl Begininning Bug 5119: Misspelled word correspounding Bug 5117: Misspelled word Organisztion Bug 5118: Misspelled word: Currencey Misspell: Quanity -> Quantity Regards, Galen -- Galen Charlton gmcharlt at gmail.com From mjr at phonecoop.coop Sun Oct 17 21:57:09 2010 From: mjr at phonecoop.coop (MJ Ray) Date: Sun, 17 Oct 2010 20:57:09 +0100 (BST) Subject: [Koha-patches] Request to pull enh_bulkmarcimport In-Reply-To: Message-ID: <20101017195709.CD283F7309@nail.towers.org.uk> Galen Charlton wrote: > > Pushed to for-3.4/enh_bulkmarcimport with my recommendation for Chris to merge. > > Correction - the branch name is new/for-3.4/enh_bulkmarcimport. Thanks for the feedback but that's disappointing. It only adds a print out of an error message that bulkmarcimport already gets. Arguably a bug, but no-one's reported it, so I gave it an enh branch name. Could it be considered for 3.2.1 too, please? Thanks, -- MJ Ray (slef), member of www.software.coop, a for-more-than-profit co-op. Past Koha Release Manager (2.0), LMS programmer, statistician, webmaster. In My Opinion Only: see http://mjr.towers.org.uk/email.html Available for hire for Koha work http://www.software.coop/products/koha From chrisc at catalyst.net.nz Sun Oct 17 22:08:31 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Mon, 18 Oct 2010 09:08:31 +1300 Subject: [Koha-patches] Request to pull enh_bulkmarcimport In-Reply-To: <20101017195709.CD283F7309@nail.towers.org.uk> References: <20101017195709.CD283F7309@nail.towers.org.uk> Message-ID: <20101017200831.GE20177@rorohiko> * MJ Ray (mjr at phonecoop.coop) wrote: > Galen Charlton wrote: > > > Pushed to for-3.4/enh_bulkmarcimport with my recommendation for Chris to merge. > > > > Correction - the branch name is new/for-3.4/enh_bulkmarcimport. > > Thanks for the feedback but that's disappointing. It only adds a > print out of an error message that bulkmarcimport already gets. > Arguably a bug, but no-one's reported it, so I gave it an enh branch > name. Could it be considered for 3.2.1 too, please? If I merge it early, and following Galens recommendation I probably will. Then Chris Nighswonger will have the opportunity to cherry-pick it for 3.2.1 .. I imagine he will be open to that. Chris -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From cnighswonger at foundations.edu Mon Oct 18 03:22:57 2010 From: cnighswonger at foundations.edu (Chris Nighswonger) Date: Sun, 17 Oct 2010 21:22:57 -0400 Subject: [Koha-patches] Request to pull enh_bulkmarcimport In-Reply-To: <20101017200831.GE20177@rorohiko> References: <20101017195709.CD283F7309@nail.towers.org.uk> <20101017200831.GE20177@rorohiko> Message-ID: 2010/10/17 Chris Cormack > * MJ Ray (mjr at phonecoop.coop) wrote: > > Galen Charlton wrote: > > > > Pushed to for-3.4/enh_bulkmarcimport with my recommendation for Chris > to merge. > > > > > > Correction - the branch name is new/for-3.4/enh_bulkmarcimport. > > > > Thanks for the feedback but that's disappointing. It only adds a > > print out of an error message that bulkmarcimport already gets. > > Arguably a bug, but no-one's reported it, so I gave it an enh branch > > name. Could it be considered for 3.2.1 too, please? > > If I merge it early, and following Galens recommendation I probably > will. > Then Chris Nighswonger will have the opportunity to cherry-pick it for > 3.2.1 .. I imagine he will be open to that. > Yup. I'll cherry-pick it as soon as it shows up in HEAD. Kind Regards, Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: From kmkale at anantcorp.com Mon Oct 18 16:38:03 2010 From: kmkale at anantcorp.com (Koustubha Kale) Date: Mon, 18 Oct 2010 20:08:03 +0530 Subject: [Koha-patches] [PATCH] Bug 4440: Revised combined patch to print fee receipts and invoices Message-ID: <1287412683-8980-1-git-send-email-kmkale@anantcorp.com> This patch adds a small enhancement to allow printing of Fees / Fines receipts from the Fines page. Patch adds print links to the Fines page next to Fines or Receipts transactions. Clicking on the link will pop a new window and will print that with total outstanding as on date. You can edit koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css to better control printing this type of material. 18-Oct-2010 Changed template and script names to match. Corrected invalid markup in the templates. --- .../prog/en/css/printreceiptinvoice.css | 353 ++++++++++++++++++++ .../prog/en/modules/members/boraccount.tmpl | 12 +- .../prog/en/modules/members/printfeercpt.tmpl | 59 ++++ .../prog/en/modules/members/printinvoice.tmpl | 59 ++++ members/printfeercpt.pl | 143 ++++++++ members/printinvoice.pl | 142 ++++++++ 6 files changed, 766 insertions(+), 2 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl create mode 100755 members/printfeercpt.pl create mode 100755 members/printinvoice.pl diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css new file mode 100644 index 0000000..d8a675f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/css/printreceiptinvoice.css @@ -0,0 +1,353 @@ +a:link { + color : #000066; + text-decoration: none; +} + +a:visited { + color : #000066; + text-decoration: none; +} + +a:hover { + color : #993300; + text-decoration: none; +} + +body { + background-color : #FFF; + color : #333333; + font-family : arial, geneva, sans-serif; + font-size : 14px; + margin : 0px 0px 0px 0px; +} + +caption { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +form { + margin : 0px; + padding : 0px; +} + +h1 + { + color : #000066; + font-size : 22px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h1#logo { + display: none; +} + +h2 { + color : #000066; + font-size : 20px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h3 { + color : #000066; + font-size : 18px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h4 { + color : #000066; + font-size : 16px; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +h5 { + color : #000066; + font-size : 15px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +h6 { + color : #000066; + font-size : 14px; + font-weight : bold; + margin-bottom : 1px; + margin-top : 1px; +} + +table { + background-color : #FFFFFF; + border-bottom : 1px solid #CCCCCC; + border-collapse : collapse; + border-left : 1px solid #CCCCCC; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +table.list { + background-color : #FFFFFF; + border : 0; + border-collapse : collapse; + margin : 3px 0px 5px 0px; + padding : 0px; + width : 99%; +} + +td { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +td:last-child { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 12px; + padding : 5px 5px 5px 5px; +} + +table.list th { + background-color : #FFFFFF; + border-top : 0; + border-left : 0; + text-align: left; + font-size: 12px; + font-weight: bold; + padding: 5px; + width : 25%; +} + +th { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +th:last-child { + background-color : #E9E9E9; + border-bottom : 1px solid #CCCCCC; + border-right : 0px solid #CCCCCC; + border-top : 0; + border-left : 0; + font-size : 14px; + font-weight : bold; + padding : 5px 5px 5px 5px; +} + +td.input, div.form td, div.details td { + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; + color : #000000; + line-height : 1.5em; + padding : 4px; + text-align : left; +} + +td.label, div.form th, div.details th { + background-color : #FFF; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 0px; + border-top : 0px; + color : #000088; + font-weight : bold; + line-height : 1.5em; + padding : 4px; + text-align : right; + vertical-align : top; +} + +tr.highlight { + background-color: #CCCCCC; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +.error { + font-weight: bold; +} + +.ex { + font-family : "Courier New", Courier, monospace; +} +.inline { + display : inline; +} + +tr.overdue { + font-weight : bold; +} + +tfoot { + font-weight : bold; +} + +tfoot td, tfoot td:last-child { + background-color : #EEEEEE; + border-right : 1px solid #666666; + border-bottom : 1px solid #666666; +} + +td.credit, td.debit, td.sum { + font-family : "Courier New", Courier, monospace; + text-align : right; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +td.debit { + color : #990000; + border-bottom : 1px solid #CCCCCC; + border-left : 1px solid #CCCCCC; + border-right : 1px solid #CCCCCC; + border-top : 1px solid #CCCCCC; +} + +#receipt { + background-color : #FFFFFF; + font-family : serif; + font-size : .9em; + margin : 0 0px 0px 0; + padding : 0px; + position : relative; +} + +#receipt a:link { + color : #000066; + text-decoration: none; +} + +#receipt a:visited { + color : #000066; + text-decoration: none; +} + +#receipt a:hover { + color : #993300; + text-decoration: none; +} + +#receipt caption { + color : #000000; + font-weight : bold; + margin-top : 5px; + text-align : left; +} + +#receipt div.table { + background-color : transparent; + font-weight: normal; +} + +#receipt h3, #receipt caption, #receipt h4 { + background-color : transparent; + color : #000000; + font-size : 1em; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt h2 { + background-color : transparent; + color : #000000; + font-weight : bold; + margin-bottom : 3px; + margin-top : 3px; +} + +#receipt table { + background-color : transparent; + border : 0; + border-collapse : collapse; + width : auto; +} + +#receipt td, #receipt th { + background-color : transparent; + border : 0; + font-size : 1em; + font-weight : normal; + padding : 1px; + border-bottom : 1px solid #000000; + border-left : 1px solid #000000; + border-right : 1px solid #000000; + border-top : 1px solid #000000; + } + +#receipt th { + font-weight : bold; + text-align : left; + } + +#receipt th.centerednames { + font-weight : bold; + text-align: center; + color: red; + border-top : 0px; + border-bottom : 0px; +} + +div#breadcrumbs, +div#toplevelnav, +div#login, +div#header_search, +div#toolbar, +div#changelanguage, +div#menu, +div.yui-b, +.noprint, +form#sortbyform, +#cartDetails, +fieldset.action, +.list-actions, +.print { + display: none; +} + +div#yui-main div.yui-b { + display : block; +} + +.yui-t1 #yui-main div.yui-b, +.yui-t2 #yui-main div.yui-b, +.yui-t7 #yui-main div.yui-b { + margin-left : 0; +} +fieldset { + border : 0; +} +#cataloguing_additem_itemlist { + overflow : visible !important; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl index fce5a4d..ef59ad2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tmpl @@ -35,6 +35,7 @@
      + @@ -48,18 +49,25 @@ + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl new file mode 100644 index 0000000..a53278f --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printfeercpt.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
      + +
      Mappings for this frameworkMappings for the default framework
      Field MARC Field  Print
      - &accountno=">Reverse + &accountno=">Reverse   + + &accountno=">Print + + &accountno=">Print + +
      Total dueTotal due
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +

      +
      +

      Fee Receipt

      +
      +

      +
      + Received with thanks from
      +
      DateDescription of chargesAmount
      Total outstanding dues as on date :
      +
      + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl new file mode 100644 index 0000000..3fc314e --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/printinvoice.tmpl @@ -0,0 +1,59 @@ + +Print Receipt for <!-- TMPL_VAR NAME="cardnumber" --> + +/includes/favicon.ico" type="image/x-icon" /> +/css/printreceiptinvoice.css" /> + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +

      +
      +

      INVOICE

      +
      +

      +
      + To,

      +
      DateDescription of chargesAmount
      Total outstanding dues as on date :
      +
      + diff --git a/members/printfeercpt.pl b/members/printfeercpt.pl new file mode 100755 index 0000000..59d5cb3 --- /dev/null +++ b/members/printfeercpt.pl @@ -0,0 +1,143 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printfeercpt.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + $accts->[$i]{'amount'}*=-1.00; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; diff --git a/members/printinvoice.pl b/members/printinvoice.pl new file mode 100755 index 0000000..039132f --- /dev/null +++ b/members/printinvoice.pl @@ -0,0 +1,142 @@ +#!/usr/bin/perl + + +#writen 3rd May 2010 by kmkale at anantcorp.com adapted from boraccount.pl by chris at katipo.oc.nz +#script to print fee receipts + + +# Copyright Koustubha Kale +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR +# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with Koha; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +use strict; +use warnings; + +use C4::Auth; +use C4::Output; +use C4::Dates qw/format_date/; +use CGI; +use C4::Members; +use C4::Branch; +use C4::Accounts; + +my $input=new CGI; + + +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "members/printinvoice.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {borrowers => 1, updatecharges => 1}, + debug => 1, + }); + +my $borrowernumber=$input->param('borrowernumber'); +my $action = $input->param('action') || ''; +my $accountno = $input->param('accountno'); + +#get borrower details +my $data=GetMember('borrowernumber' => $borrowernumber); + +if ( $action eq 'print' ) { +# ReversePayment( $borrowernumber, $input->param('accountno') ); +} + +if ( $data->{'category_type'} eq 'C') { + my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' ); + my $cnt = scalar(@$catcodes); + $template->param( 'CATCODE_MULTI' => 1) if $cnt > 1; + $template->param( 'catcode' => $catcodes->[0]) if $cnt == 1; +} + +#get account details +my ($total,$accts,$numaccts)=GetMemberAccountRecords($borrowernumber); +my $totalcredit; +if($total <= 0){ + $totalcredit = 1; +} +my @accountrows; # this is for the tmpl-loop + +my $toggle; +for (my $i=0;$i<$numaccts;$i++){ + next if ($accts->[$i]{'accountno'} ne $accountno); + if($i%2){ + $toggle = 0; + } else { + $toggle = 1; + } + $accts->[$i]{'toggle'} = $toggle; + $accts->[$i]{'amount'}+=0.00; + if($accts->[$i]{'amount'} <= 0){ + $accts->[$i]{'amountcredit'} = 1; + } + $accts->[$i]{'amountoutstanding'}+=0.00; + if($accts->[$i]{'amountoutstanding'} <= 0){ + $accts->[$i]{'amountoutstandingcredit'} = 1; + } + my %row = ( 'date' => format_date($accts->[$i]{'date'}), + 'amountcredit' => $accts->[$i]{'amountcredit'}, + 'amountoutstandingcredit' => $accts->[$i]{'amountoutstandingcredit'}, + 'toggle' => $accts->[$i]{'toggle'}, + 'description' => $accts->[$i]{'description'}, + 'itemnumber' => $accts->[$i]{'itemnumber'}, + 'biblionumber' => $accts->[$i]{'biblionumber'}, + 'amount' => sprintf("%.2f",$accts->[$i]{'amount'}), + 'amountoutstanding' => sprintf("%.2f",$accts->[$i]{'amountoutstanding'}), + 'accountno' => $accts->[$i]{'accountno'}, + 'payment' => ( $accts->[$i]{'accounttype'} eq 'Pay' ), + + ); + + if ($accts->[$i]{'accounttype'} ne 'F' && $accts->[$i]{'accounttype'} ne 'FU'){ + $row{'printtitle'}=1; + $row{'title'} = $accts->[$i]{'title'}; + } + + push(@accountrows, \%row); +} + +$template->param( adultborrower => 1 ) if ( $data->{'category_type'} eq 'A' ); + +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + +$template->param( + finesview => 1, + firstname => $data->{'firstname'}, + surname => $data->{'surname'}, + borrowernumber => $borrowernumber, + cardnumber => $data->{'cardnumber'}, + categorycode => $data->{'categorycode'}, + category_type => $data->{'category_type'}, + # category_description => $data->{'description'}, + categoryname => $data->{'description'}, + address => $data->{'address'}, + address2 => $data->{'address2'}, + city => $data->{'city'}, + zipcode => $data->{'zipcode'}, + country => $data->{'country'}, + phone => $data->{'phone'}, + email => $data->{'email'}, + branchcode => $data->{'branchcode'}, + branchname => GetBranchName($data->{'branchcode'}), + total => sprintf("%.2f",$total), + totalcredit => $totalcredit, + is_child => ($data->{'category_type'} eq 'C'), + accounts => \@accountrows ); + +output_html_with_http_headers $input, $cookie, $template->output; -- 1.7.0.4 From robin at catalyst.net.nz Mon Oct 18 23:28:44 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Tue, 19 Oct 2010 10:28:44 +1300 Subject: [Koha-patches] [PATCH] bug 5304: GetItemsInfo() - optimise query Message-ID: <1287437324-8730-1-git-send-email-robin@catalyst.net.nz> From: Srdjan Jankovic GetItemsInfo(): combine queries so we get as mch as possible in one go. CheckReserves() - extract MostImportantReserve((), so we don't need to execute items query if we already have details Create index (biblionumber, biblioitemnumber) on reserveconstraints. Signed-off-by: Robin Sheat --- C4/Items.pm | 210 +++++++++++++++----------------- C4/Reserves.pm | 55 ++++++--- installer/data/mysql/kohastructure.sql | 3 +- installer/data/mysql/updatedatabase.pl | 7 + 4 files changed, 145 insertions(+), 130 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 794bff7..5366222 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -2,6 +2,8 @@ package C4::Items; # Copyright 2007 LibLime, Inc. # +# Parts copyright Catalyst IT 2010 +# # This file is part of Koha. # # Koha is free software; you can redistribute it and/or modify it under the @@ -1168,130 +1170,119 @@ If this is set, it is set to C. sub GetItemsInfo { my ( $biblionumber, $type ) = @_; my $dbh = C4::Context->dbh; + + # get notforloan complete status if applicable + my $sthnflstatus = $dbh->prepare( + "SELECT authorised_value + FROM marc_subfield_structure + WHERE kohafield='items.notforloan' + " + ); + $sthnflstatus->execute; + my ($authorised_value_nfl) = $sthnflstatus->fetchrow; + + # my stack procedures + my $stackstatus = $dbh->prepare( + 'SELECT authorised_value + FROM marc_subfield_structure + WHERE kohafield="items.stack" + ' + ); + $stackstatus->execute; + my ($authorised_value_stack) = $stackstatus->fetchrow; + + my $user_branch; + if (C4::Context->preference("IndependantBranches")){ + my $userenv = C4::Context->userenv; + $user_branch = $userenv->{branch} if $userenv && ( $userenv->{flags} % 2 != 1 ); + } + # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance. - my $query = " - SELECT items.*, - biblio.*, - biblioitems.volume, - biblioitems.number, - biblioitems.itemtype, - biblioitems.isbn, - biblioitems.issn, - biblioitems.publicationyear, - biblioitems.publishercode, - biblioitems.volumedate, - biblioitems.volumedesc, - biblioitems.lccn, - biblioitems.url, - items.notforloan as itemnotforloan, - itemtypes.description, - itemtypes.notforloan as notforloan_per_itemtype, - branchurl - FROM items - LEFT JOIN branches ON items.homebranch = branches.branchcode - LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber - LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber - LEFT JOIN itemtypes ON itemtypes.itemtype = " - . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); - $query .= " WHERE items.biblionumber = ? ORDER BY branches.branchname,items.dateaccessioned desc" ; + my $fields = <preference('item-level_itypes') ? 'items.itype' + : 'biblioitems.itemtype'; + my $from = <prepare($query); $sth->execute($biblionumber); - my $i = 0; + my @results; my $serial; - - my $isth = $dbh->prepare( - "SELECT issues.*,borrowers.cardnumber,borrowers.surname,borrowers.firstname,borrowers.branchcode as bcode - FROM issues LEFT JOIN borrowers ON issues.borrowernumber=borrowers.borrowernumber - WHERE itemnumber = ?" - ); - my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=? "); while ( my $data = $sth->fetchrow_hashref ) { - my $datedue = ''; + my $datedue = $data->{'date_due'}; my $count_reserves; - $isth->execute( $data->{'itemnumber'} ); - if ( my $idata = $isth->fetchrow_hashref ) { - $data->{borrowernumber} = $idata->{borrowernumber}; - $data->{cardnumber} = $idata->{cardnumber}; - $data->{surname} = $idata->{surname}; - $data->{firstname} = $idata->{firstname}; - $datedue = $idata->{'date_due'}; - if (C4::Context->preference("IndependantBranches")){ - my $userenv = C4::Context->userenv; - if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { - $data->{'NOTSAMEBRANCH'} = 1 if ($idata->{'bcode'} ne $userenv->{branch}); - } - } - } - if ( $data->{'serial'}) { - $ssth->execute($data->{'itemnumber'}) ; - ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); - $serial = 1; - } - if ( $datedue eq '' ) { + + $data->{'NOTSAMEBRANCH'} = $data->{'borrower_branchcode'} ne $user_branch + if $data->{'borrower_branchcode'} && $user_branch; + + $serial = 1 if $data->{'serial'}; + + unless ( $datedue ) { my ( $restype, $reserves ) = - C4::Reserves::CheckReserves( $data->{'itemnumber'} ); + C4::Reserves::MostImportantReserve( $data->{'biblioitemnumber'}, $data->{'biblionumber'}, $data->{'itemnumber'} ); # Previous conditional check with if ($restype) is not needed because a true # result for one item will result in subsequent items defaulting to this true # value. $count_reserves = $restype; } - #get branch information..... - my $bsth = $dbh->prepare( - "SELECT * FROM branches WHERE branchcode = ? - " - ); - $bsth->execute( $data->{'holdingbranch'} ); - if ( my $bdata = $bsth->fetchrow_hashref ) { - $data->{'branchname'} = $bdata->{'branchname'}; - } $data->{'datedue'} = $datedue; $data->{'count_reserves'} = $count_reserves; - # get notforloan complete status if applicable - my $sthnflstatus = $dbh->prepare( - 'SELECT authorised_value - FROM marc_subfield_structure - WHERE kohafield="items.notforloan" - ' - ); - - $sthnflstatus->execute; - my ($authorised_valuecode) = $sthnflstatus->fetchrow; - if ($authorised_valuecode) { - $sthnflstatus = $dbh->prepare( - "SELECT lib FROM authorised_values - WHERE category=? - AND authorised_value=?" - ); - $sthnflstatus->execute( $authorised_valuecode, - $data->{itemnotforloan} ); - my ($lib) = $sthnflstatus->fetchrow; - $data->{notforloanvalue} = $lib; - } - - # my stack procedures - my $stackstatus = $dbh->prepare( - 'SELECT authorised_value - FROM marc_subfield_structure - WHERE kohafield="items.stack" - ' - ); - $stackstatus->execute; - - ($authorised_valuecode) = $stackstatus->fetchrow; - if ($authorised_valuecode) { - $stackstatus = $dbh->prepare( - "SELECT lib - FROM authorised_values - WHERE category=? - AND authorised_value=? - " - ); - $stackstatus->execute( $authorised_valuecode, $data->{stack} ); - my ($lib) = $stackstatus->fetchrow; - $data->{stack} = $lib; - } # Find the last 3 people who borrowed this item. my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers WHERE itemnumber = ? @@ -1307,8 +1298,7 @@ sub GetItemsInfo { $ii++; } - $results[$i] = $data; - $i++; + push @results, $data; } if($serial) { return( sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results ); diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 9b7014e..dc514e1 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -797,26 +797,10 @@ sub GetReserveStatus { ($status, $reserve) = &CheckReserves($itemnumber); ($status, $reserve) = &CheckReserves(undef, $barcode); -Find a book in the reserves. +Find the book by its itemnumber or barcode, and call C C<$itemnumber> is the book's item number. - -As I understand it, C<&CheckReserves> looks for the given item in the -reserves. If it is found, that's a match, and C<$status> is set to -C. - -Otherwise, it finds the most important item in the reserves with the -same biblio number as this book (I'm not clear on this) and returns it -with C<$status> set to C. - -C<&CheckReserves> returns a two-element list: - -C<$status> is either C, C (see above), or 0. - -C<$reserve> is the reserve item that matched. It is a -reference-to-hash whose keys are mostly the fields of the reserves -table in the Koha database. - +C<$barcode> is the book's barcode =cut sub CheckReserves { @@ -851,6 +835,39 @@ sub CheckReserves { # execpt where items.notforloan < 0 : This indicates the item is holdable. return ( 0, 0 ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; + return MostImportantReserve($bibitem, $biblio, $itemnumber); +} + +=head2 MostImportantReserve + + ($status, $reserve) = &MostImportantReserve($itemnumber); + +Find the most important reserve for a book. + +C<$bibitem> is the book's biblioitem number. +C<$biblio> is the book's biblio number. +C<$itemnumber> is the book's item number. + +As I understand it, C<&MostImportantReserve> looks for the given item in the +reserves. If it is found, that's a match, and C<$status> is set to +C. + +Otherwise, it finds the most important item in the reserves with the +same biblio number as this book (I'm not clear on this) and returns it +with C<$status> set to C. + +C<&MostImportantReserve> returns a two-element list: + +C<$status> is either C, C (see above), or 0. + +C<$reserve> is the reserve item that matched. It is a +reference-to-hash whose keys are mostly the fields of the reserves +table in the Koha database. + +=cut + +sub MostImportantReserve { + my ( $bibitem, $biblio, $itemnumber ) = @_; # Find this item in the reserves my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber ); @@ -877,7 +894,7 @@ sub CheckReserves { # If we get this far, then no exact match was found. # We return the most important (i.e. next) reservation. if ($highest) { - $highest->{'itemnumber'} = $item; + $highest->{'itemnumber'} = $itemnumber; return ( "Reserved", $highest ); } else { diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e42652c..b04a9c5 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1517,7 +1517,8 @@ CREATE TABLE `reserveconstraints` ( `reservedate` date default NULL, `biblionumber` int(11) NOT NULL default 0, `biblioitemnumber` int(11) default NULL, - `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, + KEY `biblio` (`biblionumber`, `biblioitemnumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2bd4e21..3fb576f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3744,6 +3744,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.01.00.XXX"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("CREATE INDEX `reserveconstraints_biblio_idx` ON reserveconstraints (`biblionumber`, `biblioitemnumber`) "); + print "Upgrade to $DBversion done (reserveconstraints_biblio_idx index added)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) -- 1.7.1 From chrisc at catalyst.net.nz Mon Oct 18 23:52:43 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Tue, 19 Oct 2010 10:52:43 +1300 Subject: [Koha-patches] [PATCH] bug 5304: GetItemsInfo() - optimise query In-Reply-To: <1287437324-8730-1-git-send-email-robin@catalyst.net.nz> References: <1287437324-8730-1-git-send-email-robin@catalyst.net.nz> Message-ID: <20101018215243.GO20177@rorohiko> I just spotted a glitch with this in testing. Please don't use this patch, a new one will follow Chris * Robin Sheat (robin at catalyst.net.nz) wrote: > From: Srdjan Jankovic > > GetItemsInfo(): combine queries so we get as mch as possible in one go. > CheckReserves() - extract MostImportantReserve((), so we don't need to > execute items query if we already have details > Create index (biblionumber, biblioitemnumber) on reserveconstraints. > > Signed-off-by: Robin Sheat > --- > C4/Items.pm | 210 +++++++++++++++----------------- > C4/Reserves.pm | 55 ++++++--- > installer/data/mysql/kohastructure.sql | 3 +- > installer/data/mysql/updatedatabase.pl | 7 + > 4 files changed, 145 insertions(+), 130 deletions(-) > > diff --git a/C4/Items.pm b/C4/Items.pm > index 794bff7..5366222 100644 > --- a/C4/Items.pm > +++ b/C4/Items.pm > @@ -2,6 +2,8 @@ package C4::Items; > > # Copyright 2007 LibLime, Inc. > # > +# Parts copyright Catalyst IT 2010 > +# > # This file is part of Koha. > # > # Koha is free software; you can redistribute it and/or modify it under the > @@ -1168,130 +1170,119 @@ If this is set, it is set to C. > sub GetItemsInfo { > my ( $biblionumber, $type ) = @_; > my $dbh = C4::Context->dbh; > + > + # get notforloan complete status if applicable > + my $sthnflstatus = $dbh->prepare( > + "SELECT authorised_value > + FROM marc_subfield_structure > + WHERE kohafield='items.notforloan' > + " > + ); > + $sthnflstatus->execute; > + my ($authorised_value_nfl) = $sthnflstatus->fetchrow; > + > + # my stack procedures > + my $stackstatus = $dbh->prepare( > + 'SELECT authorised_value > + FROM marc_subfield_structure > + WHERE kohafield="items.stack" > + ' > + ); > + $stackstatus->execute; > + my ($authorised_value_stack) = $stackstatus->fetchrow; > + > + my $user_branch; > + if (C4::Context->preference("IndependantBranches")){ > + my $userenv = C4::Context->userenv; > + $user_branch = $userenv->{branch} if $userenv && ( $userenv->{flags} % 2 != 1 ); > + } > + > # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance. > - my $query = " > - SELECT items.*, > - biblio.*, > - biblioitems.volume, > - biblioitems.number, > - biblioitems.itemtype, > - biblioitems.isbn, > - biblioitems.issn, > - biblioitems.publicationyear, > - biblioitems.publishercode, > - biblioitems.volumedate, > - biblioitems.volumedesc, > - biblioitems.lccn, > - biblioitems.url, > - items.notforloan as itemnotforloan, > - itemtypes.description, > - itemtypes.notforloan as notforloan_per_itemtype, > - branchurl > - FROM items > - LEFT JOIN branches ON items.homebranch = branches.branchcode > - LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber > - LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber > - LEFT JOIN itemtypes ON itemtypes.itemtype = " > - . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); > - $query .= " WHERE items.biblionumber = ? ORDER BY branches.branchname,items.dateaccessioned desc" ; > + my $fields = < + items.*, > + biblio.*, > + issues.*, > + biblioitems.volume, > + biblioitems.number, > + biblioitems.itemtype, > + biblioitems.isbn, > + biblioitems.issn, > + biblioitems.publicationyear, > + biblioitems.publishercode, > + biblioitems.volumedate, > + biblioitems.volumedesc, > + biblioitems.lccn, > + biblioitems.url, > + items.notforloan as itemnotforloan, > + itemtypes.description, > + itemtypes.notforloan as notforloan_per_itemtype, > + homebranch.branchurl, > + COALESCE(holdingbranch.branchname, homebranch.branchname) AS branchname, > + serial.serialseq, > + serial.publisheddate > +EOS > + my $itemtypes_join_field = C4::Context->preference('item-level_itypes') ? 'items.itype' > + : 'biblioitems.itemtype'; > + my $from = < +items > +LEFT JOIN biblio USING(biblionumber) > +LEFT JOIN biblioitems USING(biblioitemnumber) > +LEFT OUTER JOIN (SELECT itemnumber, serialseq, publisheddate > + FROM serialitems LEFT JOIN serial USING(serialid)) serial > + USING(itemnumber) > +LEFT OUTER JOIN (SELECT itemnumber, borrowernumber, cardnumber, surname, firstname, date_due, > + borrowers.branchcode AS borrower_branchcode > + FROM issues LEFT JOIN borrowers USING(borrowernumber)) issues > + USING(itemnumber) > +LEFT JOIN itemtypes ON itemtypes.itemtype = $itemtypes_join_field > +LEFT JOIN branches homebranch ON items.homebranch = homebranch.branchcode > +LEFT OUTER JOIN branches holdingbranch ON items.holdingbranch = holdingbranch.branchcode > +EOS > + if ($authorised_value_nfl) { > + $from .= < +LEFT OUTER JOIN authorised_values authorised_values_nfl > + ON authorised_values_nfl.category = '$authorised_value_nfl' > + AND authorised_values_nfl.authorised_value = items.notforloan > +EOS > + $fields .= ", authorised_values_nfl.lib AS notforloanvalue"; > + } > + > + if ($authorised_value_stack) { > + $from .= < +LEFT OUTER JOIN authorised_values authorised_values_stack > + ON authorised_values_nfl.category = '$authorised_value_stack' > + AND authorised_values_nfl.authorised_value = items.stack > +EOS > + $fields .= ", authorised_values_stack.lib AS stack"; > + } > + > + my $query = "SELECT $fields FROM $from WHERE items.biblionumber = ? > + ORDER BY homebranch.branchname,items.dateaccessioned desc" ; > my $sth = $dbh->prepare($query); > $sth->execute($biblionumber); > - my $i = 0; > + > my @results; > my $serial; > - > - my $isth = $dbh->prepare( > - "SELECT issues.*,borrowers.cardnumber,borrowers.surname,borrowers.firstname,borrowers.branchcode as bcode > - FROM issues LEFT JOIN borrowers ON issues.borrowernumber=borrowers.borrowernumber > - WHERE itemnumber = ?" > - ); > - my $ssth = $dbh->prepare("SELECT serialseq,publisheddate from serialitems left join serial on serialitems.serialid=serial.serialid where serialitems.itemnumber=? "); > while ( my $data = $sth->fetchrow_hashref ) { > - my $datedue = ''; > + my $datedue = $data->{'date_due'}; > my $count_reserves; > - $isth->execute( $data->{'itemnumber'} ); > - if ( my $idata = $isth->fetchrow_hashref ) { > - $data->{borrowernumber} = $idata->{borrowernumber}; > - $data->{cardnumber} = $idata->{cardnumber}; > - $data->{surname} = $idata->{surname}; > - $data->{firstname} = $idata->{firstname}; > - $datedue = $idata->{'date_due'}; > - if (C4::Context->preference("IndependantBranches")){ > - my $userenv = C4::Context->userenv; > - if ( ($userenv) && ( $userenv->{flags} % 2 != 1 ) ) { > - $data->{'NOTSAMEBRANCH'} = 1 if ($idata->{'bcode'} ne $userenv->{branch}); > - } > - } > - } > - if ( $data->{'serial'}) { > - $ssth->execute($data->{'itemnumber'}) ; > - ($data->{'serialseq'} , $data->{'publisheddate'}) = $ssth->fetchrow_array(); > - $serial = 1; > - } > - if ( $datedue eq '' ) { > + > + $data->{'NOTSAMEBRANCH'} = $data->{'borrower_branchcode'} ne $user_branch > + if $data->{'borrower_branchcode'} && $user_branch; > + > + $serial = 1 if $data->{'serial'}; > + > + unless ( $datedue ) { > my ( $restype, $reserves ) = > - C4::Reserves::CheckReserves( $data->{'itemnumber'} ); > + C4::Reserves::MostImportantReserve( $data->{'biblioitemnumber'}, $data->{'biblionumber'}, $data->{'itemnumber'} ); > # Previous conditional check with if ($restype) is not needed because a true > # result for one item will result in subsequent items defaulting to this true > # value. > $count_reserves = $restype; > } > - #get branch information..... > - my $bsth = $dbh->prepare( > - "SELECT * FROM branches WHERE branchcode = ? > - " > - ); > - $bsth->execute( $data->{'holdingbranch'} ); > - if ( my $bdata = $bsth->fetchrow_hashref ) { > - $data->{'branchname'} = $bdata->{'branchname'}; > - } > $data->{'datedue'} = $datedue; > $data->{'count_reserves'} = $count_reserves; > > - # get notforloan complete status if applicable > - my $sthnflstatus = $dbh->prepare( > - 'SELECT authorised_value > - FROM marc_subfield_structure > - WHERE kohafield="items.notforloan" > - ' > - ); > - > - $sthnflstatus->execute; > - my ($authorised_valuecode) = $sthnflstatus->fetchrow; > - if ($authorised_valuecode) { > - $sthnflstatus = $dbh->prepare( > - "SELECT lib FROM authorised_values > - WHERE category=? > - AND authorised_value=?" > - ); > - $sthnflstatus->execute( $authorised_valuecode, > - $data->{itemnotforloan} ); > - my ($lib) = $sthnflstatus->fetchrow; > - $data->{notforloanvalue} = $lib; > - } > - > - # my stack procedures > - my $stackstatus = $dbh->prepare( > - 'SELECT authorised_value > - FROM marc_subfield_structure > - WHERE kohafield="items.stack" > - ' > - ); > - $stackstatus->execute; > - > - ($authorised_valuecode) = $stackstatus->fetchrow; > - if ($authorised_valuecode) { > - $stackstatus = $dbh->prepare( > - "SELECT lib > - FROM authorised_values > - WHERE category=? > - AND authorised_value=? > - " > - ); > - $stackstatus->execute( $authorised_valuecode, $data->{stack} ); > - my ($lib) = $stackstatus->fetchrow; > - $data->{stack} = $lib; > - } > # Find the last 3 people who borrowed this item. > my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers > WHERE itemnumber = ? > @@ -1307,8 +1298,7 @@ sub GetItemsInfo { > $ii++; > } > > - $results[$i] = $data; > - $i++; > + push @results, $data; > } > if($serial) { > return( sort { ($b->{'publisheddate'} || $b->{'enumchron'}) cmp ($a->{'publisheddate'} || $a->{'enumchron'}) } @results ); > diff --git a/C4/Reserves.pm b/C4/Reserves.pm > index 9b7014e..dc514e1 100644 > --- a/C4/Reserves.pm > +++ b/C4/Reserves.pm > @@ -797,26 +797,10 @@ sub GetReserveStatus { > ($status, $reserve) = &CheckReserves($itemnumber); > ($status, $reserve) = &CheckReserves(undef, $barcode); > > -Find a book in the reserves. > +Find the book by its itemnumber or barcode, and call C > > C<$itemnumber> is the book's item number. > - > -As I understand it, C<&CheckReserves> looks for the given item in the > -reserves. If it is found, that's a match, and C<$status> is set to > -C. > - > -Otherwise, it finds the most important item in the reserves with the > -same biblio number as this book (I'm not clear on this) and returns it > -with C<$status> set to C. > - > -C<&CheckReserves> returns a two-element list: > - > -C<$status> is either C, C (see above), or 0. > - > -C<$reserve> is the reserve item that matched. It is a > -reference-to-hash whose keys are mostly the fields of the reserves > -table in the Koha database. > - > +C<$barcode> is the book's barcode > =cut > > sub CheckReserves { > @@ -851,6 +835,39 @@ sub CheckReserves { > # execpt where items.notforloan < 0 : This indicates the item is holdable. > return ( 0, 0 ) if ( $notforloan_per_item > 0 ) or $notforloan_per_itemtype; > > + return MostImportantReserve($bibitem, $biblio, $itemnumber); > +} > + > +=head2 MostImportantReserve > + > + ($status, $reserve) = &MostImportantReserve($itemnumber); > + > +Find the most important reserve for a book. > + > +C<$bibitem> is the book's biblioitem number. > +C<$biblio> is the book's biblio number. > +C<$itemnumber> is the book's item number. > + > +As I understand it, C<&MostImportantReserve> looks for the given item in the > +reserves. If it is found, that's a match, and C<$status> is set to > +C. > + > +Otherwise, it finds the most important item in the reserves with the > +same biblio number as this book (I'm not clear on this) and returns it > +with C<$status> set to C. > + > +C<&MostImportantReserve> returns a two-element list: > + > +C<$status> is either C, C (see above), or 0. > + > +C<$reserve> is the reserve item that matched. It is a > +reference-to-hash whose keys are mostly the fields of the reserves > +table in the Koha database. > + > +=cut > + > +sub MostImportantReserve { > + my ( $bibitem, $biblio, $itemnumber ) = @_; > # Find this item in the reserves > my @reserves = _Findgroupreserve( $bibitem, $biblio, $itemnumber ); > > @@ -877,7 +894,7 @@ sub CheckReserves { > # If we get this far, then no exact match was found. > # We return the most important (i.e. next) reservation. > if ($highest) { > - $highest->{'itemnumber'} = $item; > + $highest->{'itemnumber'} = $itemnumber; > return ( "Reserved", $highest ); > } > else { > diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql > index e42652c..b04a9c5 100644 > --- a/installer/data/mysql/kohastructure.sql > +++ b/installer/data/mysql/kohastructure.sql > @@ -1517,7 +1517,8 @@ CREATE TABLE `reserveconstraints` ( > `reservedate` date default NULL, > `biblionumber` int(11) NOT NULL default 0, > `biblioitemnumber` int(11) default NULL, > - `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP > + `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, > + KEY `biblio` (`biblionumber`, `biblioitemnumber`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > > -- > diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl > index 2bd4e21..3fb576f 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -3744,6 +3744,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > > +$DBversion = "3.01.00.XXX"; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + $dbh->do("CREATE INDEX `reserveconstraints_biblio_idx` ON reserveconstraints (`biblionumber`, `biblioitemnumber`) "); > + print "Upgrade to $DBversion done (reserveconstraints_biblio_idx index added)\n"; > + SetVersion ($DBversion); > +} > + > > =item DropAllForeignKeys($table) > > -- > 1.7.1 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From chrisc at catalyst.net.nz Wed Oct 20 09:13:15 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Wed, 20 Oct 2010 20:13:15 +1300 Subject: [Koha-patches] [PATCH] Bug 4305 - prevent errors when handling invalid ISBN13 values Message-ID: <1287558795-1299-1-git-send-email-chrisc@catalyst.net.nz> From: Robin Sheat Signed-off-by: Chris Cormack --- C4/Koha.pm | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index ab9131a..dc2bcfa 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1330,6 +1330,7 @@ sub _isbn_cleanup ($) { my $isbn = Business::ISBN->new( shift ); return undef unless $isbn; $isbn = $isbn->as_isbn10 if $isbn->type eq 'ISBN13'; + return undef unless $isbn; $isbn = $isbn->as_string; $isbn =~ s/-//g; return $isbn; -- 1.7.0.4 From chrisc at catalyst.net.nz Thu Oct 21 04:30:17 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 21 Oct 2010 15:30:17 +1300 Subject: [Koha-patches] [PATCH] Fixing a double count of a developer and adding a new one to the history Message-ID: <1287628217-24095-1-git-send-email-chrisc@catalyst.net.nz> --- docs/history.txt | 161 +++++++++++++++++++++++++++--------------------------- 1 files changed, 80 insertions(+), 81 deletions(-) diff --git a/docs/history.txt b/docs/history.txt index 185221a..7750fe6 100644 --- a/docs/history.txt +++ b/docs/history.txt @@ -269,8 +269,7 @@ November 6 2005 The French-language Koha users guide, "Manuel d???utilisation d November 8 2005 Koha cvs moved to savannah from sourceforge, mailing lists follow November 14 2005 Anthony Youngman suggests using git November 27 2005 A new version of the Koha 2.2 Users Guide is now available on www.kohadocs.org (in the General Information section) -December 11 2005 Joshua Ferraro becomes the 37th committer to Koha -December 13 2005 Thomas Dukleth becomes the 38th committer to Koha +December 13 2005 Thomas Dukleth becomes the 37th committer to Koha January 10 2006 Koha version 2.2.5 is released January 13 2006 Henri Damien Laurent announces new French Koha website January 17 2006 New material has been added to the Koha Users Guide to bring it up to date with version 2.2.5. There is also new material on acquiring MARC records (Z39.50 and file imports) and templating. View the Users Guide at http://www.kohadocs.org/usersguide/ @@ -283,27 +282,27 @@ January 27 2006 the first Chinese (Traditional) document on http://www.kohadoc February 4 2006 Joshua Ferraro commits first cut of Amazon content integration with Koha February 6 2006 IRC meeting February 11 2006 Article in computerworld about Koha http://computerworld.co.nz/news.nsf/news/3F65C01EAB666AC6CC25710F00805997?Opendocument&HighLight=2,koha -February 23 2006 Robert Lyon (working at Katipo) becomes the 39th committer to Koha +February 23 2006 Robert Lyon (working at Katipo) becomes the 38th committer to Koha February 24 2006 T??mer Garip writes inventory management tool February 27 2006 "Fear and loathing: is open source a developer's dream or business nightmare?" http://computerworld.co.nz/news.nsf/spec/68C09CE2C8B8A483CC25711F001161D9?Opendocument&HighLight=2,koha March 3 2006 Paul Poulain commits the holiday management code written by T??mer Garip March 6 2006 First email to the devel list from Pierrick Le Gall from INEO March 6 2006 IRC meeting -March 7 2006 Pierrick Le Gall becomes the 40th committer to Koha +March 7 2006 Pierrick Le Gall becomes the 39th committer to Koha March 13 2006 IRC meeting March 17 2006 First email from Kyle Hall at ccfls to the Mailing list March 24 2006 Joshua Ferraro has revised his document about installing Koha on Debian to accommodate Koha version 2.2.6 and Debian sarge (3.1). Find it on www.kohadocs.org under "System Administration." documentation April 3 2006 Developer meeting on IRC -April 11 2006 T??mer Garip becomes the 41st committer to Koha (major influence in the addition of zebra to Koha and other) +April 11 2006 T??mer Garip becomes the 40th committer to Koha (major influence in the addition of zebra to Koha and other) April 14 2006 Pierrick Le Gall begins as translation manager May 2,3 2006 Kohacon in Paris http://www.koha.org/community/conferences/ -May 12 2006 Bruno Tuomi (from San Ouest Provence) becomes the 42nd committer to Koha +May 12 2006 Bruno Tuomi (from San Ouest Provence) becomes the 41st committer to Koha May 12-18 2006 Developers week at Bibliotheque du Centre de Mathematiques et Informatique (CMI) at the Universite de Provence, in Marseille -May 19 2006 Arnaud Laurin (also from SAN-OP) becomes the 43rd committer to Koha +May 19 2006 Arnaud Laurin (also from SAN-OP) becomes the 42nd committer to Koha May 31 2006 First email from Mike Hafen to the devel list June 1 2006 Antoine Farnault hired by Paul Poulain and Henri Damien Laurent to work on Koha June 5 2006 IRC meeting -July 5 2006 Antoine Farnault becomes the 44th committer to Koha +July 5 2006 Antoine Farnault becomes the 43rd committer to Koha July 12 2006 Koha 2.3.0 released release July 18 2006 Katipo starts a dedicated Koha team. July 18 2006 Paolo Pozzan starts translating koha to Italian translation, italian @@ -323,10 +322,10 @@ January 11 2007 Tag cloud and new browsing feature added to Koha January 17 2007 contribs.koha.org goes live, Thanks to Pierrick Le Gall for the extensions manager. February 15 2007 Fr??d??ric Demians from Tamil announces plan to offer support services around Koha March 8 2007 Koha 2.2.8 released -March 10 2007 Ryan Higgins (of Liblime) becomes the 45th committer to Koha +March 10 2007 Ryan Higgins (of Liblime) becomes the 44th committer to Koha March 12 2007 "Software development benefits from open source" http://computerworld.co.nz/news.nsf/devt/2B9B1FE8678CC680CC257299000A233F?Opendocument&HighLight=2,koha March 17 2007 Liblime accepted to google summer of code, call out to the mailing list for project ideas -March 28 2007 Passini becomes the 46th committer to Koha +March 28 2007 Passini becomes the 45th committer to Koha March 31 2007 Katipo sells Koha division to Liblime http://katipo.co.nz/about-us/news/nr1175402768.shtml April 1 2007 Russel Garlick, Chris Cormack and Mason James start at Liblime April 10 2007 Agnes Imecs begins work on a Hungarian translation of Koha translation, hungarian @@ -340,100 +339,100 @@ June 25 2007 Second Koha day http://blog.bigballofwax.co.nz/2007/06/25/koha-pro June 25 2007 Beda Szukics announces updates to the german translations translation, german July 3 2007 Koha day http://lists.katipo.co.nz/public/koha/2007-July/012026.html July 28 2007 Koha day http://blog.bigballofwax.co.nz/2007/07/28/koha-project-day-3/ -September 14 2007 Russel Garlick becomes the 47th committer to Koha +September 14 2007 Russel Garlick becomes the 46th committer to Koha September 24 2007 Chris Hammond-Trashor emails to tell the community that Koha has gone live in Samoa. http://www.nelsonlibrary.ws/ October 2 2007 "Pharmac publishes directly with open source" http://computerworld.co.nz/news.nsf/news/25F72F231ABF8F5ACC2573630083A579?Opendocument&HighLight=2,koha -October 3 2007 Joe Atzberger becomes the 48th committer to Koha -October 3 2007 Chris Catalfo becomes the 49th committer to Koha +October 3 2007 Joe Atzberger becomes the 47th committer to Koha +October 3 2007 Chris Catalfo becomes the 48th committer to Koha October 4 2007 Biblibre formed -October 10 2007 Frederic Demians becomes the 50th committer to Koha +October 10 2007 Frederic Demians becomes the 49th committer to Koha October 12 2007 Axel Bojer working on Norwegian translation translation, norwegian -October 17 2007 Galen Charlton becomes the 51st committer to Koha +October 17 2007 Galen Charlton becomes the 50th committer to Koha October 18 2007 Chris Cormack wins Open Source contributor of the year at the NZ Open Source awards. Koha was a finalist for project of the year http://lists.katipo.co.nz/public/koha/2007-October/012579.html October 30 2007 "Open source is a viable option, says the SSC" http://computerworld.co.nz/news.nsf/news/30E7D1CD947D73ABCC25737F00834E88?Opendocument&HighLight=2,koha -November 6 2007 Chris Nighswonger becomes the 52nd committer to Koha developer -December 21 2007 Daniel Banzli becomes the 53rd committer to Koha developer +November 6 2007 Chris Nighswonger becomes the 51st committer to Koha developer +December 21 2007 Daniel Banzli becomes the 52nd committer to Koha developer January 5 2008 Koha 3.0.0 Alpha is released release January 28 2008 Anousak Souphavanh working on a Lao translation of Koha translation, lao -February 23 2008 Jesse Weaver becomes the 54th committer to Koha developer +February 23 2008 Jesse Weaver becomes the 53rd committer to Koha developer March 3 2008 Russel Garlick, Chris Cormack and Mason James leave Liblime Liblime NZ closed March 11 2008 Kurt Debrouwer working on a Dutch translation translation, dutch March 12 2009 Vladimir Mircevski working on a Serbian translation translation, serbian -March 19 2008 Andrew Moore becomes the 55th committer to Koha developer +March 19 2008 Andrew Moore becomes the 54th committer to Koha developer March 23 2008 Koha 3.0.0 Beta is released -April 2 2008 Darrell Ulm becomes the 56th committer to Koha developer +April 2 2008 Darrell Ulm becomes the 55th committer to Koha developer April 5 2008 Koha 3.0.0 Beta 2 is released April 7 2008 Bug 2000 registered at bugs.koha.org April 13 2008 Voting opens for new Koha website theme -April 24 2008 Marc Chantreux becomes the 57th committer to Koha developer +April 24 2008 Marc Chantreux becomes the 56th committer to Koha developer April 24 2008 Marijana Glavica working on a Croatian translation translation, croatian -April 25 2008 Fr??re S??bastien Marie becomes the 58th committer to Koha developer -April 26 2008 Polytechnic University Koha Installation becomes the 59th committer to Koha developer -May 6 2008 NCE becomes the 60th committer to Koha developer -May 18 2008 Koha production??? becomes the 61st committer to Koha developer -May 28 2008 Michael Hafen becomes the 62nd committer to Koha developer -June 17 2008 Daniel Kahn Gillmor becomes the 63rd committer to Koha developer -June 21 2008 Ricardo Dias Marques becomes the 64th committer to Koha developer +April 25 2008 Fr??re S??bastien Marie becomes the 57th committer to Koha developer +April 26 2008 Polytechnic University Koha Installation becomes the 58th committer to Koha developer +May 6 2008 NCE becomes the 59th committer to Koha developer +May 18 2008 Koha production??? becomes the 60th committer to Koha developer +May 28 2008 Michael Hafen becomes the 61st committer to Koha developer +June 17 2008 Daniel Kahn Gillmor becomes the 62nd committer to Koha developer +June 21 2008 Ricardo Dias Marques becomes the 63rd committer to Koha developer June 24 2008 String freeze for Koha 3.0.0 announced June 24 2008 Koha 3.0.0 rc1 released July 2008 Nicole Engard releases the Koha 3.0.0 manual on Google Sites -July 1 2008 Philippe Jaillon becomes the 65th committer to Koha developer -July 4 2008 DeAndre Carroll becomes the 66th committer to Koha developer +July 1 2008 Philippe Jaillon becomes the 64th committer to Koha developer +July 4 2008 DeAndre Carroll becomes the 65th committer to Koha developer July 8 2008 Draft manual for koha 3.0.0 made available -July 11 2008 Nicole Engard becomes the 67th committer to Koha developer +July 11 2008 Nicole Engard becomes the 66th committer to Koha developer July 28 2008 "Enterprise doors open for open source" http://computerworld.co.nz/news.nsf/spec/446B512F34E476C0CC25749000796965?Opendocument&HighLight=2,koha -August 2 2008 Danny Bouman becomes the 68th committer to Koha developer -August 8 2008 Southeastern University becomes the 69th committer to Koha developer +August 2 2008 Danny Bouman becomes the 67th committer to Koha developer +August 8 2008 Southeastern University becomes the 68th committer to Koha developer August 11 2008 Koha 3.0.0 released August 11 2008 Delhi public library announce they are going live with Koha 3.0.0 -August 16 2008 Vincent Danjean becomes the 70th committer to Koha developer +August 16 2008 Vincent Danjean becomes the 69th committer to Koha developer August 31 2008 Kyle hall makes a VMWare image of Koha 3.0.0 available September 13 2008, Community Meeting, new positions elected 3.2 Release Manager - Galen Charlton, LibLime Translation Manager - Chris Cormack, Catalyst Documentation Manager - Nicole Engard, LibLime 3.0 Release Maintainer - Henri-Damien Laurent, BibLibre http://koha.org/cgi-bin/logs.pl?look=plain&startdate=2008091212:00:37&enddate=2008091213:30:01&search=Search -September 19 2008 Clay Fouts becomes the 71st committer to Koha developer +September 19 2008 Clay Fouts becomes the 70th committer to Koha developer October 2 2008 Delhi Public Library goes live with koha 3.0.0 -October 15 2008 Nahuel Angelinetti becomes the 72nd committer to Koha developer -October 23 2008 Allen Reinmeyer becomes the 73rd committer to Koha developer -October 23 2008 John Beppu becomes the 74th committer to Koha developer +October 15 2008 Nahuel Angelinetti becomes the 71st committer to Koha developer +October 23 2008 Allen Reinmeyer becomes the 72nd committer to Koha developer +October 23 2008 John Beppu becomes the 73rd committer to Koha developer November 3 2008 Rosalie Blake named a LIANZA Fellow http://www.lianza.org.nz/development/awards/professional/2008-recipients.html November 18 2008 David Schuster moots the idea of a Koha conference in April 2009 December 19 2008 Andy Giesler writes a great guide to installing Koha on Ubuntu http://www.blazingmoon.org/guides/k3-on-u810-1.html -December 24 2008 Stan Brinkerhoff becomes the 75th committer to Koha developer -January 16 2009 Daniel Sweeney becomes the 76th committer to Koha developer +December 24 2008 Stan Brinkerhoff becomes the 74th committer to Koha developer +January 16 2009 Daniel Sweeney becomes the 75th committer to Koha developer January 24 2009 KUDOS (Koha Users and Developers of Open Source) for those using the software, Meeting at ALA January 24 2009 KOHA Interest Group Meeting at ALA February 5 2009 Koha 3.0.1 beta released -February 6 2009 J. David Bavousett becomes the 77th committer to Koha developer -February 10 2009 Andrew Elwell becomes the 78th committer to Koha developer +February 6 2009 J. David Bavousett becomes the 76th committer to Koha developer +February 10 2009 Andrew Elwell becomes the 77th committer to Koha developer February 13 2009 K's Helping Hand launched http://krishnanm.com/khh February 13-14 2009 Prashant Kulkarni and Krishnan Mani present Koha at Gnunify 09 February 19 2009 Koha 3.0.1 released -March 3 2009 Brian Harrington becomes the 79th committer to Koha developer +March 3 2009 Brian Harrington becomes the 78th committer to Koha developer March 3 2009 Bug 3000 registered at bugs.koha.org -March 5 2009 James Winter becomes the 80th committer to Koha developer -March 5 2009 Stephen Edwards becomes the 81st committer to Koha developer +March 5 2009 James Winter becomes the 79th committer to Koha developer +March 5 2009 Stephen Edwards becomes the 80th committer to Koha developer March 12 2009 Biblibre start work on a connector for SOPAC (the social opac) and Koha April 9 2009 Delhi public Library opens its first computerised sub branch at Vinobha Puri http://www.newdelhinews.net/story/487886 India April 16-17 2009 Kohacon 2009 in Plano, Texas, USA April 18-20 2009 Developer conference/hackfest Plano, Texas, USA -April 18 2009 Brendan A. Gallagher narrowly beats Jane to become the 82nd committer developer -April 18 2009 Jane Wagner becomes the 83rd committer developer -April 19 2009 Cory Jaeger becomes the 84th committer developer -April 23 2009 Christopher Hyde becomes the 85th committer to have a patch pushed into the main repository developer -April 24 2009 David Goldfein becomes the 86th committer to have a patch pushed into the main repository developer -April 29 2009 Garry Collum becomes the 87th committer to have a patch pushed into the main repository developer -April 29 2009 Liz Rea becomes the 88th committer to have a patch pushed into the main repository developer +April 18 2009 Brendan A. Gallagher narrowly beats Jane to become the 81st committer developer +April 18 2009 Jane Wagner becomes the 82nd committer developer +April 19 2009 Cory Jaeger becomes the 83rd committer developer +April 23 2009 Christopher Hyde becomes the 84th committer to have a patch pushed into the main repository developer +April 24 2009 David Goldfein becomes the 85th committer to have a patch pushed into the main repository developer +April 29 2009 Garry Collum becomes the 86th committer to have a patch pushed into the main repository developer +April 29 2009 Liz Rea becomes the 87th committer to have a patch pushed into the main repository developer April 29 2009 Lenora Oftedahl sets up an SQL library on the koha wiki, users rejoice, and lo a multitude of reports are added -May 1 2009 Colin Campbell becomes the 89th committer to have a patch pushed into the main repository developer -May 1 2009 David Birmingham becomes the 90th committer to have a patch pushed into the main repository developer +May 1 2009 Colin Campbell becomes the 88th committer to have a patch pushed into the main repository developer +May 1 2009 David Birmingham becomes the 89th committer to have a patch pushed into the main repository developer May 6 2009 IRC meeting http://wiki.koha.org/doku.php?id=meetingnotes09apr07 May 7 2009 Maintenance tree created on git.koha.org for testing for 3.0.2 -May 21 2009 Andrei V. Toutoukine becomes the 91st committer to have a patch accepted in Koha developer +May 21 2009 Andrei V. Toutoukine becomes the 90th committer to have a patch accepted in Koha developer May 22 2009 First feature sponsored by Northeast Kansas Library System (NEKLS) accepted sponsor -May 28 2009 Rick Welykochy becomes the 92nd committer to have a patch accepted developer +May 28 2009 Rick Welykochy becomes the 91st committer to have a patch accepted developer May 28 2009 First feature sponsored by Masscat accepted sponsor -May 28 2009 Zeno Tajoli becomes the 93rd committer to have a patch accepted developer -May 29 2009 Matthias Meusburger becomes the 94th committer to have patch accepted developer +May 28 2009 Zeno Tajoli becomes the 92nd committer to have a patch accepted developer +May 29 2009 Matthias Meusburger becomes the 93rd committer to have patch accepted developer May 29 2009 First feature sponsored by Plano Independent School District committed sponsor -June 3 2009 Savitra Sirohi becomes the 95th committer to have a patch accepted developer,India +June 3 2009 Savitra Sirohi becomes the 94th committer to have a patch accepted developer,India June 3 2009 IRC general Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09jun3 June 4 2009 Koha 3.0.2 released releases June 8 2009 Koha passed 10,000 commits in the master branch (since December 2000) statistics @@ -441,14 +440,14 @@ June 26 2009 Koha 3.0.3 released releases July 1 2009 IRC general Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09jul01 July 27 2009 Feature sponsored by East Brunswick Public Library, East Brunswick, NJ USA and Middletown Township Public Library, Middletown, NJ USA committed sponsor July 30 2009 First message to koha-commits mailing list -August 1 2009 S??bastien Hinderer becomes the 96th committer to have a patched accepted developer,france +August 1 2009 S??bastien Hinderer becomes the 95th committer to have a patched accepted developer,france August 5 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09aug05 August 30 2009 John A. Graziano Memorial Library contributes a icon for Bridge Icon set September 2 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09sep02 September 5 2009 UNIMARC XSLT cleanup and new features Sponsored by BULAC, www.bulac.fr September 5 2009 Labels rewrite committed, sponsored by Foundations Bible College & Seminary, Dunn, NC USA -September 6 2009 Katrin Fischer becomes the 97th committer to have a patch accepted developer -September 6 2009 Wolfgang Heymans becomes the 98th committer to have a patch accepted developer +September 6 2009 Katrin Fischer becomes the 96th committer to have a patch accepted developer +September 6 2009 Wolfgang Heymans becomes the 97th committer to have a patch accepted developer September 15 2009 Foundation forming meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09sep15 October 7 2009 IRC general meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09oct07 October 22 2009 Koha 3.0.4 released releases @@ -457,11 +456,11 @@ November 4 2009 General meeting http://wiki.koha.org/doku.php?id=en:events:meeti December 2 2009 KUDOS meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:kudosmeetingnotes09dec02 December 2 2009 General meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09dec02 December 3 2009 Foundation meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes09dec03 -December 9 2009 Piotr Wejman becomes the 99th committer to have a patch accepted developer +December 9 2009 Piotr Wejman becomes the 98th committer to have a patch accepted developer December 19 2009 Koha 3.0.5 released releases -December 20 2009 NYUHSL becomes the 100th committer to have a patch accepted developer -December 23 2009 Sharon Moreland becomes the 101st committer to have a patch accepted (sent via Liz Rea) developer -December 23 2009 Nicolas Morin becomes the 102 committed to have a patch accepted developer +December 20 2009 NYUHSL becomes the 99th committer to have a patch accepted developer +December 23 2009 Sharon Moreland becomes the 100th committer to have a patch accepted (sent via Liz Rea) developer +December 23 2009 Nicolas Morin becomes the 101st committed to have a patch accepted developer January 13 2010 IRC General Meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10jan13 January 14 2010 Bywater Solutions and Biblibre partner to offer support in the US January 14 2010 Chris Cormack elected Release Manager for 3.4.0 @@ -471,34 +470,34 @@ February 2 2010 Community Handover meeting http://wiki.koha.org/doku.php?id=en:e February 2 2010 koha-community.org website started February 3 2010 Koha 3.2.0 Alpha released February 9 2010 General IRC meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10feb09 -February 10 2010 Magnus Enger becomes the 103rd committer to have a patch accepted +February 10 2010 Magnus Enger becomes the 102nd committer to have a patch accepted February 11 2010 Acquisition of Liblime by PTFS called off February 11 2010 Equinox begin to offer Koha support -February 15 2010 Will Stokes becomes the 104th committer to have a patch accepted +February 15 2010 Will Stokes becomes the 103rd committer to have a patch accepted February 16 2010 Kohacon10 IRC meeting http://wiki.koha.org/doku.php?id=en:kohacon2010:meetingminutes16feb March 2 2010 Community Handover meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10mar02 March 3 2010 General IRC meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10mar03 March 15 2010 PTFS acquires LibLime after all -March 16 2010 Lars Wirzenius becomes the 105th committer to have a patch accepted +March 16 2010 Lars Wirzenius becomes the 104th committer to have a patch accepted April 6 2010 Community handover meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10apr06 April 7 2010 General meeting http://wiki.koha.org/doku.php?id=en:events:meetings:irc_meetings:meetingnotes10apr07 -April 7 2010 Donovan Jones becomes the 106th committer to have a patch accepted -April 7 2010 Srdjan Jankovic becomes the 107th committer to have a patch accepted -April 7 2010 Cindy Murdock Ames becomes the 108th committer to have a patch accepted -April 7 2010 Alex Arnaud becomes the 109th committer to have a patch accepted -April 16 2010 Amit Gupta becomes the 110th committer to have a patch accepted -April 19 2010 Robin Sheat becomes the 111th committer to have a patch accepted -April 30 2010 Jared CAMINS-ESAKOV becomes the 112th committer to have a patch accepted -May 4 2010 Koustubha Kale becomes the 113th committer to have a patch accepted +April 7 2010 Donovan Jones becomes the 105th committer to have a patch accepted +April 7 2010 Srdjan Jankovic becomes the 106th committer to have a patch accepted +April 7 2010 Cindy Murdock Ames becomes the 107th committer to have a patch accepted +April 7 2010 Alex Arnaud becomes the 108th committer to have a patch accepted +April 16 2010 Amit Gupta becomes the 109th committer to have a patch accepted +April 19 2010 Robin Sheat becomes the 110th committer to have a patch accepted +April 30 2010 Jared CAMINS-ESAKOV becomes the 111th committer to have a patch accepted +May 4 2010 Koustubha Kale becomes the 112th committer to have a patch accepted May 4 2010 Community Handover meeting http://wiki.koha-community.org/wiki/Community_Handover_IRC_Meeting,_4_May_2010 May 5 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_Meeting,_May_5_2010 -May 5 2010 Matthew Hunt becomes the 114th committer to have a patch accepted -May 19 2010 Marcel de Rooy becomes the 115th committer to have a patch accepted -July 19 2010 Andrew Chilton becomes the 116th committer to have a patch accepted +May 5 2010 Matthew Hunt becomes the 113th committer to have a patch accepted +May 19 2010 Marcel de Rooy becomes the 114th committer to have a patch accepted +July 19 2010 Andrew Chilton becomes the 115th committer to have a patch accepted June 2 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_2_June_2010 July 7 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_7_July_2010 June 25 2010 Koha 3.2 Beta released http://koha-community.org/koha-3-2-beta-released/ July 13 2010 License meeting http://wiki.koha-community.org/wiki/License_Upgrade_Vote_IRC_Meeting,_13_July_2010 August 11 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_11_August_2010 September 1 2010 General IRC meeting http://wiki.koha-community.org/wiki/General_IRC_Meeting,_1_September_2010 - +September 29 2010 Eric Olsen becomes the 116th committer to have a patch accepted -- 1.7.0.4 From M.de.Rooy at rijksmuseum.nl Thu Oct 21 09:23:28 2010 From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy) Date: Thu, 21 Oct 2010 07:23:28 +0000 Subject: [Koha-patches] [PATCH] Bug 5248 (Some descriptions missing in the opac) [3.0.X only] Message-ID: <809BE39CD64BFD4EB9036172EBCCFA31195F3A@S-MAIL-1B.rijksmuseum.intra> If a function returns nothing and is called in list context, Perl discards the value resulting in a mixup of the arguments for the param function here. This problem in opac-detail.pl is already solved in 3.2. --- opac/opac-detail.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index 5940fb0..b35f9c0 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -186,8 +186,8 @@ my $marcurlsarray = GetMarcUrls ($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, GetFrameworkCode($biblionumber)); $template->param( - normalized_oclc => GetNormalizedOCLCNumber($record,$marcflavour), - normalized_upc => GetNormalizedUPC ($record,$marcflavour), + normalized_oclc => scalar GetNormalizedOCLCNumber($record,$marcflavour), + normalized_upc => scalar GetNormalizedUPC ($record,$marcflavour), normalized_isbn => $normalized_isbn, MARCNOTES => $marcnotesarray, MARCSUBJCTS => $marcsubjctsarray, -- 1.6.0.6 From amit.gupta at osslabs.biz Thu Oct 21 13:43:53 2010 From: amit.gupta at osslabs.biz (amit) Date: Thu, 21 Oct 2010 17:13:53 +0530 Subject: [Koha-patches] [PATCH] Early patch for analytical records feature. Users can create an analytical record by choosing an item record belonging to the parent bib, the analytical record is then linked to both the item and the parent bib in a new table. Message-ID: <1287661433-11877-1-git-send-email-amit.gupta@osslabs.biz> From: Amit Gupta In the records detail page in the staff interface, we display both items belonging exclusively to the analytical record and those that it links to via the parent bib. To dos - automatically populate 773 and 774, also a way to import analytical records including relationships to items and parent bibs. --- C4/Biblio.pm | 38 +++++++++++++++++++ C4/Items.pm | 40 ++++++++++++++++++-- catalogue/detail.pl | 6 +++ cataloguing/addbiblio.pl | 35 ++++++++++++++++- installer/data/mysql/kohastructure.sql | 16 ++++++++ installer/data/mysql/updatedatabase.pl | 23 ++++++++++- .../prog/en/modules/catalogue/detail.tmpl | 10 +++++ .../prog/en/modules/catalogue/moredetail.tmpl | 2 +- .../prog/en/modules/cataloguing/addbiblio.tmpl | 6 +++ kohaversion.pl | 2 +- 10 files changed, 167 insertions(+), 11 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 81ccfbb..4422fe9 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -72,6 +72,7 @@ BEGIN { &GetMarcBiblio &GetMarcAuthors &GetMarcSeries + &GetMarcAnalytical GetMarcUrls &GetUsedMarcStructure &GetXmlBiblio @@ -1553,6 +1554,43 @@ sub GetMarcSeries { return $marcseriessarray; } #end getMARCseriess +=head2 GetMarcAnalytical +=cut + +sub GetMarcAnalytical { + my ( $record, $marcflavour ) = @_; + my ( $tag); + if ( $marcflavour eq "MARC21" ) { + $tag = "773"; + } else { # assume unimarc if not marc21 + $tag="773"; + } + + my $hostbibnumber; + my $hosttitle; + + foreach my $field ( $record->field('773')) { + my @subfields_loop; + + my @subfields = $field->subfields(); + + for my $host_subfield (@subfields) { + + + if ( $host_subfield->[0] eq 'w' ) { #Record control number + $hostbibnumber=$host_subfield->[1]; + } + + if ( $host_subfield->[0] eq 'a' ) { #Main entry heading + $hosttitle=$host_subfield->[1]; + } + + } + + } + return ($hostbibnumber, $hosttitle); +} + =head2 GetFrameworkCode $frameworkcode = GetFrameworkCode( $biblionumber ) diff --git a/C4/Items.pm b/C4/Items.pm index 794bff7..79d73f5 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1169,6 +1169,7 @@ sub GetItemsInfo { my ( $biblionumber, $type ) = @_; my $dbh = C4::Context->dbh; # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance. + # Introducing union all, this is for analytical records - to fetch regular items and items linked to parent bibs my $query = " SELECT items.*, biblio.*, @@ -1186,16 +1187,47 @@ sub GetItemsInfo { items.notforloan as itemnotforloan, itemtypes.description, itemtypes.notforloan as notforloan_per_itemtype, - branchurl + branchurl, + branches.branchname, + items.dateaccessioned + FROM analytical_records + LEFT JOIN items ON analytical_records.itemnumber = items.itemnumber + LEFT JOIN branches ON items.homebranch = branches.branchcode + LEFT JOIN biblio ON analytical_records.biblionumber = biblio.biblionumber + LEFT JOIN biblioitems ON analytical_records.biblioitemnumber =biblioitems.biblioitemnumber + LEFT JOIN itemtypes ON itemtypes.itemtype = " +. (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); +$query .=" WHERE analytical_records.biblionumber =".$biblionumber; +$query .=" UNION +SELECT items.*, + biblio.*, + biblioitems.volume, + biblioitems.number, + biblioitems.itemtype, + biblioitems.isbn, + biblioitems.issn, + biblioitems.publicationyear, + biblioitems.publishercode, + biblioitems.volumedate, + biblioitems.volumedesc, + biblioitems.lccn, + biblioitems.url, + items.notforloan as itemnotforloan, + itemtypes.description, + itemtypes.notforloan as notforloan_per_itemtype, + branchurl, + branches.branchname, + items.dateaccessioned FROM items LEFT JOIN branches ON items.homebranch = branches.branchcode LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber LEFT JOIN itemtypes ON itemtypes.itemtype = " - . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); - $query .= " WHERE items.biblionumber = ? ORDER BY branches.branchname,items.dateaccessioned desc" ; + . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype'); + $query .=" WHERE items.biblionumber =".$biblionumber; + $query .=" ORDER BY 19" ; my $sth = $dbh->prepare($query); - $sth->execute($biblionumber); + $sth->execute(); my $i = 0; my @results; my $serial; diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 4f6c23f..3f7bbae 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -93,6 +93,9 @@ my $marcseriesarray = GetMarcSeries($record,$marcflavour); my $marcurlsarray = GetMarcUrls ($record,$marcflavour); my $subtitle = GetRecordValue('subtitle', $record, $fw); +# get host (773) title and biblionumber for display +my ($hostbibnumber, $hosttitle) = GetMarcAnalytical($record,$marcflavour); + # Get Branches, Itemtypes and Locations my $branches = GetBranches(); my $itemtypes = GetItemTypes(); @@ -206,6 +209,9 @@ $template->param( MARCSUBJCTS => $marcsubjctsarray, MARCAUTHORS => $marcauthorsarray, MARCSERIES => $marcseriesarray, +# Next two fields related to host (773) of the biblio + hostbibnumber => $hostbibnumber, + hosttitle => $hosttitle, MARCURLS => $marcurlsarray, subtitle => $subtitle, itemdata_ccode => $itemfields{ccode}, diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index fc56047..6961624 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -818,18 +818,35 @@ AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|); return ($countlinked,$countcreated); } -# ======================== +# Sub to link analytical records to parent biblio and to corressponding item record +sub link_analytical_to_parent { + my ($parentbiblionumber, $analyticalbiblionumber, $itemnumber, $bibitemnum ) = @_; + my $dbh = C4::Context->dbh; + my $sth = $dbh->prepare( 'INSERT INTO analytical_records (parentbiblionumber, biblionumber, itemnumber, biblioitemnumber) values(?,?,?,?)' ); + $sth->execute( $parentbiblionumber, $analyticalbiblionumber, $itemnumber, $bibitemnum ); + } + + +#======================== # MAIN #========================= my $input = new CGI; my $error = $input->param('error'); my $biblionumber = $input->param('biblionumber'); # if biblionumber exists, it's a modif, not a new biblio. +my $itemnumber = $input->param('itemnumber'); +my $oldbibitemnum => $input->param('oldbibitemnum'); my $breedingid = $input->param('breedingid'); my $z3950 = $input->param('z3950'); my $op = $input->param('op'); my $mode = $input->param('mode'); my $frameworkcode = $input->param('frameworkcode'); my $redirect = $input->param('redirect'); + +# Next three parameters related to analytical records +my $parentbiblionumber = $input->param('parentbiblionumber'); +my $analytical_record = $input->param('analytical_record'); #if this is an analytical record +my $analyticalbiblionumber = $input->param('analyticalbiblionumber'); + my $dbh = C4::Context->dbh; my $userflags = ($frameworkcode eq 'FA') ? "fast_cataloging" : "edit_catalogue"; @@ -931,6 +948,14 @@ if ( $op eq "addbiblio" ) { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } + +# if analytical record, call sub to link record to parent biblio and to item record + if ($analytical_record eq 1){ + + link_analytical_to_parent($parentbiblionumber, $biblionumber, $itemnumber, $oldbibitemnum ); + } + + if (($mode ne "popup" && !$is_a_modif) || $redirect eq "items"){ print $input->redirect( "/cgi-bin/koha/cataloguing/additem.pl?biblionumber=$biblionumber&frameworkcode=$frameworkcode" @@ -954,6 +979,7 @@ if ( $op eq "addbiblio" ) { }else { $template->param( biblionumber => $biblionumber, + done =>1, popup =>1 ); @@ -1014,6 +1040,11 @@ elsif ( $op eq "delete" ) { biblioitemnumtagfield => $biblioitemnumtagfield, biblioitemnumtagsubfield => $biblioitemnumtagsubfield, biblioitemnumber => $biblioitemnumber, + +# parameters related to analytical records + parentbiblionumber => $parentbiblionumber, + analytical_record => $analytical_record, + itemnumber => $itemnumber, ); } @@ -1022,6 +1053,6 @@ $template->param( popup => $mode, frameworkcode => $frameworkcode, itemtype => $frameworkcode, -); + ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e42652c..d1f57fb 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -2585,6 +2585,22 @@ CREATE TABLE `fieldmapping` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- +-- Table structure for table `analytical_records` +-- + +DROP TABLE IF EXISTS `analytical_records`; +CREATE TABLE `analytical_records` ( + `analyticalrecordid` int(11) NOT NULL auto_increment, + `parentbiblionumber` int(11) NOT NULL default '0', + `biblionumber` int(11) NOT NULL default '0', + `itemnumber` int(11) NOT NULL default '0', + `biblioitemnumber` int(11) NOT NULL default '0', + KEY `analyticalrecordididx` (`analyticalrecordid`), + KEY `bibidx` (`parentbiblionumber`,`biblionumber`,`itemnumber`,`biblioitemnumber`), + CONSTRAINT `parentbiblionumber_ibfk_1` FOREIGN KEY (`parentbiblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 2bd4e21..0f7225e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -1396,7 +1396,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.00.00.074"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do( q(update itemtypes set imageurl = concat( 'npl/', imageurl ) + $dbh->do(qq(update itemtypes set imageurl = concat( 'npl/', imageurl ) where imageurl not like 'http%' and imageurl is not NULL and imageurl != '') ); @@ -1406,7 +1406,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.00.00.075"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do( q(alter table authorised_values add imageurl varchar(200) default NULL) ); + $dbh->do( qq(alter table authorised_values add imageurl varchar(200) default NULL) ); print "Upgrade to $DBversion done (adding imageurl field to authorised_values table)\n"; SetVersion ($DBversion); } @@ -1541,7 +1541,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.00.00.082"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do( q(alter table accountlines add column lastincrement decimal(28,6) default NULL) ); + $dbh->do( qq(alter table accountlines add column lastincrement decimal(28,6) default NULL) ); print "Upgrade to $DBversion done (adding lastincrement column to accountlines table)\n"; SetVersion ($DBversion); } @@ -3745,6 +3745,23 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { } +$DBversion = "3.01.01.000"; + if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("CREATE TABLE `analytical_records` ( + `analyticalrecordid` int(11) NOT NULL auto_increment, + `parentbiblionumber` int(11) NOT NULL default '0', + `biblionumber` int(11) NOT NULL default '0', + `itemnumber` int(11) NOT NULL default '0', + `biblioitemnumber` int(11) NOT NULL default '0', + KEY `analyticalrecordididx` (`analyticalrecordid`), + KEY `bibidx` (`parentbiblionumber`,`biblionumber`,`itemnumber`,`biblioitemnumber`), + CONSTRAINT `parentbiblionumber_ibfk_1` FOREIGN KEY (`parentbiblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE + ) ENGINE=InnoDB;"); + print "Upgrade to $DBversion done (Analytical Records)\n"; + SetVersion ($DBversion); +} + + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl index 1861028..8e2af82 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tmpl @@ -101,6 +101,16 @@ function verify_images() { + +
    2. Host Record: + Title:"> + + +
    3. + + + +
    4. Published by: "> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 8577193..cfdd24a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -42,7 +42,7 @@

      ">Barcode

      -

      Item Information &itemnumber=">[Edit Items]

      +

      Item Information &itemnumber=">[Edit Items]  &itemnumber=">[Create Analytical Record]

      1. Home Library:  
      2. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index 3e510c5..4f4a6bc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -721,6 +721,12 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? " /> " /> + + " /> + + " /> + + " /> " />
        diff --git a/kohaversion.pl b/kohaversion.pl index 0272b60..4261d9c 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -11,7 +11,7 @@ use strict; sub kohaversion { - our $VERSION = '3.01.00.999'; + our $VERSION = '3.01.01.000'; # version needs to be set this way # so that it can be picked up by Makefile.PL -- 1.5.4.5 From robin at catalyst.net.nz Fri Oct 22 02:28:24 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Fri, 22 Oct 2010 13:28:24 +1300 Subject: [Koha-patches] [PATCH] Update changelog and build script in preperation for 3.2.0 release Message-ID: <1287707304-7035-1-git-send-email-robin@catalyst.net.nz> --- debian/build-git-snapshot | 2 +- debian/changelog | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/debian/build-git-snapshot b/debian/build-git-snapshot index 99475a6..fd0f1df 100755 --- a/debian/build-git-snapshot +++ b/debian/build-git-snapshot @@ -30,7 +30,7 @@ latest_sha1() { } newversion() { - printf '3.2~git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1) + printf '3.2.0-2~git%s.%s' $(date +%Y%m%d%H%M%S) $(latest_sha1) } adjust_debian_changelog() { diff --git a/debian/changelog b/debian/changelog index 1bc3ffa..fec8e90 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +koha (3.2.0-1) squeeze; urgency=low + + * New upstream release. + + -- Robin Sheat Fri, 22 Oct 2010 13:04:42 +1300 + koha (3.2~0.2) experimental; urgency=low * Add notes about README.Debian to package description and postinst output. -- 1.7.1 From gmcharlt at gmail.com Fri Oct 22 03:39:19 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 21 Oct 2010 21:39:19 -0400 Subject: [Koha-patches] [PATCH] bug 4176: remove references to unimplemented system preference MIME Message-ID: <1287711559-3235-1-git-send-email-gmcharlt@gmail.com> The intended functionality of this system preference was never implemented. To avoid template changes prior to 3.2.0, put in hard-coded string 'CSV' to (accurately) identify the type of the output files in the affected reports. Signed-off-by: Galen Charlton --- admin/aqplan.pl | 4 +-- admin/systempreferences.pl | 1 - installer/data/mysql/de-DE/mandatory/sysprefs.sql | 1 - installer/data/mysql/en/mandatory/sysprefs.sql | 1 - .../1-Obligatoire/unimarc_standard_systemprefs.sql | 1 - installer/data/mysql/it-IT/necessari/sysprefs.sql | 1 - installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 1 - ...m_preferences_full_optimal_for_install_only.sql | 1 - ...ystem_preferences_only_translation_updating.sql | 3 -- ...m_preferences_full_optimal_for_install_only.sql | 1 - ...ystem_preferences_only_translation_updating.sql | 3 -- .../prog/en/modules/admin/preferences/admin.pref | 1 - reports/acquisitions_stats.pl | 8 +----- reports/bor_issues_top.pl | 3 +- reports/borrowers_out.pl | 8 +----- reports/borrowers_stats.pl | 5 +--- reports/cat_issues_top.pl | 8 +----- reports/catalogue_out.pl | 3 +- reports/catalogue_stats.pl | 3 +- reports/issues_avg_stats.pl | 8 +----- reports/issues_stats.pl | 6 +---- reports/serials_stats.pl | 5 +--- tools/viewlog.pl | 25 +------------------- 23 files changed, 12 insertions(+), 89 deletions(-) diff --git a/admin/aqplan.pl b/admin/aqplan.pl index da47179..8efa427 100755 --- a/admin/aqplan.pl +++ b/admin/aqplan.pl @@ -95,7 +95,6 @@ my $show_actual = $input->param('show_actual'); my $show_percent = $input->param('show_percent'); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); my $del = $input->param("sep"); my $show_mine = $input->param('show_mine') ; @@ -332,11 +331,10 @@ foreach my $n (@names) { # ------------------------------------------------------------ # DEFAULT DISPLAY BEGINS -my @mime = ( C4::Context->preference("MIME") ); my $CGIextChoice = CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index 97f9e1b..58f8ac7 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -88,7 +88,6 @@ $tabsysprefs{IndependantBranches} = "Admin"; $tabsysprefs{insecure} = "Admin"; $tabsysprefs{KohaAdmin} = "Admin"; $tabsysprefs{KohaAdminEmailAddress} = "Admin"; -$tabsysprefs{MIME} = "Admin"; $tabsysprefs{timeout} = "Admin"; $tabsysprefs{Intranet_includes} = "Admin"; $tabsysprefs{AutoLocation} = "Admin"; diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql index a83bfc5..339be61 100644 --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql @@ -60,7 +60,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding',5,'maximum amount withstanding to be able make holds','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves',50,'Define maximum number of holds a patron can place','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution',0,'If ON, patrons can be linked to institutions',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME','EXCEL','Define the default application for exporting report data','EXCEL|OPENOFFICE.ORG','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge',5,'Define maximum amount withstanding before check outs are blocked','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture',30,'Define number of days before expiry where circulation is warned about patron account expiry',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacAuthorities',1,'If ON, enables the search authorities link on OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql index e1bd137..c5d451b 100644 --- a/installer/data/mysql/en/mandatory/sysprefs.sql +++ b/installer/data/mysql/en/mandatory/sysprefs.sql @@ -60,7 +60,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding',5,'maximum amount withstanding to be able make holds','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves',50,'Define maximum number of holds a patron can place','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution',0,'If ON, patrons can be linked to institutions',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME','EXCEL','Define the default application for exporting report data','EXCEL|OPENOFFICE.ORG','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge',5,'Define maximum amount withstanding before check outs are blocked','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture',30,'Define number of days before expiry where circulation is warned about patron account expiry',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacAuthorities',1,'If ON, enables the search authorities link on OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql index 4e1dc4d..1be8d7d 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql @@ -62,7 +62,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding', '5', 'Ce param??tre d??finit le montant maximal des dettes au dela duquel le lecteur ne peut plus faire de r??servation', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves', '2', 'Ce param??tre d??finit le nombre maximal de r??servations qu''un lecteur peut faire.', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution', '0', 'Vos adh??rents sont ils membres d''une institution ?', NULL, 'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME', 'OPENOFFICE.ORG', 'Ce param??tre d??finit l''application par d??faut ?? ouvrir lorsqu''on t??l??charge un fichier (OpenOffice.org ou MS-Excel habituellement)', 'EXCEL|OPENOFFICE.ORG', 'Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge', '5', 'Ce param??tre d??finit le montant maximal des dettes au del?? duquel le lecteur ne peut plus emprunter', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture', '0', 'Ce param??tre permet d''??tre pr??venu N jours avant l''expiration de la carte d''un adh??rent, ?? la banque de pr??t.', '', 'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('DebugLevel', '2', 'D??finit le niveau d''affichage des erreurs en cas de probl??me : 0= aucun affichage, 1= un peu, 2=tout (peut ??tre risqu?? pour la s??curit??)', '0|1|2', 'Choice'); diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql index 6326b64..6bbdafc 100644 --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql @@ -95,7 +95,6 @@ insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('maxreserves','2','','Definisce il numero massimo di prenotazioni che un utente pu?? effettuare.','Integer'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('memberofinstitution','0','','Se ON, gli utenti possono essere linkati alle istituzioni.','YesNo'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('MergeAuthoritiesOnUpdate','1','','Se ON, aggiornando le authorities saranno automaticamente aggiornati anche i record bibliografici','YesNo'); -insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('MIME','EXCEL','EXCEL|OPENOFFICE.ORG','Definisce l???applicazione usata di default per esportare i dati dei report','Choice'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('minPasswordLength','3','','Specifica la lunghezza minima della password sia per l\'utente che per lo staff','free'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('noissuescharge','5','','Definisce l???ammontare massimo di multa che un utente pu?? raggiungere prima di venir sospeso dal prestito','Integer'); insert into `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) values('noItemTypeImages','0','','Se Attivo, disabilita le immagini relative al tipo documento','YesNo'); diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql index e44a3d2..1735fe5 100644 --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql @@ -61,7 +61,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding',5,'maximum amount withstanding to be able make holds','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves',50,'Define maximum number of holds a patron can place','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution',0,'If ON, patrons can be linked to institutions',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME','EXCEL','Define the default application for exporting report data','EXCEL|OPENOFFICE.ORG','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge',5,'Define maximum amount withstanding before check outs are blocked','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture',30,'Define number of days before expiry where circulation is warned about patron account expiry',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacAuthorities',1,'If ON, enables the search authorities link on OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql index c0cd8ab..9fc7690 100644 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -93,7 +93,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding',5,'maximum amount withstanding to be able make holds','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves',50,'Define maximum number of holds a patron can place','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution',0,'If ON, patrons can be linked to institutions',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME','OPENOFFICE.ORG','Define the default application for exporting report data','EXCEL|OPENOFFICE.ORG','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge',5,'Define maximum amount withstanding before check outs are blocked','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture',30,'Define number of days before expiry where circulation is warned about patron account expiry',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacAuthorities',1,'If ON, enables the search authorities link on OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.sql index 8546295..b3bb4e5 100644 --- a/installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.sql +++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_only_translation_updating.sql @@ -26,9 +26,6 @@ UPDATE systempreferences SET explanation='?????????? ??includes?? ?????????? ?? UPDATE systempreferences SET explanation='?????????? ?????????????????????? ??????????, ???? ?????????????? ???????????????? ?????????????? ?????????????????????? ???????????????????? ?????????????????????? ???? ?????????????? ??????????????' WHERE variable='KohaAdminEmailAddress'; -- Define the email address where patron modification requests are sent -UPDATE systempreferences SET explanation='?????????????????? ???? ?????????????????? ?????? ???????????????? ???????????? ??????????????' WHERE variable='MIME'; --- Define the default application for exporting report data - UPDATE systempreferences SET explanation='???????? ????????????????, ???? ?????????? ?????????????????? ?????????????????????? ?????????? ????????????' WHERE variable='noItemTypeImages'; -- If ON, disables item-type images diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql index 897dced..607a9ec 100644 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql @@ -93,7 +93,6 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxoutstanding',5,'maximum amount withstanding to be able make holds','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('maxreserves',50,'Define maximum number of holds a patron can place','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('memberofinstitution',0,'If ON, patrons can be linked to institutions',NULL,'YesNo'); -INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('MIME','OPENOFFICE.ORG','Define the default application for exporting report data','EXCEL|OPENOFFICE.ORG','Choice'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('noissuescharge',5,'Define maximum amount withstanding before check outs are blocked','','Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('NotifyBorrowerDeparture',30,'Define number of days before expiry where circulation is warned about patron account expiry',NULL,'Integer'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacAuthorities',1,'If ON, enables the search authorities link on OPAC',NULL,'YesNo'); diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.sql index 1c415e3..5d760a8 100644 --- a/installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.sql +++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_only_translation_updating.sql @@ -25,9 +25,6 @@ UPDATE systempreferences SET explanation='???????? ??includes?? ???????? ?????? UPDATE systempreferences SET explanation='???????????? ?????????????????????? ??????????, ???? ?????? ?????????????????? ???????????? ???????????????????????? ???????? ?????????????????????? ???? ?????????????????? ??????????????' WHERE variable='KohaAdminEmailAddress'; -- Define the email address where patron modification requests are sent -UPDATE systempreferences SET explanation='???????????????? ???? ???????????????????? ?????? ???????????????? ???????????? ????????????' WHERE variable='MIME'; --- Define the default application for exporting report data - UPDATE systempreferences SET explanation='???????? ????????????????, ???? ???????????? ???????????????????? ???????????????????? ?????????? ??????????????' WHERE variable='noItemTypeImages'; -- If ON, disables item-type images diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref index 306e3af..3ef972b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/admin.pref @@ -1,5 +1,4 @@ Administration: -# Broken, omitted: MIME, OpacMaintenance # Only used internally, omitted: FrameworksLoaded, Version Interface options: - diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl index 6c29e47..045a423 100755 --- a/reports/acquisitions_stats.pl +++ b/reports/acquisitions_stats.pl @@ -57,7 +57,6 @@ my $aodsp = $input->param("AcquiredOnDisplay"); ##added by mason. my $calc = $input->param("Cellvalue"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); #warn "calcul : ".$calc; my ($template, $borrowernumber, $cookie) @@ -229,15 +228,10 @@ else { -multiple => 0 ); - my @mime = ( C4::Context->preference("MIME") ); - foreach my $mime (@mime) { - # warn "".$mime; - } - my $CGIextChoice = CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/reports/bor_issues_top.pl b/reports/bor_issues_top.pl index 0290ab0..9f91257 100755 --- a/reports/bor_issues_top.pl +++ b/reports/bor_issues_top.pl @@ -55,7 +55,6 @@ foreach ( @filters[0..3] ) { } my $output = $input->param("output"); my $basename = $input->param("basename"); -# my $mime = $input->param("MIME"); my ($template, $borrowernumber, $cookie) = get_template_and_user({template_name => $fullreportname, query => $input, @@ -110,7 +109,7 @@ my $dbh = C4::Context->dbh; my @values; # here each element returned by map is a hashref, get it? -my @mime = ( map { {type =>$_} } (split /[;:]/,C4::Context->preference("MIME")) ); +my @mime = ( map { {type =>$_} } (split /[;:]/, 'CSV') ); # FIXME translation my $delims = GetDelimiterChoices; my $branches = GetBranches; my @branchloop; diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl index a6de5f0..0502dc6 100755 --- a/reports/borrowers_out.pl +++ b/reports/borrowers_out.pl @@ -49,7 +49,6 @@ my @filters = $input->param("Filter"); $filters[1] = format_date_in_iso($filters[1]) if $filters[1]; my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); our $sep = $input->param("sep") || ''; $sep = "\t" if ($sep eq 'tabulation'); my ($template, $borrowernumber, $cookie) @@ -114,15 +113,10 @@ if ($do_it) { my %select; my $req; - my @mime = ( C4::Context->preference("MIME") ); -# foreach my $mime (@mime){ -# warn "".$mime; -# } - my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl index f44c20e..c17a326 100755 --- a/reports/borrowers_stats.pl +++ b/reports/borrowers_stats.pl @@ -59,7 +59,6 @@ my $borstat = $input->param("status"); my $borstat1 = $input->param("activity"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); our $sep = $input->param("sep"); $sep = "\t" if ($sep eq 'tabulation'); my $selected_branch; # = $input->param("?"); @@ -131,12 +130,10 @@ if ($do_it) { $req->execute; $template->param( SORT2_LOOP => $req->fetchall_arrayref({})); - my @mime = ( C4::Context->preference("MIME") ); - # warn 'MIME(s): ' . join ' ', @mime; my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); my $CGIsepChoice=GetDelimiterChoices; diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl index d07335e..606106d 100755 --- a/reports/cat_issues_top.pl +++ b/reports/cat_issues_top.pl @@ -53,7 +53,6 @@ $filters[2]=format_date_in_iso($filters[2]); $filters[3]=format_date_in_iso($filters[3]); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); #warn "calcul : ".$calc; my ($template, $borrowernumber, $cookie) = get_template_and_user({template_name => $fullreportname, @@ -119,15 +118,10 @@ if ($do_it) { my %select; my $req; - my @mime = ( C4::Context->preference("MIME") ); -# foreach my $mime (@mime){ -# warn "".$mime; -# } - my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/reports/catalogue_out.pl b/reports/catalogue_out.pl index 36be473..87990c1 100755 --- a/reports/catalogue_out.pl +++ b/reports/catalogue_out.pl @@ -45,7 +45,6 @@ my $column = $input->param("Criteria"); my @filters = $input->param("Filter"); my $output = $input->param("output"); my $basename = $input->param("basename") || 'catalogue_out'; -my $mime = $input->param("MIME"); my ($template, $borrowernumber, $cookie) = get_template_and_user({ template_name => "reports/catalogue_out.tmpl", query => $input, @@ -104,7 +103,7 @@ if ($do_it) { my @values; my %select; -my @mime = ( map { +{type =>$_} } (split /[;:]/,C4::Context->preference("MIME")) ); +my @mime = ( map { +{type =>$_} } (split /[;:]/, 'CSV') ); # FIXME translation my $itemtypes = GetItemTypes; my @itemtypeloop; foreach (sort {$itemtypes->{$a}->{description} cmp $itemtypes->{$b}->{description}} keys %$itemtypes) { diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl index 5f865f3..11dff4d 100755 --- a/reports/catalogue_stats.pl +++ b/reports/catalogue_stats.pl @@ -51,7 +51,6 @@ my $lccndigits = $input->param("lccndigits"); my $cotedigits = $input->param("cotedigits"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); our $sep = $input->param("sep"); $sep = "\t" if ($sep eq 'tabulation'); my $item_itype; @@ -159,7 +158,7 @@ if ($do_it) { push @locations, { code => $_, description => "$_ - " . $locations->{$_} }; } - my @mime = ( map { +{type =>$_} } (split /[;:]/,C4::Context->preference("MIME")) ); + my @mime = ( map { +{type =>$_} } (split /[;:]/, 'CSV') ); # FIXME translation $template->param(hasdewey=>$hasdewey, haslccn => $haslccn, diff --git a/reports/issues_avg_stats.pl b/reports/issues_avg_stats.pl index 8285bec..f0f1dd5 100755 --- a/reports/issues_avg_stats.pl +++ b/reports/issues_avg_stats.pl @@ -56,7 +56,6 @@ my $rodsp = $input->param("ReturnDisplay"); my $calc = $input->param("Cellvalue"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); #warn "calcul : ".$calc; my ($template, $borrowernumber, $cookie) = get_template_and_user({template_name => $fullreportname, @@ -201,15 +200,10 @@ if ($do_it) { -size => 1, -multiple => 0 ); - my @mime = ( C4::Context->preference("MIME") ); -# foreach my $mime (@mime){ -# warn "".$mime; -# } - my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl index d1c0a04..f932a6f 100755 --- a/reports/issues_stats.pl +++ b/reports/issues_stats.pl @@ -61,7 +61,6 @@ my $monthsel = $input->param("PeriodMonthSel"); my $calc = $input->param("Cellvalue"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); my ($template, $borrowernumber, $cookie) = get_template_and_user({ template_name => $fullreportname, query => $input, @@ -149,13 +148,10 @@ foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { push @ccodes, { code => $_, description => $ccodes->{$_} }; } -# various -my @mime = (C4::Context->preference("MIME")); - my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); diff --git a/reports/serials_stats.pl b/reports/serials_stats.pl index 30dec07..640ef60 100755 --- a/reports/serials_stats.pl +++ b/reports/serials_stats.pl @@ -48,7 +48,6 @@ my $expired = $input->param("expired"); my $order = $input->param("order"); my $output = $input->param("output"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); our $sep = $input->param("sep") || ''; $sep = "\t" if ($sep eq 'tabulation'); @@ -154,12 +153,10 @@ if($do_it){ push @branchloop, \%row; } - my @mime = ( C4::Context->preference("MIME") ); - # warn 'MIME(s): ' . join ' ', @mime; my $CGIextChoice=CGI::scrolling_list( -name => 'MIME', -id => 'MIME', - -values => \@mime, + -values => ['CSV'], # FIXME translation -size => 1, -multiple => 0 ); my $CGIsepChoice=GetDelimiterChoices; diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 4880451..84c2474 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -53,7 +53,6 @@ my $info = $input->param("info"); my $datefrom = $input->param("from"); my $dateto = $input->param("to"); my $basename = $input->param("basename"); -my $mime = $input->param("MIME"); #my $del = $input->param("sep"); my $output = $input->param("output") || "screen"; my $src = $input->param("src"); # this param allows us to be told where we were called from -fbcit @@ -102,29 +101,7 @@ $template->param( debug => $debug, C4::Search::enabled_staff_search_views, ); -# -#### This code was never really used - maybe some day some will fix it ### -#my @mime = ( C4::Context->preference("MIME") ); -#my $CGIextChoice = CGI::scrolling_list( -# -name => 'MIME', -# -id => 'MIME', -# -values => \@mime, -# -size => 1, -# -multiple => 0 -#); -#my @dels = ( C4::Context->preference("delimiter") ); -#my $CGIsepChoice = CGI::scrolling_list( -# -name => 'sep', -# -id => 'sep', -# -values => \@dels, -# -size => 1, -# -multiple => 0 -#); -#$template->param( -# CGIextChoice => $CGIextChoice, -# CGIsepChoice => $CGIsepChoice, -#); -# + if ($do_it) { my $results = GetLogs($datefrom,$dateto,$user,\@modules,$action,$object,$info); -- 1.7.0 From daniel.latremoliere at bulac.fr Fri Oct 22 11:10:04 2010 From: daniel.latremoliere at bulac.fr (=?ISO-8859-1?Q?Daniel_Latr=E9moli=E8re?=) Date: Fri, 22 Oct 2010 11:10:04 +0200 Subject: [Koha-patches] [PATCH] Bug 5128 [3.2] Unimarc default for holdings. Written with French default In-Reply-To: <1286553296-4720-1-git-send-email-tajoli@cilea.it> References: tajoli@cilea.it <1286553296-4720-1-git-send-email-tajoli@cilea.it> Message-ID: <4CC154EC.7000204@bulac.fr> I think this patch has added two non-expected characters in the file "unimarc_framework_DEFAULT.sql". http://git.koha-community.org/gitweb/?p=koha.git;a=blob;f=installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql;hb=cfb1d46f7f47207e88a0132587dd15b6695e2fa5 Line 125: There is an 'i' at the beginning of the line. Line 144: There is a '+' at the beginning of the line. The SQL commands becomes invalid and Koha Web Installer tells, at Step 3: unimarc_framework_DEFAULT.sql ERROR 1064 (42000) at line 123: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'i ('995', '2', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST'' at line 3 Daniel. Daniel LATR?MOLI?RE - P?le Informatique 60, rue de Wattignies - 75012 Paris - T?l. (+33) 01 53 46 15 83 Biblioth?que Universitaire des Langues et Civilisations Le 08/10/2010 17:54, Zeno Tajoli a ?crit : > --- > etc/zebradb/marc_defs/unimarc/biblios/record.abs | 5 +- > .../mandatory/unimarc_framework_DEFAULT.sql | 153 ++++++-------------- > 2 files changed, 48 insertions(+), 110 deletions(-) > > diff --git a/etc/zebradb/marc_defs/unimarc/biblios/record.abs b/etc/zebradb/marc_defs/unimarc/biblios/record.abs > index 586b60c..2a4258b 100644 > --- a/etc/zebradb/marc_defs/unimarc/biblios/record.abs > +++ b/etc/zebradb/marc_defs/unimarc/biblios/record.abs > @@ -329,9 +329,10 @@ melm 995$d holdingbranch,Record-Source,item > melm 995$e location,item > melm 995$f barcode,item > melm 995$h ccode,item > -melm 995$j LC-card-number:s,item > melm 995$k Call-Number,Local-Classification,lcn,Call-Number:p,Local-Classification:p,lcn:p,item > -melm 995$s popularity:n,popularity:s,item > melm 995$n onloan:d,onloan:n,onloan:s,onloan:w,item > melm 995$u Note,Note:p,item > melm 995 item # just to index every subfield > + > +### 942 local info > +melm 942$0 popularity:n,popularity:s,item > diff --git a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql > index 16340c4..e03e58d 100644 > --- a/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql > +++ b/installer/data/mysql/en/marcflavour/unimarc/mandatory/unimarc_framework_DEFAULT.sql > @@ -20,6 +20,17 @@ > -- 2000. It includes the changes published in Update 3." - > -- http://www.ifla.org/VI/3/p1996-1/sec-uni.htm . > -- 2006-03-15 a > + > +-- From Zeno Tajoli (2010-08-12): > +-- > +-- Improved default id Koha field (090) and koha date field (099). > +-- Insert link to sql coloum biblio.biblionumber in tag 001 > +-- Insert the use of 942, local data > +-- Insert a standard minimun on 995 (holding field) > +-- *********************************************************************** > + > + > + > -- *********************************************************************** > > > @@ -49,46 +60,38 @@ > -- ****************************************************** > > > --- Current Record ID Field/Subfields > - > -INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES > - ('999', 'System Control Numbers (Koha)', 'System Control Numbers (Koha)', 0, 0, '', ''); > - > -INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES > - ('999', '9', 'Koha biblio number (autogenerated)', 'Koha biblio number', 0, 0, 'biblio.biblionumber', -1, '', '', '', 0, -5, '', '', '', NULL), > - ('999', 'a', 'Koha biblioitem number (autogenerated)', 'Koha biblioitem number', 0, 0, 'biblioitems.biblioitemnumber', -1, '', '', '', 0, -5, '', '', '', NULL); > - > - > --- ****************************************************** > +-- Current Record ID Field/Subfields (090) > > +insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values > + ('090','System Control Numbers (Koha)','System Control Numbers (Koha)',0,0,'',''); > > --- Plugins which need to be written for primary biblioitems Field/Subfields. > +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values > + ('090','a','Koha biblioitem number (autogenerated)','Koha biblioitem number (autogenerated)',0,0,'biblioitems.biblioitemnumber',9,'','','',0,-5,'',NULL,'',''); > > +-- Local date field/Subfields (099) > > --- ('990', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), > --- ('990', 'h', 'Classification part', 'Classification part', 0, 0, 'biblioitems.cn_class', 9, '', '', 'unimarc_callnumber.pl', NULL, 0, '', '', '', NULL), > +insert into `marc_tag_structure`(`tagfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`authorised_value`,`frameworkcode`) values > + ('099','local dates','',0,0,'',''); > > +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values > + ('099','c','Date of creation (bib. record)','Date of creation (bib. record)',0,0,'biblio.datecreated',0,'','','',0,-5,'',NULL,'',''); > + > +insert into `marc_subfield_structure`(`tagfield`,`tagsubfield`,`liblibrarian`,`libopac`,`repeatable`,`mandatory`,`kohafield`,`tab`,`authorised_value`,`authtypecode`,`value_builder`,`isurl`,`hidden`,`frameworkcode`,`seealso`,`link`,`defaultvalue`) values > + ('099','d','Last modified date (bib. record)','Last modified data (bib. record)',0,0,'biblio.timestamp',0,'','','',0,-5,'',NULL,'',''); > > > --- Current primary biblioitems Field/Subfields > +-- Current primary biblioitems Field/Subfields (942) > > > INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES > - ('990', 'ADDED ENTRY ELEMENTS (KOHA)', 'ADDED ENTRY ELEMENTS (KOHA)', 0, 0, '', ''); > + ('942', 'ADDED ENTRY ELEMENTS (KOHA)', 'ADDED ENTRY ELEMENTS (KOHA)', 0, 0, '', ''); > > INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES > - ('990', '0', 'Koha issues (borrowed), all copies', 'Koha issues (borrowed), all copies', 0, 0, 'biblioitems.totalissues', 9, '', '', '', NULL, -5, '', '', '', NULL), > - ('990', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', '', NULL, 0, '', '', '', NULL), > - ('990', '6', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'biblioitems.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), > - ('990', 'a', 'Koha item type [OBSOLETE]', 'Koha item type [OBSOLETE]', 0, 0, '', 9, '', '', '', NULL, -5, '', '', '', NULL), > - ('990', 'c', 'Koha item type', 'Koha item type', 0, 1, 'biblioitems.itemtype', 9, 'itemtypes', '', '', NULL, 0, '', '', '', NULL), > - ('990', 'e', 'Edition', 'Edition', 0, 0, 'biblioitems.cn_edition', 9, 'CN_EDITION', '', '', NULL, 0, '', '', '', NULL), > - ('990', 'h', 'Classification part', 'Classification part', 0, 0, 'biblioitems.cn_class', 9, '', '', '', NULL, 0, '', '', '', NULL), > - ('990', 'i', 'Item part', 'Item part', 1, 0, 'biblioitems.cn_item', 9, '', '', '', NULL, 9, '', '', '', NULL), > - ('990', 'k', 'Call number prefix', 'Call number prefix', 0, 0, 'biblioitems.cn_prefix', 9, '', '', '', NULL, 0, '', '', '', NULL), > - ('990', 'm', 'Call number suffix', 'Call number suffix', 0, 0, 'biblioitems.cn_suffix', 9, '', '', '', 0, 0, '', '', '', NULL), > - ('990', 'n', 'Suppress in OPAC', 'Suppress in OPAC', 0, 0, NULL, 9, '', '', '', 0, 0, '', '', '', NULL), > - ('990', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL); > + ('942', '0', 'Koha issues (borrowed), all copies', 'Koha issues (borrowed), all copies', 0, 0, 'biblioitems.totalissues', 9, '', '', '', NULL, -5, '', '', '', NULL), > + ('942', '2', 'Source of classification or shelving scheme', 'Source of classification or shelving scheme', 0, 0, 'biblioitems.cn_source', 9, '', '', '', NULL, 0, '', '', '', NULL), > + ('942', '6', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'biblioitems.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), > + ('942', 'c', 'Koha item type', 'Koha item type', 0, 1, 'biblioitems.itemtype', 9, 'itemtypes', '', '', NULL, 0, '', '', '', NULL), > + ('942', 's', 'Serial record flag', 'Serial record', 0, 0, 'biblio.serial', 9, '', '', '', NULL, -5, '', '', '', NULL); > > > -- ****************************************************** > @@ -112,59 +115,6 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` > > > > --- Recommended items Field/Subfields > - > --- INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES > --- ('995', 'Location and Item Information (Koha)', 'Location and Item Information (Koha)', 0, 0, '', ''); > - > --- INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES > --- ('995', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WTHDRAWN', '', '', 0, 0, '', '', '', NULL), > --- ('995', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), > --- ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), > --- ('995', '3', 'Classification part', 'Classification part', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), > --- ('995', '4', 'Item part', 'Item part', 1, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), > --- ('995', '5', 'Use restrictions', 'Use restrictions', 0, 0, 'items.restricted', 10, 'RESTRICTED', '', '', 0, 0, '', '', '', NULL), > --- ('995', '6', 'Coded location qualifier', 'Coded location qualifier', 1, 0, '', 10, '', '', 'marc21_locationqualifier.pl', NULL, 0, '', '', '', NULL), > --- ('995', '7', 'Copy number', 'Copy number', 0, 0, 'items.copynumber', 10, '', '', '', NULL, 0, '', '', '', NULL), > --- ('995', '8', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 1, 0, 'items.uri', 10, '', '', '', 1, 0, '', '', '', NULL), > --- ('995', '9', 'Internal item number (Koha itemnumber, autogenerated)', 'Internal itemnumber (Koha itemnumber)', 0, 0, 'items.itemnumber', -1, '', '', '', 0, -5, '', '', '', NULL), > --- ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'c', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'd', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'e', 'Genre detail', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'f', 'Barcode', 'Barcode', 0, 0, 'items.barcode', 10, '', '', 'barcode.pl', 0, 0, '', '', '', NULL), > --- ('995', 'g', 'Barcode prefix', 'Barcode prefix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'h', 'Barcode incrementation', 'Barcode incrementation', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'i', 'Barcode suffix', 'Barcode suffix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'j', 'Section', 'Section', 0, 0, '', 10, '', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', 'unimarc_itemcallnumber.pl', 0, 0, '', '', '', NULL), > --- ('995', 'l', 'Numbering (volume or other part)', 'Numbering (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'm', 'Date of loan or deposit', 'Date of loan or deposit', 0, 0, 'items.datelastborrowed', 10, '', '', '', 0, -5, '', '', '', NULL), > --- ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'o', 'Circulation type (not for loan)', 'Circulation type (not for loan)', 1, 0, 'items.notforloan', 10, '', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'p', 'Serial', 'Serial', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'q', 'Intended audience (age level)', 'Intended audience (age level)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), > --- ('995', 's', 'Acquisition mode', 'Acquisition mode', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 't', 'Genre', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'u', 'Copy note', 'Copy note', 0, 0, 'items.itemnotes', 10, '', '', '', 0, 0, '', '', '', NULL), > --- ('995', 'v', 'Periodical number', 'Periodical number', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'w', 'Recipient organisation code', 'Recipient organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'x', 'Recipient organisation, free text', 'Recipient organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'y', 'Recipient parent organisation code', 'Recipient parent organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > --- ('995', 'z', 'Recipient parent organisation, free text', 'Recipient parent organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL); > - > - > - > --- Plugins which need to be written for items Field/Subfields > - > - > --- ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', 'unimarc_en_classcodes.pl', NULL, 0, '', '', '', NULL), > --- ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', 'unimarc_itemcallnumber.pl', 0, 0, '', '', '', NULL), > - > - > - > -- Current items Field/Subfields > > INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES > @@ -172,42 +122,29 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat > > INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES > ('995', '0', 'Withdrawn status', 'Withdrawn status', 0, 0, 'items.wthdrawn', 10, 'WTHDRAWN', '', '', 0, 0, '', '', '', NULL), > - ('995', '1', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), > - ('995', '2', 'System code (specific classification or other scheme and edition)', 'System code (specific classification or other scheme and edition)', 0, 0, '', 10, '', '', '', NULL, 0, '', '', '', NULL), > +i ('995', '2', 'Lost status', 'Lost status', 0, 0, 'items.itemlost', 10, 'LOST', '', '', 0, 0, '', '', '', NULL), > ('995', '3', 'Use restrictions', 'Use restrictions', 0, 0, 'items.restricted', 10, 'RESTRICTED', '', '', 0, 0, '', '', '', NULL), > - ('995', '4', 'Koha normalized classification for sorting', 'Koha normalized classification for sorting', 0, 0, 'items.cn_sort', -1, '', '', '', 0, 7, '', '', '', NULL), > - ('995', '5', 'Coded location qualifier', 'Coded location qualifier', 0, 0, '', 10, '', '', 'marc21_locationqualifier.pl', NULL, 0, '', '', '', NULL), > + ('995', '5', 'Date acquired', 'Coded location qualifier', 0, 0, 'items.dateaccessioned', 10, '', '', '', NULL, 0, '', '', '', NULL), > ('995', '6', 'Copy number', 'Copy number', 0, 0, 'items.copynumber', 10, '', '', '', NULL, 0, '', '', '', NULL), > ('995', '7', 'Uniform Resource Identifier', 'Uniform Resource Identifier', 0, 0, 'items.uri', 10, '', '', '', 0, 0, '', '', '', NULL), > - ('995', '8', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), > ('995', '9', 'Internal item number (Koha itemnumber, autogenerated)', 'Internal itemnumber (Koha itemnumber)', 0, 0, 'items.itemnumber', -1, '', '', '', 0, -5, '', '', '', NULL), > - ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, 'items.homebranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), > - ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'c', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), > - ('995', 'd', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'e', 'Genre detail', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > + ('995', 'a', 'Origin of the item (home branch) (free text)', 'Origin of item (home branch) (free text)', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), > + ('995', 'b', 'Origin of item (home branch) (coded)', 'Origin of item (home branch (coded)', 0, 0, 'items.homebranch', 10, 'branches', '', '', 0, -1, '', '', '', NULL), > + ('995', 'c', 'Lending or holding organisation (holding branch) code', 'Lending or holding organisation (holding branch) code ', 0, 1, 'items.holdingbranch', 10, 'branches', '', '', 0, 0, '', '', '', NULL), > + ('995', 'd', 'Lending or holding organisation (holding branch) (free text)', 'Lending or holding organisation (holding branch) (free text)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > + ('995', 'e', 'Shelving location', 'Shelving location', 0, 0, 'items.location', 10, 'LOC', '', '', 0, 0, '', '', '', NULL), > ('995', 'f', 'Barcode', 'Barcode', 0, 0, 'items.barcode', 10, '', '', 'barcode.pl', 0, 0, '', '', '', NULL), > - ('995', 'g', 'Barcode prefix', 'Barcode prefix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'h', 'Barcode incrementation', 'Barcode incrementation', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'i', 'Barcode suffix', 'Barcode suffix', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'j', 'Section', 'Section', 0, 0, '', 10, '', '', '', 0, 0, '', '', '', NULL), > + ('995', 'h', 'Koha collection', 'Koha collection', 0, 0, 'items.ccode', 10, 'CCODE', '', '', 0, 0, '', '', '', NULL), > + ('995', 'j', 'Inventory number', 'Inventory number', 0, 0, 'items.stocknumber ', 10, '', '', '', 0, 0, '', '', '', NULL), > ('995', 'k', 'Call number (full call number)', 'Call number (full call number)', 0, 0, 'items.itemcallnumber', 10, '', '', '', 0, 0, '', '', '', NULL), > ('995', 'l', 'Numbering (volume or other part)', 'Numbering (bound volume or other part)', 0, 0, 'items.materials', 10, '', '', '', 0, 0, '', '', '', NULL), > ('995', 'm', 'Date of loan or deposit', 'Date of loan or deposit', 0, 0, 'items.datelastborrowed', 10, '', '', '', 0, -5, '', '', '', NULL), > - ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > + ('995', 'n', 'Expiration of loan date', 'Expiration of loan date', 0, 0, 'items.onloan', 10, '', '', '', 0, -1, '', '', '', NULL), > ('995', 'o', 'Circulation type (not for loan)', 'Circulation type (not for loan)', 0, 0, 'items.notforloan', 10, '', '', '', 0, 0, '', '', '', NULL), > - ('995', 'p', 'Serial', 'Serial', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'q', 'Intended audience (age level)', 'Intended audience (age level)', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, '', 10, '', '', '', 0, 0, '', '', '', NULL), > - ('995', 's', 'Acquisition mode', 'Acquisition mode', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 't', 'Genre', 'Genre', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > ++ ('995', 'r', 'Type of item and material', 'Type of item and material', 0, 1, 'items.itype', 10, 'itemtypes', '', '', 0, 0, '', '', '', NULL), > ('995', 'u', 'Copy note', 'Copy note', 0, 0, 'items.itemnotes', 10, '', '', '', 0, 0, '', '', '', NULL), > - ('995', 'v', 'Periodical number', 'Periodical number', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'w', 'Recipient organisation code', 'Recipient organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'x', 'Recipient organisation, free text', 'Recipient organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'y', 'Recipient parent organisation code', 'Recipient parent organisation code', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL), > - ('995', 'z', 'Recipient parent organisation, free text', 'Recipient parent organisation, free text', 0, 0, '', 10, '', '', '', 0, -1, '', '', '', NULL); > - > + ('995', 'v', 'Serial Enumeration / chronology', 'Serial Enumeration / chronology', 0, 0, 'items.enumchron', 10, '', '', '', 0, -1, '', '', '', NULL); > + > > > -- ******************************************************* > @@ -385,7 +322,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat > > INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value`, `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES > ('000', '@', 'fixed length control field', 'fixed length control field', 0, 1, '', 0, '', '', 'unimarc_leader.pl', 0, 0, '', '', '', NULL), > - ('001', '@', 'control field', 'control field', 0, 1, '', 0, '', '', '', 0, 0, '', '', '', NULL), > + ('001', '@', 'control field', 'control field', 0, 1, 'biblio.biblionumber', -1, '', '', '', 0, 0, '', '', '', NULL), > ('005', '@', 'control field', 'control field', 0, 0, '', 0, '', '', 'marc21_field_005.pl', 0, 0, '', '', '', NULL), > ('010', 'a', 'Number (ISBN)', 'Number (ISBN)', 0, 0, 'biblioitems.isbn', 0, '', '', '', 0, 0, '', '', '', NULL), > ('010', 'b', 'Qualification', 'Qualification', 0, 0, '', 0, '', '', '', 0, 0, '', '', '', NULL), -------------- next part -------------- An HTML attachment was scrubbed... URL: From gmcharlt at gmail.com Fri Oct 22 14:22:17 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 22 Oct 2010 08:22:17 -0400 Subject: [Koha-patches] [PATCH] Bug 5128 [3.2] Unimarc default for holdings. Written with French default In-Reply-To: <4CC154EC.7000204@bulac.fr> References: <1286553296-4720-1-git-send-email-tajoli@cilea.it> <4CC154EC.7000204@bulac.fr> Message-ID: Hi, 2010/10/22 Daniel Latr?moli?re : > I think this patch has added two non-expected characters in the file > "unimarc_framework_DEFAULT.sql". Thanks for the catch. I have pushed a correction. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From colin.campbell at ptfs-europe.com Fri Oct 22 15:08:57 2010 From: colin.campbell at ptfs-europe.com (Colin Campbell) Date: Fri, 22 Oct 2010 14:08:57 +0100 Subject: [Koha-patches] [PATCH] [Bug 5315] Remove references to obsolete variable nbstatements Message-ID: <1287752937-7929-1-git-send-email-colin.campbell@ptfs-europe.com> Trying to see the wood from the trees --- authorities/authorities-home.pl | 2 -- .../prog/en/includes/auth-finder-search.inc | 1 - .../prog/en/includes/authorities-search.inc | 3 --- .../prog/en/modules/labels/label-bib-search.tmpl | 3 +-- .../prog/en/modules/opac-authorities-home.tmpl | 1 - 5 files changed, 1 insertions(+), 9 deletions(-) diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index fbaa1ba..edf02a5 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -161,8 +161,6 @@ elsif ( $op eq "delete" ) { } ); - # $template->param("statements" => \@statements, - # "nbstatements" => $nbstatements); } else { ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc index 8a725f0..437b313 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc @@ -1,7 +1,6 @@
        - " /> " />
        1. Authority type diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index 9a7b2e3..0a1548f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -6,7 +6,6 @@ - " /> - " /> - " /> - " />

          Search on

          @@ -32,4 +31,4 @@

          - \ No newline at end of file + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl index 2b07471..f0b4cf7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl @@ -12,7 +12,6 @@
          - " />
          Authority search
            -- 1.7.2.3 From gmcharlt at gmail.com Fri Oct 22 15:19:58 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 22 Oct 2010 09:19:58 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5315: Remove references to obsolete variable nbstatements Message-ID: <1287753598-26495-1-git-send-email-gmcharlt@gmail.com> From: Colin Campbell Trying to see the wood from the trees Signed-off-by: Galen Charlton --- authorities/authorities-home.pl | 2 -- .../prog/en/includes/auth-finder-search.inc | 1 - .../prog/en/includes/authorities-search.inc | 3 --- .../prog/en/modules/labels/label-bib-search.tmpl | 3 +-- .../prog/en/modules/opac-authorities-home.tmpl | 1 - 5 files changed, 1 insertions(+), 9 deletions(-) diff --git a/authorities/authorities-home.pl b/authorities/authorities-home.pl index fbaa1ba..edf02a5 100755 --- a/authorities/authorities-home.pl +++ b/authorities/authorities-home.pl @@ -161,8 +161,6 @@ elsif ( $op eq "delete" ) { } ); - # $template->param("statements" => \@statements, - # "nbstatements" => $nbstatements); } else { ( $template, $loggedinuser, $cookie ) = get_template_and_user( diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc index 8a725f0..437b313 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc @@ -1,7 +1,6 @@ - " /> " />
            1. Authority type diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc index 9a7b2e3..0a1548f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/authorities-search.inc @@ -6,7 +6,6 @@ - " /> - " /> - " /> - " />

              Search on

              @@ -32,4 +31,4 @@

              - \ No newline at end of file + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl index 2b07471..f0b4cf7 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-authorities-home.tmpl @@ -12,7 +12,6 @@
              - " />
              Authority search
                -- 1.7.0 From jcamins at cpbibliography.com Sat Oct 23 20:57:54 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Sat, 23 Oct 2010 14:57:54 -0400 Subject: [Koha-patches] [PATCH] Update language mappings to fix Bug 5311 Message-ID: <1287860274-3037-1-git-send-email-jcamins@cpbibliography.com> This patch updates the language_rfc4646_to_iso639 mapping table with the correct mappings for several languages that were not mapped correctly to the codes used in MARC, including Finnish (which was not mapped at all), and Armenian (which was mapped to an obsolete code). This patch also changes English and French to use the proper three-letter codes, which will eliminate false positives when, for example, limiting by French brings up results in Afrikaans. --- .../data/mysql/en/mandatory/subtag_registry.sql | 30 ++++++++++++++------ 1 files changed, 21 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index f2e0648..852805d 100644 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hy', 'language', 'Armenian','2005-10-16'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'hy','hy'); +VALUES( 'hy','arm'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'hy', 'language', 'hy', 'Հայերէն'); @@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'en', 'language', 'English','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'en','en'); +VALUES( 'en','eng'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'en', 'English'); @@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'fr', 'Anglais'); --- English +-- Finnish INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fi', 'language', 'Finnish','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'fi','fin'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fi', 'language', 'fi', 'suomi'); @@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fr', 'language', 'French','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'fr','fr'); +VALUES( 'fr','fre'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fr', 'language', 'en', 'French'); @@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'lo', 'language', 'Lao','2005-10-16' ); --- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) --- VALUES( 'lo','nor'); ??? +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'lo','lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'lo', 'language', 'lo', 'ພາສາລາວ'); @@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); @@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'la', 'language', 'fr', 'Latin'); --- Galacian +-- Galician INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'gl', 'language', 'Galician','2005-10-16' ); @@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'sr', 'language', 'Serbian','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'sr','srp'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'sr', 'language', 'sr', 'српски'); @@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Su?dois'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'tet', 'language', 'Tetum','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'tet','tet'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'tet', 'language', 'tet', 'tetun'); @@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'uk', 'language', 'fr', 'Ukrainien'); --- English +-- Urdu INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ur', 'language', 'Urdu','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'ur','urd'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'ur', 'language', 'en', 'Urdu'); -- 1.7.0.4 From gmcharlt at gmail.com Mon Oct 25 16:16:19 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 25 Oct 2010 10:16:19 -0400 Subject: [Koha-patches] [PATCH] bug 2567: let 008/15-17 and 008/24-27 be set Message-ID: <1288016179-16313-1-git-send-email-gmcharlt@gmail.com> Fixes bug where the MARC21 008 plugin was falsely claiming that it set the illustration and nature of contents positions by deriving it from other fields in the bib records. Signed-off-by: Galen Charlton --- .../value_builder/marc21_field_008.tmpl | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl index e3ca98a..5d926ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.tmpl @@ -131,7 +131,7 @@ - (auto-filled from 300)"/> + "/> @@ -264,8 +264,8 @@ - (Derived value) - "/> + + "/> @@ -636,10 +636,10 @@ function report() { // } //MR (document.f_pop.f1517.value+" ").substr(0,3)+ - document.f_pop.f1821.value+ + (document.f_pop.f1821.value+" ").substr(0,4)+ document.f_pop.f22.value+ document.f_pop.f23.value+ - document.f_pop.f2427.value+ + (document.f_pop.f2427.value+" ").substr(0,4)+ document.f_pop.f28.value+ document.f_pop.f29.value+ document.f_pop.f30.value+ @@ -656,4 +656,4 @@ function report() { //]]> - \ No newline at end of file + -- 1.7.0 From gmcharlt at gmail.com Mon Oct 25 17:05:13 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Mon, 25 Oct 2010 11:05:13 -0400 Subject: [Koha-patches] [PATCH] bug 3211: fix some errors that crept into the cleanup Message-ID: <1288019113-17263-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../value_builder/unimarc_field_105.tmpl | 12 +++--- .../value_builder/unimarc_field_110.tmpl | 8 ++-- .../value_builder/unimarc_field_121b.tmpl | 34 ++++++++++---------- .../value_builder/unimarc_field_140.tmpl | 16 +++++----- .../value_builder/unimarc_field_141.tmpl | 4 +- .../value_builder/unimarc_field_4XX.tmpl | 2 +- .../cataloguing/value_builder/unimarc_leader.tmpl | 8 ++-- 7 files changed, 42 insertions(+), 42 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tmpl index 60e0825..0c1a60c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_105.tmpl @@ -955,13 +955,13 @@ - + - + @@ -981,13 +981,13 @@ - + - + @@ -1005,13 +1005,13 @@ - + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tmpl index c47d3b9..26afc2c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_110.tmpl @@ -338,12 +338,12 @@ - + - + @@ -575,12 +575,12 @@ - + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_121b.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_121b.tmpl index b5e51d0..de48477 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_121b.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_121b.tmpl @@ -82,42 +82,42 @@ - + - + @@ -1671,12 +1671,12 @@ - + - + @@ -1705,12 +1705,12 @@ - + - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tmpl index 0eb2ae5..696af43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/unimarc_field_4XX.tmpl @@ -117,7 +117,7 @@
                - - + @@ -59,7 +59,7 @@ $(document).ready(function() { - + -- 1.7.0 From gmcharlt at gmail.com Tue Oct 26 15:10:57 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 09:10:57 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 5/5] Bug 5227 [3.4] Enhance the label batch edit interface Message-ID: <1288098657-24591-1-git-send-email-gmcharlt@gmail.com> From: Chris Nighswonger This patch adds the ability to enter items into label batches via barcode scanning Work sponsored by Tamil - http://www.tamil.fr Signed-off-by: Fr?d?ric Demians Signed-off-by: Galen Charlton --- .../prog/en/includes/labels-batches-toolbar.inc | 8 +++- .../prog/en/modules/labels/label-edit-batch.tmpl | 44 ++++++++++++++++++- labels/label-edit-batch.pl | 13 +++++- 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc index 47a0b8f..f3a2006 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/labels-batches-toolbar.inc @@ -46,7 +46,13 @@ } }; function Add() { - window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=&type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes'); + var barcodes = document.getElementById("barcode"); + if (barcodes.value == '') { + window.open("/cgi-bin/koha/labels/label-item-search.pl?batch_id=&type=labels",'FindABibIndex','width=875,height=400,toolbar=no,scrollbars=yes'); + } + else { + document.forms["add_by_barcode"].submit(); + } }; function DeDuplicate() { window.location = "/cgi-bin/koha/labels/label-edit-batch.pl?op=de_duplicate&batch_id="; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tmpl index df1f556..7ca0d02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tmpl @@ -1,9 +1,26 @@ + Koha › Tools › Labels › Manage Label Batches + - +
                Mappings for this frameworkMappings for the default framework
                Field MARC Field
                -

                There are no items in Batch yet

                -

                Use the toolbar above to add items.

                +
                +
                1. +
                  +

                  There are no items in Batch yet

                  +

                  Add items by barcode using the text area above or leave empty to add via item search.

                  +
                  +
                +
        diff --git a/labels/label-edit-batch.pl b/labels/label-edit-batch.pl index 94d56b4..370807c 100755 --- a/labels/label-edit-batch.pl +++ b/labels/label-edit-batch.pl @@ -27,6 +27,7 @@ use CGI; use C4::Auth qw(get_template_and_user); use C4::Output qw(output_html_with_http_headers); use C4::Branch qw(get_branch_code_from_name); +use C4::Items qw(GetItemnumberFromBarcode); use C4::Creators 1.000000; use C4::Labels 1.000000; @@ -57,7 +58,8 @@ my $display_columns = [ {_label_number => {label => 'Label Number', link_field my $op = $cgi->param('op') || 'edit'; my $batch_id = $cgi->param('element_id') || $cgi->param('batch_id') || undef; my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); -my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); +my @item_numbers = $cgi->param('item_number') || (); +my $barcode = $cgi->param('barcode') if $cgi->param('barcode'); my $branch_code = get_branch_code_from_name($template->param('LoginBranchname')); @@ -76,6 +78,15 @@ elsif ($op eq 'delete') { $errstr = "batch $batch_id was not deleted." if $err; } elsif ($op eq 'add') { + if ($barcode) { + my @barcodes = split /\n/, $barcode; # $barcode is effectively passed in as a separated list + foreach my $number (@barcodes) { + $number =~ s/\r$//; # strip any naughty return chars + if (my $item_number = GetItemnumberFromBarcode($number)) { # we must test in case an invalid barcode is passed in; we effectively disgard them atm + push @item_numbers, $item_number; + } + } + } $batch = C4::Labels::Batch->retrieve(batch_id => $batch_id); $batch = C4::Labels::Batch->new(branch_code => $branch_code) if $batch == -2; if ($branch_code){ -- 1.7.0 From gmcharlt at gmail.com Tue Oct 26 15:27:51 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 09:27:51 -0400 Subject: [Koha-patches] [PATCH] [SIGNED OFF] Fix for Bug 5075 - Terms not highlighted w/ xslt on In-Reply-To: <1284048464-30992-1-git-send-email-ian.walls@bywatersolutions.com> References: <1284048464-30992-1-git-send-email-ian.walls@bywatersolutions.com> Message-ID: Hi, On Thu, Sep 9, 2010 at 12:07 PM, Ian Walls wrote: > From: Owen Leonard > > - XSLT didn't contain the class markup which acts as a hook > ?for the JavaScript highlighting system. > - Standard results page also contained a typo which > ?prevented data other than title and author from > ?being highlighted This patch has a broader effect than is desirable. For example, try a search on 'a'. Besides the letter 'a' being highlighted in strings coming from the bib records, it is also highlighted elsewhere - i.e., the a's in "Action: Add to Cart", etc. Still, this is getting close. I have pushed this to a topic branch called new/bug5075 in the public repo for further work. Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Tue Oct 26 15:28:50 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 09:28:50 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 6/6] Fix for Bug 5223, 'related subjects' should read 'subjects' Message-ID: <1288099730-25404-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Ian Walls Signed-off-by: Galen Charlton --- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl index 4756615..f4bc51f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ -361,7 +361,7 @@ - Related Subjects: + Subject(s): diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index 95d3303..e31dbe7 100755 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -381,7 +381,7 @@ - Related Subjects: + Subject(s): -- 1.7.0 From gmcharlt at gmail.com Tue Oct 26 15:58:04 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 09:58:04 -0400 Subject: [Koha-patches] [PATCH] Fix for Bug 5175, XSL view doesn't link publisher name to search In-Reply-To: <1282755094-14299-1-git-send-email-oleonard@myacpl.org> References: <1282755094-14299-1-git-send-email-oleonard@myacpl.org> Message-ID: Hi, On Wed, Aug 25, 2010 at 12:51 PM, Owen Leonard wrote: > This patch fixes the bug in both the OPAC and staff client This needs a bit more work - with the patch for 5187 in head, the default merge of this patch would result in a display that lists the publisher's name twice: Publisher: Routledge, New York : Routledge, 2008 . Regards, Galen -- Galen Charlton gmcharlt at gmail.com From gmcharlt at gmail.com Tue Oct 26 16:17:48 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 10:17:48 -0400 Subject: [Koha-patches] The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup Message-ID: <1288102668-26033-1-git-send-email-gmcharlt@gmail.com> are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git signoffs Chris Nighswonger (1): Bug 5227 [3.4] Enhance the label batch edit interface Colin Campbell (1): Bug 5315: Remove references to obsolete variable nbstatements Nicole Engard (1): bug 5235 : circ receipt should include name Owen Leonard (3): Fix for Bug 5254 - no need to scroll left to right on acq z search Fix for Bug 4261 - keyword mapping should show which framework the map is for Fix for Bug 5223, 'related subjects' should read 'subjects' acqui/z3950_search.pl | 9 ++++- admin/fieldmapping.pl | 10 ++++- authorities/authorities-home.pl | 2 - cataloguing/z3950_search.pl | 11 ++++- .../prog/en/includes/auth-finder-search.inc | 1 - .../prog/en/includes/authorities-search.inc | 3 - .../prog/en/includes/labels-batches-toolbar.inc | 8 +++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 +++++++++++++++---- .../prog/en/modules/admin/fieldmapping.tmpl | 8 ++-- .../prog/en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- .../prog/en/modules/labels/label-bib-search.tmpl | 3 +- .../prog/en/modules/labels/label-edit-batch.tmpl | 44 ++++++++++++++++++- .../en/modules/members/moremember-receipt.tmpl | 3 +- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/modules/opac-authorities-home.tmpl | 1 - .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- labels/label-edit-batch.pl | 13 +++++- 17 files changed, 138 insertions(+), 41 deletions(-) From gmcharlt at gmail.com Tue Oct 26 16:21:54 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 10:21:54 -0400 Subject: [Koha-patches] Pull request - git://git.librarypolice.com/git/koha-galen.git signoffs Message-ID: <1288102914-26303-1-git-send-email-gmcharlt@gmail.com> The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git signoffs Chris Nighswonger (1): Bug 5227 [3.4] Enhance the label batch edit interface Colin Campbell (1): Bug 5315: Remove references to obsolete variable nbstatements Nicole Engard (1): bug 5235 : circ receipt should include name Owen Leonard (3): Fix for Bug 5254 - no need to scroll left to right on acq z search Fix for Bug 4261 - keyword mapping should show which framework the map is for Fix for Bug 5223, 'related subjects' should read 'subjects' acqui/z3950_search.pl | 9 ++++- admin/fieldmapping.pl | 10 ++++- authorities/authorities-home.pl | 2 - cataloguing/z3950_search.pl | 11 ++++- .../prog/en/includes/auth-finder-search.inc | 1 - .../prog/en/includes/authorities-search.inc | 3 - .../prog/en/includes/labels-batches-toolbar.inc | 8 +++- .../prog/en/modules/acqui/z3950_search.tmpl | 42 +++++++++++++++---- .../prog/en/modules/admin/fieldmapping.tmpl | 8 ++-- .../prog/en/modules/cataloguing/z3950_search.tmpl | 17 ++++---- .../prog/en/modules/labels/label-bib-search.tmpl | 3 +- .../prog/en/modules/labels/label-edit-batch.tmpl | 44 ++++++++++++++++++- .../en/modules/members/moremember-receipt.tmpl | 3 +- .../prog/en/xslt/MARC21slim2intranetDetail.xsl | 2 +- .../prog/en/modules/opac-authorities-home.tmpl | 1 - .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 2 +- labels/label-edit-batch.pl | 13 +++++- 17 files changed, 138 insertions(+), 41 deletions(-) From gmcharlt at gmail.com Tue Oct 26 18:16:28 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Tue, 26 Oct 2010 12:16:28 -0400 Subject: [Koha-patches] Pull request - git://git.librarypolice.com/git/koha-galen.git background-jobs-tested Message-ID: <1288109788-29408-1-git-send-email-gmcharlt@gmail.com> The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git background-jobs-tested Galen Charlton (2): fix use of outdated boilerplate bug 5309: tweak so that background progress doesn't exit immediately Srdjan Jankovic (2): bug5027: skip unticked checkboxes when submitting in the background. bug 5309: Adjust progres bar .../prog/en/includes/background-job.inc | 6 +- .../intranet-tmpl/prog/en/modules/test/README | 1 + .../prog/en/modules/test/progressbar.tmpl | 43 ++++++++ test/README | 3 + test/progressbar.pl | 55 ++++++++++ test/progressbarsubmit.pl | 104 ++++++++++++++++++++ test/search.pl | 74 ++++++++++++++ 7 files changed, 283 insertions(+), 3 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/test/README create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/test/progressbar.tmpl create mode 100644 test/README create mode 100755 test/progressbar.pl create mode 100755 test/progressbarsubmit.pl create mode 100755 test/search.pl From gmcharlt at gmail.com Wed Oct 27 13:48:22 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 27 Oct 2010 07:48:22 -0400 Subject: [Koha-patches] [PATCH] remove unused template include Message-ID: <1288180102-31466-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../prog/en/includes/label-status.inc | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/label-status.inc diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/label-status.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/label-status.inc deleted file mode 100644 index 3202ad4..0000000 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/label-status.inc +++ /dev/null @@ -1,8 +0,0 @@ -
        -

        Active Settings

        - - - - -
        Layout:No Layout Specified: Select a Label Layout
        Template: No Template Specified: Select a Label Template
        Batch: ">Create a new batch
        -
        -- 1.7.0 From gmcharlt at gmail.com Wed Oct 27 14:24:04 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 27 Oct 2010 08:24:04 -0400 Subject: [Koha-patches] [PATCH 3/3] bug 5301: improve escaping of XML characters in bib output In-Reply-To: <1288182244-32037-1-git-send-email-gmcharlt@gmail.com> References: <1288182244-32037-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288182244-32037-2-git-send-email-gmcharlt@gmail.com> <, >, ', or " in an item call number will no longer make the bib displays break when using XSLT mode. Added a new routine to C4::Koha, xml_escape(), to implement converting &, <, >, ', and " to their corresponding entities. Patch loosely based on work done by Daniel Latr?moli?re Signed-off-by: Galen Charlton --- C4/Koha.pm | 20 ++++++++++++++++++++ C4/XSLT.pm | 5 ++--- t/Koha.t | 8 +++++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index dc2bcfa..bd5f5e7 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -61,6 +61,7 @@ BEGIN { &GetNormalizedISBN &GetNormalizedEAN &GetNormalizedOCLCNumber + &xml_escape $DEBUG ); @@ -1190,6 +1191,25 @@ sub GetKohaAuthorisedValuesFromField { } } +=head2 xml_escape + + my $escaped_string = C4::Koha::xml_escape($string); + +Convert &, <, >, ', and " in a string to XML entities + +=cut + +sub xml_escape { + my $str = shift; + return '' unless defined $str; + $str =~ s/&/&/g; + $str =~ s//>/g; + $str =~ s/'/'/g; + $str =~ s/"/"/g; + return $str; +} + =head2 display_marc_indicators my $display_form = C4::Koha::display_marc_indicators($field); diff --git a/C4/XSLT.pm b/C4/XSLT.pm index 1c45e44..ddc9077 100644 --- a/C4/XSLT.pm +++ b/C4/XSLT.pm @@ -210,9 +210,8 @@ sub buildKohaItemsNamespace { } else { $status = "available"; } - my $homebranch = $branches->{$item->{homebranch}}->{'branchname'}; - my $itemcallnumber = $item->{itemcallnumber} || ''; - $itemcallnumber =~ s/\&/\&\;/g; + my $homebranch = xml_escape($branches->{$item->{homebranch}}->{'branchname'}); + my $itemcallnumber = xml_escape($item->{itemcallnumber}); $xml.= "$homebranch". "$status". "".$itemcallnumber."" diff --git a/t/Koha.t b/t/Koha.t index c06a406..a042f47 100755 --- a/t/Koha.t +++ b/t/Koha.t @@ -2,7 +2,7 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 5; use_ok('C4::Koha'); @@ -13,3 +13,9 @@ my $date = "01/01/2002"; my $newdate = &slashifyDate("2002-01-01"); ok($date eq $newdate, 'slashifyDate'); + +my $undef = undef; +is(xml_escape($undef), '', 'xml_escape() returns empty string on undef input'); +my $str = q{'"&<>'}; +is(xml_escape($str), ''"&<>'', 'xml_escape() works as expected'); +is($str, q{'"&<>'}, '... and does not change input in place'); -- 1.7.0 From gmcharlt at gmail.com Wed Oct 27 14:24:03 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Wed, 27 Oct 2010 08:24:03 -0400 Subject: [Koha-patches] [PATCH 2/3] bug 5318: fix value of r4 rank weight Message-ID: <1288182244-32037-1-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- etc/zebradb/ccl.properties | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 231c420..b780925 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -1067,7 +1067,7 @@ dt-map 1=8700 r1 9=32 r2 9=28 r3 9=26 -r4 9=10 +r4 9=24 r5 9=22 r6 9=20 r7 9=18 -- 1.7.0 From chrisc at catalyst.net.nz Thu Oct 28 00:33:50 2010 From: chrisc at catalyst.net.nz (Chris Cormack) Date: Thu, 28 Oct 2010 11:33:50 +1300 Subject: [Koha-patches] [PATCH] Analytical Records - Adding display of item information in catalog search results In-Reply-To: <1288084378-11355-1-git-send-email-amit.gupta@osslabs.biz> References: <1288084378-11355-1-git-send-email-amit.gupta@osslabs.biz> Message-ID: <20101027223350.GU4325@rorohiko> Hi Amit Unfortunately this patch does not apply Applying: Analytical Records - Adding display of item information in catalog search results fatal: sha1 information is lacking or useless (C4/Items.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Analytical Records - Adding display of item information in catalog search results Can you try rebasing it and send again Chris -- Chris Cormack Catalyst IT Ltd. +64 4 803 2238 PO Box 11-053, Manners St, Wellington 6142, New Zealand -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: From savitra.sirohi at osslabs.biz Thu Oct 28 06:00:31 2010 From: savitra.sirohi at osslabs.biz (savitra sirohi) Date: Thu, 28 Oct 2010 09:30:31 +0530 Subject: [Koha-patches] [PATCH] Analytical Records - Adding display of item information in catalog search results In-Reply-To: <20101027223350.GU4325@rorohiko> References: <1288084378-11355-1-git-send-email-amit.gupta@osslabs.biz> <20101027223350.GU4325@rorohiko> Message-ID: Hi Chris, we needed to send fresh patches in any case as we are redoing the feature in a different way. Process question - should we send incremental patches or should we send patches formatted against the latest master. I am guessing you see this error because you had not apply the earlier patch Amit had sent. Thanks, Savitra 2010/10/28 Chris Cormack : > Hi Amit > > Unfortunately this patch does not apply > > Applying: Analytical Records - Adding display of item information in > catalog search results > fatal: sha1 information is lacking or useless (C4/Items.pm). > Repository lacks necessary blobs to fall back on 3-way merge. > Cannot fall back to three-way merge. > Patch failed at 0001 Analytical Records - Adding display of item > information in catalog search results > > Can you try rebasing it and send again > > Chris > -- > Chris Cormack > Catalyst IT Ltd. > +64 4 803 2238 > PO Box 11-053, Manners St, Wellington 6142, New Zealand > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAkzIqM4ACgkQZgbcHEvgMLPF9wCeMetuUYVXpSM0+3hYxRoZ8zCd > loMAn0WI1n+9zr5IQLIXzF7LX5AuvpJS > =83M0 > -----END PGP SIGNATURE----- > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From gmcharlt at gmail.com Thu Oct 28 13:57:32 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 07:57:32 -0400 Subject: [Koha-patches] [PATCH] bug 5146: patron import files require header row Message-ID: <1288267052-2632-1-git-send-email-gmcharlt@gmail.com> Fixed help text on this point as well as options for supplying dates in the input file. Signed-off-by: Galen Charlton --- .../prog/en/modules/tools/import_borrowers.tmpl | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tmpl index ad3b663..0e409b6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tmpl @@ -142,8 +142,9 @@

        Notes:

          +
        • The first line in the file must be a header row defining which columns you are supplying in the import file.
        • Download a starter CSV file with all the columns here. Values are comma-separated.
        • -
        • OR format your file in CSV format with the following fields:
          • +
          • OR choose which fields you want to supply from the following list:
            • '',
          • @@ -151,9 +152,10 @@
          • The fields 'branchcode' and 'categorycode' are required and must match valid entries in your database.
          • -
          • 'password' should be stored in plaintext, and will be converted to a md5 hash (if your passwords are already encrypted, talk to your systems administrator about options).
          • -
          • Date formats should match your system preference, and must be zero-padded, e.g. '01/02/2008'.
          • -
          • You may optionally include a header row, defining which columns you are supplying in the import file.
          • +
          • 'password' should be stored in plaintext, and will be converted to a MD5 hash (if your passwords are already encrypted, talk to your system administrator about options).
          • +
          • Date formats should match your system preference, and must be zero-padded, e.g. '01/02/2008'. Alternatively, +you can supply dates in ISO format (e.g., '2010-10-28'). +
        -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 14:09:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 08:09:47 -0400 Subject: [Koha-patches] [PATCH] bug 5243: avoid crash when saving authority records on certain setups Message-ID: <1288267787-2862-1-git-send-email-gmcharlt@gmail.com> This does not seem to occur on all platforms - C4::Search exports SimpleSearch() by default - but adding the 'C4::Search::' qualifier certainly doesn't hurt things. Patch by Fridolyn Somers Signed-off-by: Galen Charlton --- C4/AuthoritiesMarc.pm | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index b4a0d78..d07cca4 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -901,7 +901,7 @@ sub FindDuplicateAuthority { $_->[1]=~s/$filtervalues/ /g; $query.= " and he,wrdl=\"".$_->[1]."\"" if ($_->[0]=~/[A-z]/); } } - my ($error, $results, $total_hits)=SimpleSearch( $query, 0, 1, [ "authorityserver" ] ); + my ($error, $results, $total_hits) = C4::Search::SimpleSearch( $query, 0, 1, [ "authorityserver" ] ); # there is at least 1 result => return the 1st one if (@$results>0) { my $marcrecord = MARC::File::USMARC::decode($results->[0]); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 14:45:53 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 08:45:53 -0400 Subject: [Koha-patches] [PATCH] bug 4903: enable OAI-DC output when install done in standard mode Message-ID: <1288269953-3510-1-git-send-email-gmcharlt@gmail.com> Based on patch by Tom?s Cohen Arazi , revised to work regardless of the installation mode. Signed-off-by: Galen Charlton --- opac/oai.pl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opac/oai.pl b/opac/oai.pl index b434980..038b6d1 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -459,10 +459,10 @@ sub stylesheet { unless ( $stylesheet ) { my $xsl_file = $self->{ conf } ? $self->{ conf }->{ format }->{ $format }->{ xsl_file } - : ( C4::Context->config('intranetdir') . - "/koha-tmpl/intranet-tmpl/prog/en/xslt/" . + : ( C4::Context->config('intrahtdocs') . + '/prog/en/xslt/' . C4::Context->preference('marcflavour') . - "slim2OAIDC.xsl" ); + 'slim2OAIDC.xsl' ); my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $style_doc = $parser->parse_file( $xsl_file ); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:05:21 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:05:21 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5219: tidy cleanup_database.pl In-Reply-To: <1288271121-4043-2-git-send-email-gmcharlt@gmail.com> References: <1288271121-4043-1-git-send-email-gmcharlt@gmail.com> <1288271121-4043-2-git-send-email-gmcharlt@gmail.com> Message-ID: <1288271121-4043-3-git-send-email-gmcharlt@gmail.com> Includes a bit of cleanup of the enhancement patch for bug 5074 - adding comments about old and new behavior isn't necessary for such small changes. Signed-off-by: Galen Charlton --- misc/cronjobs/cleanup_database.pl | 93 +++++++++++++++++++------------------ 1 files changed, 47 insertions(+), 46 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index 7d5bcd1..1333111 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -30,6 +30,7 @@ BEGIN { use C4::Context; use C4::Dates; + #use C4::Debug; #use C4::Letters; #use File::Spec; @@ -43,7 +44,7 @@ Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu other options --sessions purge the sessions table. If you use this while users are logged into Koha, they will have to reconnect. - --sessdays DAYS purge only sessions older than DAYS days (use together with sessions parameter). + --sessdays DAYS purge only sessions older than DAYS days (use together with sessions parameter). -v --verbose will cause the script to give you a bit more information about the run. --zebraqueue DAYS purge completed entries from the zebraqueue from @@ -53,14 +54,14 @@ USAGE exit $_[0]; } -my ($help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail); +my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail ); GetOptions( - 'h|help' => \$help, - 'sessions' => \$sessions, - 'sessdays:i' => \$sess_days, - 'v|verbose' => \$verbose, - 'm|mail' => \$mail, + 'h|help' => \$help, + 'sessions' => \$sessions, + 'sessdays:i' => \$sess_days, + 'v|verbose' => \$verbose, + 'm|mail' => \$mail, 'zebraqueue:i' => \$zebraqueue_days, ) || usage(1); @@ -68,7 +69,7 @@ if ($help) { usage(0); } -if (!($sessions || $zebraqueue_days || $mail)){ +if ( !( $sessions || $zebraqueue_days || $mail ) ) { print "You did not specify any cleanup work for the script to do.\n\n"; usage(1); } @@ -79,8 +80,8 @@ my $sth; my $sth2; my $count; -if ($sessions && !$sess_days) { #old behavior - if ($verbose){ +if ( $sessions && !$sess_days ) { + if ($verbose) { print "Session purge triggered.\n"; $sth = $dbh->prepare("SELECT COUNT(*) FROM sessions"); $sth->execute() or die $dbh->errstr; @@ -88,35 +89,36 @@ if ($sessions && !$sess_days) { #old behavior print "$count_arr[0] entries will be deleted.\n"; } $sth = $dbh->prepare("TRUNCATE sessions"); - $sth->execute() or die $dbh->errstr;; - if ($verbose){ + $sth->execute() or die $dbh->errstr; + if ($verbose) { print "Done with session purge.\n"; } -} -elsif($sessions && $sess_days>0) { #new behavior with number of days old - if ($verbose){ +} elsif ( $sessions && $sess_days > 0 ) { + if ($verbose) { print "Session purge triggered with days>$sess_days.\n"; } RemoveOldSessions(); - if ($verbose){ + if ($verbose) { print "Done with session purge with days>$sess_days.\n"; } } -if ($zebraqueue_days){ +if ($zebraqueue_days) { $count = 0; - if ($verbose){ + if ($verbose) { print "Zebraqueue purge triggered for $zebraqueue_days days.\n"; } - $sth = $dbh->prepare("SELECT id,biblio_auth_number,server,time FROM zebraqueue - WHERE done=1 and time < date_sub(curdate(), interval ? day)"); + $sth = $dbh->prepare( + "SELECT id,biblio_auth_number,server,time FROM zebraqueue + WHERE done=1 and time < date_sub(curdate(), interval ? day)" + ); $sth->execute($zebraqueue_days) or die $dbh->errstr; $sth2 = $dbh->prepare("DELETE FROM zebraqueue WHERE id=?"); - while (my $record = $sth->fetchrow_hashref){ - $sth2->execute($record->{id}) or die $dbh->errstr; + while ( my $record = $sth->fetchrow_hashref ) { + $sth2->execute( $record->{id} ) or die $dbh->errstr; $count++; } - if ($verbose){ + if ($verbose) { print "$count records were deleted.\nDone with zebraqueue purge.\n"; } } @@ -135,29 +137,28 @@ if ($mail) { exit(0); sub RemoveOldSessions { - my ($id, $a_session, $limit, $lasttime); - $limit= time() - 24*3600*$sess_days; - - $sth= $dbh->prepare("SELECT id, a_session FROM sessions"); - $sth->execute or die $dbh->errstr; - $sth->bind_columns(\$id, \$a_session); - $sth2 = $dbh->prepare("DELETE FROM sessions WHERE id=?"); - $count=0; - - while ($sth->fetch) { - $lasttime=0; - if($a_session =~ /lasttime:\s+(\d+)/) { - $lasttime= $1; - } - elsif($a_session =~ /(ATIME|CTIME):\s+(\d+)/ ) { - $lasttime= $2; + my ( $id, $a_session, $limit, $lasttime ); + $limit = time() - 24 * 3600 * $sess_days; + + $sth = $dbh->prepare("SELECT id, a_session FROM sessions"); + $sth->execute or die $dbh->errstr; + $sth->bind_columns( \$id, \$a_session ); + $sth2 = $dbh->prepare("DELETE FROM sessions WHERE id=?"); + $count = 0; + + while ( $sth->fetch ) { + $lasttime = 0; + if ( $a_session =~ /lasttime:\s+(\d+)/ ) { + $lasttime = $1; + } elsif ( $a_session =~ /(ATIME|CTIME):\s+(\d+)/ ) { + $lasttime = $2; + } + if ( $lasttime && $lasttime < $limit ) { + $sth2->execute($id) or die $dbh->errstr; + $count++; + } } - if($lasttime && $lasttime < $limit) { - $sth2->execute($id) or die $dbh->errstr; - $count++; + if ($verbose) { + print "$count sessions were deleted.\n"; } - } - if ($verbose){ - print "$count sessions were deleted.\n"; - } } -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:05:19 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:05:19 -0400 Subject: [Koha-patches] [PATCH] bug 4903: enable OAI-DC output when install done in standard mode Message-ID: <1288271121-4043-1-git-send-email-gmcharlt@gmail.com> Based on patch by Tom?s Cohen Arazi , revised to work regardless of the installation mode. Signed-off-by: Galen Charlton --- opac/oai.pl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opac/oai.pl b/opac/oai.pl index b434980..038b6d1 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -459,10 +459,10 @@ sub stylesheet { unless ( $stylesheet ) { my $xsl_file = $self->{ conf } ? $self->{ conf }->{ format }->{ $format }->{ xsl_file } - : ( C4::Context->config('intranetdir') . - "/koha-tmpl/intranet-tmpl/prog/en/xslt/" . + : ( C4::Context->config('intrahtdocs') . + '/prog/en/xslt/' . C4::Context->preference('marcflavour') . - "slim2OAIDC.xsl" ); + 'slim2OAIDC.xsl' ); my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $style_doc = $parser->parse_file( $xsl_file ); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:05:20 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:05:20 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Enhancement 5074 (Adding possibility to cleanup_database.pl to purge only older sessions) [UPDATED for master] In-Reply-To: <1288271121-4043-1-git-send-email-gmcharlt@gmail.com> References: <1288271121-4043-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288271121-4043-2-git-send-email-gmcharlt@gmail.com> From: Marcel de Rooy Currently, the misc/cronjobs script cleanup_database truncates the session table (deleting all records, including active sessions). With an additional parameter sessdays, this behavior could be changed or (perhaps better) extended. If the parameter sessdays is passed along with a number of days, the script only deletes older session records. This is accomplished by examining the values of lasttime, atime or ctime in the record. So, calling the script like: ./cleanup_database.pl -v -sessions -sessdays 7 will only delete sessions records older than 7 days. The "old style" call ./cleanup_database.pl -v -sessions still works too and truncates the table as before. Signed-off-by: Galen Charlton --- misc/cronjobs/cleanup_database.pl | 45 ++++++++++++++++++++++++++++++++++-- 1 files changed, 42 insertions(+), 3 deletions(-) diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index f811b24..7d5bcd1 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -37,12 +37,13 @@ use Getopt::Long; sub usage { print STDERR < \$help, 'sessions' => \$sessions, + 'sessdays:i' => \$sess_days, 'v|verbose' => \$verbose, 'm|mail' => \$mail, 'zebraqueue:i' => \$zebraqueue_days, @@ -77,7 +79,7 @@ my $sth; my $sth2; my $count; -if ($sessions) { +if ($sessions && !$sess_days) { #old behavior if ($verbose){ print "Session purge triggered.\n"; $sth = $dbh->prepare("SELECT COUNT(*) FROM sessions"); @@ -91,6 +93,15 @@ if ($sessions) { print "Done with session purge.\n"; } } +elsif($sessions && $sess_days>0) { #new behavior with number of days old + if ($verbose){ + print "Session purge triggered with days>$sess_days.\n"; + } + RemoveOldSessions(); + if ($verbose){ + print "Done with session purge with days>$sess_days.\n"; + } +} if ($zebraqueue_days){ $count = 0; @@ -122,3 +133,31 @@ if ($mail) { print "Done with purging the mail queue.\n" if ($verbose); } exit(0); + +sub RemoveOldSessions { + my ($id, $a_session, $limit, $lasttime); + $limit= time() - 24*3600*$sess_days; + + $sth= $dbh->prepare("SELECT id, a_session FROM sessions"); + $sth->execute or die $dbh->errstr; + $sth->bind_columns(\$id, \$a_session); + $sth2 = $dbh->prepare("DELETE FROM sessions WHERE id=?"); + $count=0; + + while ($sth->fetch) { + $lasttime=0; + if($a_session =~ /lasttime:\s+(\d+)/) { + $lasttime= $1; + } + elsif($a_session =~ /(ATIME|CTIME):\s+(\d+)/ ) { + $lasttime= $2; + } + if($lasttime && $lasttime < $limit) { + $sth2->execute($id) or die $dbh->errstr; + $count++; + } + } + if ($verbose){ + print "$count sessions were deleted.\n"; + } +} -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:23:12 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:23:12 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5236: remove hidemytags from CSS as well In-Reply-To: <1288272192-4954-1-git-send-email-gmcharlt@gmail.com> References: <1288272192-4954-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288272192-4954-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 5142dd2..21d580f 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -945,10 +945,6 @@ a.cancel { padding-left : 1em; } -a.hidemytags { - padding-left : 2em; -} - .resultscontrol, .resultscontrol select { font-size: 90%; } @@ -1957,4 +1953,4 @@ div.ft { font-size:90%; list-style:disc outside url("../../images/item-bullet.gif"); padding:0.2em 0; -} \ No newline at end of file +} -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:23:11 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:23:11 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED OFF] Fix for Bug 5236 - "hide my tags" link does nothing Message-ID: <1288272192-4954-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Removing the link. The suggested functionality doesn't seem useful. Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl index 6c3cb94..2e6ba39 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-tags.tmpl @@ -79,16 +79,10 @@
        Show up to " /> tags from other users. - - - Log in to see your own saved tags. - ">Show my tags - &hidemytags=1">Hide my tags -
        @@ -112,7 +106,6 @@ -

        My Tags

        @@ -132,7 +125,6 @@
        -
      -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:29:23 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:29:23 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5221 - Preselect tab containing itemtype/authval image in use Message-ID: <1288272563-5886-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- C4/Koha.pm | 4 ++++ .../prog/en/modules/admin/authorised_values.tmpl | 2 +- .../prog/en/modules/admin/itemtypes.tmpl | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/C4/Koha.pm b/C4/Koha.pm index dc2bcfa..d7ba1af 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -1,6 +1,7 @@ package C4::Koha; # Copyright 2000-2002 Katipo Communications +# Parts Copyright 2010 Nelsonville Public Library # # This file is part of Koha. # @@ -672,6 +673,7 @@ sub getImageSets { foreach my $imagesubdir ( @subdirectories ) { my @imagelist = (); # hashrefs of image info my @imagenames = _getImagesFromDirectory( File::Spec->catfile( $paths->{'staff'}{'filesystem'}, $imagesubdir ) ); + my $imagesetactive = 0; foreach my $thisimage ( @imagenames ) { push( @imagelist, { KohaImage => "$imagesubdir/$thisimage", @@ -680,8 +682,10 @@ sub getImageSets { checked => "$imagesubdir/$thisimage" eq $checked ? 1 : 0, } ); + $imagesetactive = 1 if "$imagesubdir/$thisimage" eq $checked; } push @imagesets, { imagesetname => $imagesubdir, + imagesetactive => $imagesetactive, images => \@imagelist }; } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl index 367930a..cd2cf33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl @@ -70,7 +70,7 @@
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index 4c34695..a36c4ee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,16 +162,16 @@ Item Types Administration
    5. " />
    6. -
    7. Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
    +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
      -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:35:15 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:35:15 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] BUG 5239 add space between number and words in acq search Message-ID: <1288272915-6047-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/neworderbiblio.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl index e8ef0eb..f09f474 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderbiblio.tmpl @@ -19,7 +19,7 @@ -results found + results found

      No results found

      -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:39:09 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:39:09 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5224 Remove the adjective Shopping from basket Message-ID: <1288273149-6837-1-git-send-email-gmcharlt@gmail.com> From: Colin Campbell New orders breadcrumbs were using the inappropriate term Shopping basket whereas basket is used elsewhere Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/neworderempty.tmpl | 4 ++-- .../prog/en/modules/acqui/newordersuggestion.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl index 1534e75..e1ba1c2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tmpl @@ -1,5 +1,5 @@ -Koha › Acquisitions › Shopping Basket <!-- TMPL_VAR NAME="basketno" --> › <!-- TMPL_IF name="ordernumber" -->Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --> +Koha › Acquisitions › Basket <!-- TMPL_VAR NAME="basketno" --> › <!-- TMPL_IF name="ordernumber" -->Modify order details (line #<!-- TMPL_VAR NAME="ordernumber" -->)<!-- TMPL_ELSE -->New order<!-- /TMPL_IF --> @@ -57,7 +57,7 @@ ff.submit(); - +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl index e18b89f..630d9ba 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/newordersuggestion.tmpl @@ -6,7 +6,7 @@ - +
      -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:45:04 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:45:04 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 2/2] bug 5258 change 'order' to 'order line' on receive page Message-ID: <1288273504-6956-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/parcel.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl index 9f7f11e..d3409ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tmpl @@ -179,7 +179,7 @@ Basket - Order + Order Line Summary View Record Quantity @@ -249,7 +249,7 @@ Basket - Order + Order Line Summary View Record Est cost @@ -335,7 +335,7 @@
    • - +
    • -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 15:52:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 09:52:47 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5163 change title of holds to pull page Message-ID: <1288273967-7096-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/circ/pendingreserves.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl index 7b5ea18..ca95bd3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tmpl @@ -1,5 +1,5 @@ -Koha › Circulation › Pending Holds +Koha › Circulation › Holds to Pull /lib/calendar/calendar-system.css" /> @@ -34,7 +34,7 @@ $.tablesorter.addParser({ - +
      @@ -42,7 +42,7 @@ $.tablesorter.addParser({
      -

      Pending holds placed between and

      +

      Holds to Pull placed between and

      Reported on

      The following holds have not been filled. Please retrieve them and check them in.

      -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 16:00:03 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 10:00:03 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5237: Testing renewals on patron barcodes with + signs at the end Message-ID: <1288274403-7268-1-git-send-email-gmcharlt@gmail.com> From: Liz Rea According to notes in bug, patch was originally by Chris Cormack. Signed-off-by: Liz Rea Signed-off-by: Galen Charlton --- reserve/renewscript.pl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/reserve/renewscript.pl b/reserve/renewscript.pl index 09630bd..4444e7c 100755 --- a/reserve/renewscript.pl +++ b/reserve/renewscript.pl @@ -26,6 +26,7 @@ use warnings; use CGI; use C4::Circulation; use C4::Auth; +use URI::Escape; use C4::Dates qw/format_date_in_iso/; my $input = new CGI; @@ -99,6 +100,7 @@ foreach my $barcode (@barcodes) { # redirection to the referrer page # if ($input->param('destination') eq "circ"){ + $cardnumber = uri_escape($cardnumber); print $input->redirect( '/cgi-bin/koha/circ/circulation.pl?findborrower='.$cardnumber.$failedrenews.$failedreturn ); -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 16:11:56 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 10:11:56 -0400 Subject: [Koha-patches] Pull request - git://git.koha-community.org/koha.git new/for-3.4/spelling Message-ID: <1288275116-7402-1-git-send-email-gmcharlt@gmail.com> The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup are available in the git repository at: git://git.koha-community.org/koha.git new/for-3.4/spelling Bernardo Gonzalez Kriegel (14): Misspell: Quanity -> Quantity Bug 5118: Misspelled word: Currencey Bug 5117: Misspelled word Organisztion Bug 5119: Misspelled word correspounding Bug 5121 - Misspelled words: stripts biographyl Begininning Bug 5122 - Misspelled word: transfered Additional fix Bug 5122 - Misspelled word: transfered Bug 5123 - Misspelled words: Depdending Commited flutucations Bug 5124 - Duplicate and Misspelled words: periodicy outputing Bug 5132 - Misspelled words: Acquistion Succesfully professionnal Bug 5133 - Misspelled words: reservior notifiying deleete + recieving Bug 5134 - Misspelled words: exisiting anomolies genereated Misspells: deleteing -> deleting Bug 5130 - Misspelled words: biblographic delimeter extention .../prog/en/includes/error-messages.inc | 2 +- .../prog/en/modules/acqui/neworderempty.tmpl | 2 +- .../prog/en/modules/admin/categorie.tmpl | 2 +- .../prog/en/modules/admin/checkmarc.tmpl | 8 ++++---- .../prog/en/modules/admin/currency.tmpl | 2 +- .../prog/en/modules/basket/sendbasket.tmpl | 2 +- .../value_builder/marc21_field_006.tmpl | 4 ++-- .../value_builder/marc21_field_008.tmpl | 4 ++-- .../value_builder/unimarc_field_100.tmpl | 4 ++-- .../prog/en/modules/circ/branchtransfers.tmpl | 2 +- .../prog/en/modules/circ/circulation.tmpl | 2 +- .../prog/en/modules/circ/returns.tmpl | 2 +- .../prog/en/modules/circ/waitingreserves.tmpl | 2 +- .../prog/en/modules/help/acqui/histsearch.tmpl | 5 +++-- .../prog/en/modules/help/acqui/neworderempty.tmpl | 8 ++++---- .../prog/en/modules/help/cataloguing/addbooks.tmpl | 7 ++++--- .../en/modules/help/members/member-password.tmpl | 5 +++-- .../en/modules/help/patroncards/edit-template.tmpl | 7 ++++--- .../en/modules/help/reports/borrowers_stats.tmpl | 9 ++++++--- .../en/modules/help/reports/catalogue_stats.tmpl | 7 +++++-- .../prog/en/modules/help/reports/reports-home.tmpl | 5 +++-- .../prog/en/modules/help/serials/serials-home.tmpl | 5 +++-- .../en/modules/help/serials/subscription-add.tmpl | 9 +++++---- .../en/modules/help/suggestion/suggestion.tmpl | 5 +++-- .../prog/en/modules/help/tools/holidays.tmpl | 7 ++++--- .../en/modules/help/tools/manage-marc-import.tmpl | 5 +++-- .../prog/en/modules/help/tools/overduerules.tmpl | 5 +++-- .../prog/en/modules/maint/catmaintain.tmpl | 5 +++-- .../prog/en/modules/members/memberentrygen.tmpl | 3 ++- .../prog/en/modules/members/moremember.tmpl | 2 +- .../prog/en/modules/reserve/request.tmpl | 2 +- .../en/modules/rotating_collections/addItems.tmpl | 7 ++++--- .../rotating_collections/editCollections.tmpl | 9 +++++---- .../rotating_collections/transferCollection.tmpl | 2 +- .../prog/en/modules/suggestion/suggestion.tmpl | 3 ++- .../prog/en/modules/tools/picture-upload.tmpl | 4 ++-- .../prog/en/modules/virtualshelves/sendshelf.tmpl | 2 +- .../opac-tmpl/prog/en/modules/opac-sendbasket.tmpl | 2 +- .../opac-tmpl/prog/en/modules/opac-sendshelf.tmpl | 2 +- 39 files changed, 96 insertions(+), 74 deletions(-) From gmcharlt at gmail.com Thu Oct 28 16:12:45 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 10:12:45 -0400 Subject: [Koha-patches] Pull request - git://git.koha-community.org/koha.git new/for-3.4/enh_bulkmarcimport Message-ID: <1288275165-7484-1-git-send-email-gmcharlt@gmail.com> The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup are available in the git repository at: git://git.koha-community.org/koha.git new/for-3.4/enh_bulkmarcimport Galen Charlton (1): Merge branch 'enh_bulkmarcimport' of git://gitorious.org/koha/mainline into to-push MJ Ray (1): Display available error information during bulkmarcimport misc/migration_tools/bulkmarcimport.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) From gmcharlt at gmail.com Thu Oct 28 16:24:59 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 10:24:59 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 2/2] Fix for Bug 5214 - undefined itype images cause broken image icon in request.pl Message-ID: <1288275899-7751-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Also fixes the same bug on the Itemtypes administration page. Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/itemtypes.tmpl | 2 +- .../prog/en/modules/reserve/request.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index a36c4ee..a76b4be 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -289,7 +289,7 @@ Item Types Administration - " alt="" /> + " alt="" />  ?op=add_form&itemtype="> diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 67baf2d..47ce0d1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -405,7 +405,7 @@ function checkMultiHold() { - " alt="" />
      + " alt="" />
      @@ -563,7 +563,7 @@ function checkMultiHold() { Priority -   +   Delete? -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 17:42:12 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 11:42:12 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5151 removed bolded terms in breadcrumbs Message-ID: <1288280532-8637-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../en/modules/reports/guided_reports_start.tmpl | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl index 7a24859..52f1051 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tmpl @@ -50,9 +50,9 @@ $(document).ready(function(){ ›
      ReportsGuided Reports Wizard › -Saved Reports -Create from SQL -Saved ReportsSQL View +Saved Reports +Create from SQL +Saved Reports › SQL View Saved Reports Report Build A Report › Step of 6: Choose a Module -- 1.7.0 From gmcharlt at gmail.com Thu Oct 28 17:53:51 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Thu, 28 Oct 2010 11:53:51 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5050 move language prefs to I18N/L10N tab Message-ID: <1288281231-8767-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../en/modules/admin/preferences/i18n-l10n.pref | 8 ++++++++ .../prog/en/modules/admin/preferences/opac.pref | 10 ---------- .../en/modules/admin/preferences/staff-client.pref | 4 ---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n-l10n.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n-l10n.pref index f36a264..591e6ca 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n-l10n.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n-l10n.pref @@ -9,9 +9,17 @@ I18N/L10N: iso: yyyy/mm/dd - . - + - "Enable the following languages on the staff interface:" + - pref: language + type: staff-languages + - - pref: opaclanguagesdisplay default: 0 choices: yes: Allow no: "Don't allow" - patrons to change the language they see on the OPAC. + - + - "Enable the following languages on the OPAC:" + - pref: opaclanguages + type: opac-languages diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index c844df4..2619d8c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -6,16 +6,6 @@ OPAC: choices: opac-templates - theme on the OPAC. - - - "Enable the following languages on the OPAC:" - - pref: opaclanguages - type: opac-languages - - - - pref: opaclanguagesdisplay - choices: - yes: Allow - no: "Don't allow" - - patrons to select their language on the OPAC. - - - "The OPAC is located at http://" - pref: OPACBaseURL class: url diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff-client.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff-client.pref index 4abe419..324f8af 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff-client.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff-client.pref @@ -6,10 +6,6 @@ Staff Client: choices: staff-templates - theme on the staff interface. - - - "Enable the following languages on the staff interface:" - - pref: language - type: staff-languages - - - "The staff client is located at http://" - pref: staffClientBaseURL class: url -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 13:40:37 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 07:40:37 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5162: follow-up patch to not clear hidden input setting attribute type In-Reply-To: <1288352437-10465-1-git-send-email-gmcharlt@gmail.com> References: <1288352437-10465-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288352437-10465-2-git-send-email-gmcharlt@gmail.com> Otherwise, can't saved new attributes set from a cloned input or select control. Signed-off-by: Galen Charlton --- .../prog/en/modules/members/memberentrygen.tmpl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index baba4c8..e147d53 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -46,7 +46,8 @@ $("select", clone).attr('name', function() { return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); }); - $("input,select", clone).attr('value',''); + $("input#patron_attr_" + newId, clone).attr('value',''); + $("select#patron_attr_" + newId, clone).attr('value',''); original.parentNode.insertBefore(clone, original.nextSibling); } -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 13:40:36 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 07:40:36 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] Fix for Bug 5162, patron attributes 'new' link should create blank value Message-ID: <1288352437-10465-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/members/memberentrygen.tmpl | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index b21d35a..baba4c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -46,6 +46,7 @@ $("select", clone).attr('name', function() { return this.name.replace(/patron_attr_\d+/, 'patron_attr_' + newId); }); + $("input,select", clone).attr('value',''); original.parentNode.insertBefore(clone, original.nextSibling); } -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 13:47:33 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 07:47:33 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5177 Selecting default sort result by syspref Message-ID: <1288352853-10844-1-git-send-email-gmcharlt@gmail.com> From: Fr?d?ric Demians Syspref .pref file was defining a code for descending order which wasn't expected by .tmpl files... 'desc' instead of 'dsc'. Signed-off-by: Galen Charlton --- .../en/modules/admin/preferences/searching.pref | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref index 33362a6..0660e8c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -88,7 +88,7 @@ Searching: - pref: defaultSortOrder choices: asc: ascending. - desc: descending. + dsc: descending. az: from A to Z. za: from Z to A. - @@ -112,7 +112,7 @@ Searching: - pref: OPACdefaultSortOrder choices: asc: ascending. - desc: descending. + dsc: descending. az: from A to Z. za: from Z to A. - -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 13:53:34 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 07:53:34 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5192 Enhancement to add new index for 658 curriculum field Message-ID: <1288353214-11650-1-git-send-email-gmcharlt@gmail.com> From: dev2 Creates new curriculum index for 658 subfields a,b,c and search option in Advanced search (under More Options). Also modifies the installer files to make 658abc display (they were hidden in the frameworks) and to create the new indexes. The 658 already displays as part of the staff/OPAC subject display line. Signed-off-by: Galen Charlton --- etc/zebradb/biblios/etc/bib1.att | 3 + etc/zebradb/ccl.properties | 2 + etc/zebradb/marc_defs/marc21/biblios/record.abs | 3 + .../marc21/mandatory/marc21_framework_DEFAULT.sql | 6 +- .../optional/marc21_simple_bib_frameworks.sql | 48 ++++++++++---------- .../prog/en/includes/search_indexes.inc | 1 + .../opac-tmpl/prog/en/modules/opac-advsearch.tmpl | 1 + 7 files changed, 37 insertions(+), 27 deletions(-) diff --git a/etc/zebradb/biblios/etc/bib1.att b/etc/zebradb/biblios/etc/bib1.att index d47b2a3..97c3d68 100644 --- a/etc/zebradb/biblios/etc/bib1.att +++ b/etc/zebradb/biblios/etc/bib1.att @@ -189,3 +189,6 @@ att 9903 lex att 9904 arl att 9013 arp att 9520 Item +# Curriculum +att 9658 curriculum + diff --git a/etc/zebradb/ccl.properties b/etc/zebradb/ccl.properties index 231c420..2f923ae 100644 --- a/etc/zebradb/ccl.properties +++ b/etc/zebradb/ccl.properties @@ -1052,6 +1052,8 @@ arl 1=9904 r=r #Accelerated Reader Point arp 1=9013 r=r +# Curriculum +curriculum 1=9658 ## Statuses popularity 1=issues diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs index 6cf37ba..4874bfd 100644 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -188,6 +188,9 @@ melm 656$9 Koha-Auth-Number melm 656 Subject melm 657$9 Koha-Auth-Number melm 657 Subject +melm 658$a curriculum:w,curriculum:p +melm 658$b curriculum:w,curriculum:p +melm 658$c curriculum:w,curriculum:p melm 690$9 Koha-Auth-Number melm 690 Subject,Subject:p diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql index a5e7d77..3cbc997 100644 --- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql +++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql @@ -1895,9 +1895,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -6, '', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, '', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, 0, '', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, '', '', '', NULL), diff --git a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql index 8821aa2..78a18d6 100644 --- a/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql +++ b/installer/data/mysql/en/marcflavour/marc21/optional/marc21_simple_bib_frameworks.sql @@ -1920,9 +1920,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'BKS', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'BKS', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'BKS', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'BKS', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'BKS', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'BKS', '', '', NULL), @@ -5841,9 +5841,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'CF', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'CF', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'CF', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'CF', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'CF', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'CF', '', '', NULL), @@ -9761,9 +9761,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'SR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'SR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'SR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'SR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'SR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'SR', '', '', NULL), @@ -13681,9 +13681,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'VR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'VR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'VR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'VR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'VR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'VR', '', '', NULL), @@ -17599,9 +17599,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'AR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'AR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'AR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'AR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'AR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'AR', '', '', NULL), @@ -21517,9 +21517,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'KT', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'KT', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'KT', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'KT', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'KT', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'KT', '', '', NULL), @@ -25436,9 +25436,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'IR', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'IR', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'IR', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'IR', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'IR', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'IR', '', '', NULL), @@ -29351,9 +29351,9 @@ INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian` ('658', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), ('658', '6', 'Linkage', 'Linkage', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), ('658', '8', 'Field link and sequence number', 'Field link and sequence number', 1, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), - ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, -1, 'SER', '', '', NULL), - ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), - ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), + ('658', 'a', 'Main curriculum objective', 'Main curriculum objective', 0, 0, '', 6, '', 'TOPIC_TERM', '', NULL, 0, 'SER', '', '', NULL), + ('658', 'b', 'Subordinate curriculum objective', 'Subordinate curriculum objective', 1, 0, '', 6, '', '', '', NULL, 0, 'SER', '', '', NULL), + ('658', 'c', 'Curriculum code', 'Curriculum code', 0, 0, '', 6, '', '', '', NULL, 0, 'SER', '', '', NULL), ('658', 'd', 'Correlation factor', 'Correlation factor', 0, 0, '', 6, '', '', '', NULL, -1, 'SER', '', '', NULL), ('662', '2', 'Source of term', 'Source of term', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), ('662', '3', 'Materials specified', 'Materials specified', 0, 0, '', 6, '', '', '', NULL, -6, 'SER', '', '', NULL), diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc index cd3226c..fe58c61 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc @@ -20,6 +20,7 @@ + diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl index 52b00e7..1ee82d0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-advsearch.tmpl @@ -82,6 +82,7 @@ + -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:10:44 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:10:44 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 5019 remove link to funds Message-ID: <1288354244-12643-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard This patch renames the link to budgets to say 'budgets & funds' and removes the links to funds (which went no where). This patch also adds the acq menu to the budget pages. Signed-off-by: Galen Charlton --- .../prog/en/includes/acquisitions-menu.inc | 3 +-- .../prog/en/modules/admin/aqbudgetperiods.tmpl | 4 ++++ .../prog/en/modules/admin/aqbudgets.tmpl | 3 +++ .../prog/en/modules/admin/aqplan.tmpl | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc index a385139..07e24de 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-menu.inc @@ -5,8 +5,7 @@
    • Manage suggestions
    • -
    • Budgets
    • -
    • Funds
    • +
    • Budgets & Funds
    • Currencies
    • diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl index 204574b..78c51b8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgetperiods.tmpl @@ -297,5 +297,9 @@
      +
      + +
      + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl index ce4d7da..9e8cf85 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqbudgets.tmpl @@ -429,5 +429,8 @@
      +
      + +
      diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl index 627b3f7..170c7a0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/aqplan.tmpl @@ -295,5 +295,8 @@ No funds to display for this search criteria
    +
    + +
    -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:15:37 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:15:37 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5114 - Can't edit basket in Internet Explorer Message-ID: <1288354537-12950-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/acqui/basket.tmpl | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl index 3021681..9079b6d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tmpl @@ -90,11 +90,12 @@ } //]]> + + @@ -178,7 +180,7 @@

    - &basketgroupid="> + &basketgroupid="> -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:20:47 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:20:47 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5149 fix broken link to noItemTypeImages preference Message-ID: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/itemtypes.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index 4c34695..8111182 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,7 +162,7 @@ Item Types Administration
  • " />
  • -
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
    -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:20:48 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:20:48 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5149: follow-up - remove extraneous character in link In-Reply-To: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> References: <1288354848-13325-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288354848-13325-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/itemtypes.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl index 8111182..3a4b23e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tmpl @@ -162,7 +162,7 @@ Item Types Administration
  • " />
  • -
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • +
  • Image: Item type images are disabled. To enable them, turn off the noItemTypeImages system preference
  • Choose an Icon:
    -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:23:41 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:23:41 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] bug 4986 move serials prefs from cataloging tab to serials tab Message-ID: <1288355021-13449-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../en/modules/admin/preferences/cataloguing.pref | 17 ----------------- .../prog/en/modules/admin/preferences/serials.pref | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 4e06abc..fc859ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -113,21 +113,4 @@ Cataloging: yes: Hide no: "Don't hide" - items marked as suppressed from OPAC search results. Note that you must have the Suppress index set up in Zebra and at least one suppressed item, or your searches will be broken. - - - - Show the - - pref: StaffSerialIssueDisplayCount - class: integer - - previous issues of a serial on the staff client. - - - - Show the - - pref: OPACSerialIssueDisplayCount - class: integer - - previous issues of a serial on the OPAC. - - - - When showing the subscription information for a biblio, show - - pref: SubscriptionHistory - choices: - simplified: a summary - full: a full list - - of the serial issues. diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref index a74b7cf..fc20c55 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/serials.pref @@ -16,4 +16,21 @@ Serials: choices: yes: Place no: "Don't place" - - received serials on hold if they are on a routing list. \ No newline at end of file + - received serials on hold if they are on a routing list. + - + - Show the + - pref: StaffSerialIssueDisplayCount + class: integer + - previous issues of a serial on the staff client. + - + - Show the + - pref: OPACSerialIssueDisplayCount + class: integer + - previous issues of a serial on the OPAC. + - + - When showing the subscription information for a biblio, show + - pref: SubscriptionHistory + choices: + simplified: a summary + full: a full list + - of the serial issues. \ No newline at end of file -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:29:02 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:29:02 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5008 - "Remove" link missing when Cart in expanded view Message-ID: <1288355342-13588-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/basket/basket.tmpl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl index 9257162..d3d83ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tmpl @@ -118,6 +118,8 @@ function placeHold () {

    Select All Clear All | Selected items : + Remove + | Add to a list -- 1.7.0 From gmcharlt at gmail.com Fri Oct 29 14:37:41 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 08:37:41 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5137, Remove obsolete code counting issues by item type in circ Message-ID: <1288355861-13880-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard The removed section of code contained a "my $dbh = C4::Context->dbh" which was required for the query of BOR_NOTES. That line has been moved accordingly. Signed-off-by: Galen Charlton --- circ/circulation.pl | 40 ++-------------------------------------- 1 files changed, 2 insertions(+), 38 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 4b67920..319e4f6 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -413,9 +413,7 @@ my $todaysissues = ''; my $previssues = ''; my @todaysissues; my @previousissues; -## ADDED BY JF: new itemtype issuingrules counter stuff -my $issued_itemtypes_count; -my @issued_itemtypes_count_loop; + my $totalprice = 0; if ($borrower) { @@ -449,8 +447,6 @@ if ($borrower) { $it->{'od'} = ( $it->{'date_due'} lt $todaysdate ) ? 1 : 0 ; ($it->{'author'} eq '') and $it->{'author'} = ' '; $it->{'renew_failed'} = $renew_failed{$it->{'itemnumber'}}; - # ADDED BY JF: NEW ITEMTYPE COUNT DISPLAY - $issued_itemtypes_count->{ $it->{'itemtype'} }++; if ( $todaysdate eq $it->{'issuedate'} or $todaysdate eq $it->{'lastreneweddate'} ) { push @todaysissues, $it; @@ -472,38 +468,6 @@ if ($borrower) { } } -#### ADDED BY JF FOR COUNTS BY ITEMTYPE RULES -# FIXME: This should utilize all the issuingrules options rather than just the defaults -# and it should be moved to a module -my $dbh = C4::Context->dbh; - -# how many of each is allowed? -my $issueqty_sth = $dbh->prepare( - 'SELECT itemtypes.description AS description,issuingrules.itemtype,maxissueqty ' . - 'FROM issuingrules LEFT JOIN itemtypes ON (itemtypes.itemtype=issuingrules.itemtype) ' . - 'WHERE categorycode=?' -); -$issueqty_sth->execute(q{*}); # This is a literal asterisk, not a wildcard. - -while ( my $data = $issueqty_sth->fetchrow_hashref() ) { - - # subtract how many of each this borrower has - $data->{'count'} = $issued_itemtypes_count->{ $data->{'description'} }; - $data->{'left'} = - ( $data->{'maxissueqty'} - - $issued_itemtypes_count->{ $data->{'description'} } ); - - # can't have a negative number of remaining - if ( $data->{'left'} < 0 ) { $data->{'left'} = '0' } - if ( $data->{maxissueqty} <= $data->{count} ) { - $data->{flag} = 1; - } - if ( $data->{maxissueqty} > 0 && $data->{itemtype} !~m/^(\*|CIRC)$/ ) { - push @issued_itemtypes_count_loop, $data; - } -} - -#### / JF my @values; my %labels; @@ -646,7 +610,6 @@ my (undef, $roadttype_hashref) = &GetRoadTypes(); my $address = $borrower->{'streetnumber'}.' '.$roadttype_hashref->{$borrower->{'streettype'}}.' '.$borrower->{'address'}; $template->param( - issued_itemtypes_count_loop => \@issued_itemtypes_count_loop, lib_messages_loop => $lib_messages_loop, bor_messages_loop => $bor_messages_loop, all_messages_del => C4::Context->preference('AllowAllMessageDeletion'), @@ -700,6 +663,7 @@ my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'}); $template->param( picture => 1 ) if $picture; # get authorised values with type of BOR_NOTES +my $dbh = C4::Context->dbh; my @canned_notes; my $sth = $dbh->prepare('SELECT * FROM authorised_values WHERE category = "BOR_NOTES"'); $sth->execute(); -- 1.7.0 From nengard at bywatersolutions.com Thu Oct 28 16:06:46 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Thu, 28 Oct 2010 10:06:46 -0400 Subject: [Koha-patches] [PATCH] bug 5326 fix extended patron attribute error Message-ID: <1288274806-4907-1-git-send-email-nengard@bywatersolutions.com> the error message if you have ExtendedPatronAttributes turned off linked to the old sys prefs editor, link has been updated. --- .../prog/en/modules/admin/patron-attr-types.tmpl | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl index 27c82c5..38ac077 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl @@ -68,10 +68,7 @@ function CheckAttributeTypeForm(f) {

    -
    Because the 'ExtendedPatronAttributes` system preference is currently OFF, extended patron attributes -cannot be given to patron records. Go -here if you wish to turn -this feature on.
    +
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    -- 1.5.6.5 From nengard at bywatersolutions.com Thu Oct 28 16:27:32 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Thu, 28 Oct 2010 10:27:32 -0400 Subject: [Koha-patches] [PATCH] bug 5326 fix link to old pres editor on patron attributes Message-ID: <1288276052-4988-1-git-send-email-nengard@bywatersolutions.com> on the patron attributes page if you have ExtendedPatronAttributes turned off the error points you to the old sys prefs editor - this patch fixes that --- .../prog/en/modules/admin/patron-attr-types.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl index 38ac077..b445c41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl @@ -68,7 +68,7 @@ function CheckAttributeTypeForm(f) {
    -
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    +
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    -- 1.5.6.5 From nengard at gmail.com Sat Oct 30 01:05:42 2010 From: nengard at gmail.com (Nicole Engard) Date: Sat, 30 Oct 2010 12:05:42 +1300 Subject: [Koha-patches] [PATCH] bug 5326 fix extended patron attribute error In-Reply-To: <1288274806-4907-1-git-send-email-nengard@bywatersolutions.com> References: <1288274806-4907-1-git-send-email-nengard@bywatersolutions.com> Message-ID: Please ignore this patch - updated one on the way On Fri, Oct 29, 2010 at 3:06 AM, Nicole Engard wrote: > the error message if you have ExtendedPatronAttributes turned > off linked to the old sys prefs editor, link has been updated. > --- > ?.../prog/en/modules/admin/patron-attr-types.tmpl ? | ? ?5 +---- > ?1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl > index 27c82c5..38ac077 100644 > --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl > +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl > @@ -68,10 +68,7 @@ function CheckAttributeTypeForm(f) { > ? ?
    > > ? > -
    Because the 'ExtendedPatronAttributes` system preference is currently OFF, extended patron attributes > -cannot be given to patron records. ?Go > -here if you wish to turn > -this feature on.
    > +
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. ?Go here if you wish to enable this feature.
    > ? > > ? > -- > 1.5.6.5 > > _______________________________________________ > Koha-patches mailing list > Koha-patches at lists.koha-community.org > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > From gmcharlt at gmail.com Sat Oct 30 02:28:49 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 20:28:49 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 2/2] bug 5326 fix link to old prefs editor on patron attributes In-Reply-To: <1288398529-15988-1-git-send-email-gmcharlt@gmail.com> References: <1288398529-15988-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288398529-15988-2-git-send-email-gmcharlt@gmail.com> From: Nicole Engard on the patron attributes page if you have ExtendedPatronAttributes turned off the error points you to the old sys prefs editor - this patch fixes that Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/patron-attr-types.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl index 38ac077..b445c41 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl @@ -68,7 +68,7 @@ function CheckAttributeTypeForm(f) {
    -
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    +
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 02:28:48 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 20:28:48 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 1/2] bug 5326 fix extended patron attribute error Message-ID: <1288398529-15988-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard the error message if you have ExtendedPatronAttributes turned off linked to the old sys prefs editor, link has been updated. Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/patron-attr-types.tmpl | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl index 27c82c5..38ac077 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/patron-attr-types.tmpl @@ -68,10 +68,7 @@ function CheckAttributeTypeForm(f) {
    -
    Because the 'ExtendedPatronAttributes` system preference is currently OFF, extended patron attributes -cannot be given to patron records. Go -here if you wish to turn -this feature on.
    +
    Because the 'ExtendedPatronAttributes` system preference is currently not enabled, extended patron attributes cannot be given to patron records. Go here if you wish to enable this feature.
    -- 1.7.0 From robin at catalyst.net.nz Sat Oct 30 03:11:02 2010 From: robin at catalyst.net.nz (Robin Sheat) Date: Sat, 30 Oct 2010 14:11:02 +1300 Subject: [Koha-patches] [PATCH] Bug 5322 - Added pwgen dependency Message-ID: <1288401062-15530-1-git-send-email-robin@catalyst.net.nz> --- debian/control | 1 + debian/control.in | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/debian/control b/debian/control index 7240793..14dadca 100644 --- a/debian/control +++ b/debian/control @@ -90,6 +90,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, libjs-jquery, libjs-yui, mysql-client, + pwgen, tinymce2, yaz Suggests: mysql-server diff --git a/debian/control.in b/debian/control.in index 746e568..44e144b 100644 --- a/debian/control.in +++ b/debian/control.in @@ -20,6 +20,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, libjs-jquery, libjs-yui, mysql-client, + pwgen, tinymce2, yaz Suggests: mysql-server -- 1.7.1 From gmcharlt at gmail.com Sat Oct 30 03:23:43 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 21:23:43 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5322 - Added pwgen dependency Message-ID: <1288401823-16272-1-git-send-email-gmcharlt@gmail.com> From: Robin Sheat Signed-off-by: Galen Charlton --- debian/control | 1 + debian/control.in | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/debian/control b/debian/control index 7240793..14dadca 100644 --- a/debian/control +++ b/debian/control @@ -90,6 +90,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, libjs-jquery, libjs-yui, mysql-client, + pwgen, tinymce2, yaz Suggests: mysql-server diff --git a/debian/control.in b/debian/control.in index 746e568..44e144b 100644 --- a/debian/control.in +++ b/debian/control.in @@ -20,6 +20,7 @@ Depends: ${misc:Depends}, ${koha:Depends}, libjs-jquery, libjs-yui, mysql-client, + pwgen, tinymce2, yaz Suggests: mysql-server -- 1.7.0 From lrea at nekls.org Sat Oct 30 03:45:55 2010 From: lrea at nekls.org (Liz Rea) Date: Fri, 29 Oct 2010 20:45:55 -0500 Subject: [Koha-patches] [PATCH] Adding a simple test for Service.pm Message-ID: <1288403155-24175-1-git-send-email-lrea@nekls.org> At the advisement of the great Chris Cormack. (thanks for the lesson) --- t/Service.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100755 t/Service.t diff --git a/t/Service.t b/t/Service.t new file mode 100755 index 0000000..497cc1b --- /dev/null +++ b/t/Service.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Service'); +} + -- 1.5.6.5 From daniel.grobani at gmail.com Sun Oct 31 00:00:04 2010 From: daniel.grobani at gmail.com (Daniel Grobani) Date: Sat, 30 Oct 2010 15:00:04 -0700 Subject: [Koha-patches] [PATCH] unit test stub for Z3950.pm Message-ID: <1288476004-16641-1-git-send-email-daniel.grobani@gmail.com> --- t/Z3950.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 t/Z3950.t diff --git a/t/Z3950.t b/t/Z3950.t new file mode 100644 index 0000000..4fb4c37 --- /dev/null +++ b/t/Z3950.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Z3950'); +} + -- 1.7.1 From gmcharlt at gmail.com Sat Oct 30 04:35:43 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 22:35:43 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OF] bug 5190: link to MARC21/UNIMARC online doc in the bib editor Message-ID: <1288406144-16885-1-git-send-email-gmcharlt@gmail.com> Patch from Tom?s Cohen Arazi Signed-off-by: Galen Charlton --- cataloguing/addbiblio.pl | 3 ++ .../prog/en/modules/cataloguing/addbiblio.tmpl | 25 +++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletions(-) diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index fc56047..2cd6e73 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -1018,6 +1018,9 @@ elsif ( $op eq "delete" ) { } $template->param( title => $record->title() ) if ( $record ne "-1" ); +if (C4::Context->preference("marcflavour") eq "MARC21"){ + $template->param(MARC21 => 1); +} $template->param( popup => $mode, frameworkcode => $frameworkcode, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index 3e510c5..4608820 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -67,6 +67,26 @@ function PopupZ3950() { } } +function PopupMARCFieldDoc(field) { + if(field == 0) { + window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); + } else if (field < 900) { + window.open("http://www.loc.gov/marc/bibliographic/bd"+field+".html"); + } else { + window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html"); + } +} + +function PopupUNIMARCFieldDoc(field,fieldnumber) { + if(field == 0) { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm"); + } else if (field < 900) { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b"+field); + } else { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); + } +} + /** * check if mandatory subfields are written */ @@ -749,7 +769,10 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? - Click to Expand this Tag" onclick="ExpandField('tag__'); return false;"> - "> + ">PopupMARCFieldDoc() + PopupUNIMARCFieldDoc(,) + ;return false;"> ? _indicator1_" size="1" maxlength="1" value="" /> -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 04:35:44 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 22:35:44 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 5190: improve linking to MARC field documentation In-Reply-To: <1288406144-16885-1-git-send-email-gmcharlt@gmail.com> References: <1288406144-16885-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288406144-16885-2-git-send-email-gmcharlt@gmail.com> * zero-pad tag numbers as needed * handle special case for linking to UNIMARC 0XX vs. 1-8XX * add a wrapper function * add comment about the poor linkability of IFLA's UNIMARC documentation Signed-off-by: Galen Charlton --- .../prog/en/modules/cataloguing/addbiblio.tmpl | 27 ++++++++++++++----- 1 files changed, 20 insertions(+), 7 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl index 4608820..ccd1039 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tmpl @@ -67,21 +67,36 @@ function PopupZ3950() { } } -function PopupMARCFieldDoc(field) { +function PopupMARCFieldDoc(field, fieldnumber) { + + _MARC21FieldDoc(field); + + _UNIMARCFieldDoc(field, fieldnumber); + +} + +function _MARC21FieldDoc(field) { if(field == 0) { window.open("http://www.loc.gov/marc/bibliographic/bdleader.html"); } else if (field < 900) { - window.open("http://www.loc.gov/marc/bibliographic/bd"+field+".html"); + window.open("http://www.loc.gov/marc/bibliographic/bd" + ("000"+field).slice(-3) + ".html"); } else { window.open("http://www.loc.gov/marc/bibliographic/bd9xx.html"); } } -function PopupUNIMARCFieldDoc(field,fieldnumber) { +function _UNIMARCFieldDoc(field,fieldnumber) { + /* http://archive.ifla.org/VI/3/p1996-1/ is an outdated version of UNIMARC, but + seems to be the only version available that can be linked to per tag. More recent + versions of the UNIMARC standard are available on the IFLA website only as + PDFs! + */ if(field == 0) { window.open("http://archive.ifla.org/VI/3/p1996-1/uni.htm"); + } else if (field < 100) { + window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b" + ("000"+field).slice(-3)); } else if (field < 900) { - window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#b"+field); + window.open("http://archive.ifla.org/VI/3/p1996-1/uni"+fieldnumber+".htm#" + ("000"+field).slice(-3)); } else { window.open("http://archive.ifla.org/VI/3/p1996-1/uni9.htm"); } @@ -770,9 +785,7 @@ function unHideSubfield(index,labelindex) { // FIXME :: is it used ? - Click to Expand this Tag" onclick="ExpandField('tag__'); return false;"> ">PopupMARCFieldDoc() - PopupUNIMARCFieldDoc(,) - ;return false;"> ? + onclick="PopupMARCFieldDoc(, ); return false;"> ? _indicator1_" size="1" maxlength="1" value="" /> -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 04:44:26 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 22:44:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 1/2] Adding a simple test for Service.pm Message-ID: <1288406667-17665-1-git-send-email-gmcharlt@gmail.com> From: Liz Rea At the advisement of the great Chris Cormack. (thanks for the lesson) Signed-off-by: Galen Charlton --- t/Service.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100755 t/Service.t diff --git a/t/Service.t b/t/Service.t new file mode 100755 index 0000000..497cc1b --- /dev/null +++ b/t/Service.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Service'); +} + -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 04:44:27 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 22:44:27 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 2/2] unit test stub for Z3950.pm In-Reply-To: <1288406667-17665-1-git-send-email-gmcharlt@gmail.com> References: <1288406667-17665-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288406667-17665-2-git-send-email-gmcharlt@gmail.com> From: Daniel Grobani Signed-off-by: Galen Charlton --- t/Z3950.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 t/Z3950.t diff --git a/t/Z3950.t b/t/Z3950.t new file mode 100644 index 0000000..4fb4c37 --- /dev/null +++ b/t/Z3950.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Z3950'); +} + -- 1.7.0 From jcamins at cpbibliography.com Sat Oct 30 05:09:53 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Fri, 29 Oct 2010 23:09:53 -0400 Subject: [Koha-patches] [PATCH] Update language mappings to fix Bug 5311 In-Reply-To: <1287860274-3037-1-git-send-email-jcamins@cpbibliography.com> References: <1287860274-3037-1-git-send-email-jcamins@cpbibliography.com> Message-ID: <1288408193-15460-1-git-send-email-jcamins@cpbibliography.com> This patch updates the language_rfc4646_to_iso639 mapping table with the correct mappings for several languages that were not mapped correctly to the codes used in MARC, including Finnish (which was not mapped at all), and Armenian (which was mapped to an obsolete code). This patch also changes English and French to use the proper three-letter codes, which will eliminate false positives when, for example, limiting by French brings up results in Afrikaans. --- .../data/mysql/en/mandatory/subtag_registry.sql | 30 ++++++++++++++------ installer/data/mysql/updatedatabase.pl | 16 ++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index f2e0648..852805d 100644 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hy', 'language', 'Armenian','2005-10-16'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'hy','hy'); +VALUES( 'hy','arm'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'hy', 'language', 'hy', 'Հայերէն'); @@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'en', 'language', 'English','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'en','en'); +VALUES( 'en','eng'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'en', 'English'); @@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'fr', 'Anglais'); --- English +-- Finnish INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fi', 'language', 'Finnish','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'fi','fin'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fi', 'language', 'fi', 'suomi'); @@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fr', 'language', 'French','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'fr','fr'); +VALUES( 'fr','fre'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fr', 'language', 'en', 'French'); @@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'lo', 'language', 'Lao','2005-10-16' ); --- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) --- VALUES( 'lo','nor'); ??? +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'lo','lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'lo', 'language', 'lo', 'ພາສາລາວ'); @@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); @@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'la', 'language', 'fr', 'Latin'); --- Galacian +-- Galician INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'gl', 'language', 'Galician','2005-10-16' ); @@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'sr', 'language', 'Serbian','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'sr','srp'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'sr', 'language', 'sr', 'српски'); @@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Su?dois'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'tet', 'language', 'Tetum','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'tet','tet'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'tet', 'language', 'tet', 'tetun'); @@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'uk', 'language', 'fr', 'Ukrainien'); --- English +-- Urdu INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ur', 'language', 'Urdu','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'ur','urd'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'ur', 'language', 'en', 'Urdu'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 400fef7..89517c6 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3744,6 +3744,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.001'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='arm' WHERE rfc4646_subtag='hy';"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='eng' WHERE rfc4646_subtag='en';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'fi','fin');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='fre' WHERE rfc4646_subtag='fr';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'lo','lao');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='it' WHERE rfc4646_subtag='ita';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'sr','srp');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'tet','tet');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'ur','urd');"); + + print "Upgrade to $DBversion done (Correct language mappings)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 1.7.1 From jcamins at cpbibliography.com Sat Oct 30 05:07:15 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Fri, 29 Oct 2010 23:07:15 -0400 Subject: [Koha-patches] [PATCH] Update language mappings to fix Bug 5311 In-Reply-To: <1288408193-15460-1-git-send-email-jcamins@cpbibliography.com> References: <1287860274-3037-1-git-send-email-jcamins@cpbibliography.com> <1288408193-15460-1-git-send-email-jcamins@cpbibliography.com> Message-ID: Ignore this patch, and the previous patch for this bug. I will send the correct patch in just a moment. On Fri, Oct 29, 2010 at 11:09 PM, Jared Camins-Esakov < jcamins at cpbibliography.com> wrote: > This patch updates the language_rfc4646_to_iso639 mapping table with the > correct mappings for several languages that were not mapped correctly to > the codes used in MARC, including Finnish (which was not mapped at all), > and Armenian (which was mapped to an obsolete code). This patch also > changes English and French to use the proper three-letter codes, which > will eliminate false positives when, for example, limiting by French > brings up results in Afrikaans. > --- > .../data/mysql/en/mandatory/subtag_registry.sql | 30 > ++++++++++++++------ > installer/data/mysql/updatedatabase.pl | 16 ++++++++++ > 2 files changed, 37 insertions(+), 9 deletions(-) > > diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql > b/installer/data/mysql/en/mandatory/subtag_registry.sql > index f2e0648..852805d 100644 > --- a/installer/data/mysql/en/mandatory/subtag_registry.sql > +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql > @@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, > description, added) > VALUES ( 'hy', 'language', 'Armenian','2005-10-16'); > > INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > -VALUES( 'hy','hy'); > +VALUES( 'hy','arm'); > > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES ( 'hy', 'language', 'hy', > 'Հայերէն'); > @@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, > description, added) > VALUES ( 'en', 'language', 'English','2005-10-16' ); > > INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > -VALUES( 'en','en'); > +VALUES( 'en','eng'); > > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'en', 'language', 'en', 'English'); > @@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English'); > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'en', 'language', 'fr', 'Anglais'); > > --- English > +-- Finnish > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'fi', 'language', 'Finnish','2005-10-16' ); > > +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > +VALUES( 'fi','fin'); > + > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'fi', 'language', 'fi', 'suomi'); > > @@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, > description, added) > VALUES ( 'fr', 'language', 'French','2005-10-16' ); > > INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > -VALUES( 'fr','fr'); > +VALUES( 'fr','fre'); > > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'fr', 'language', 'en', 'French'); > @@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français'); > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'lo', 'language', 'Lao','2005-10-16' ); > > --- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > --- VALUES( 'lo','nor'); ??? > +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > +VALUES( 'lo','lao'); > > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'lo', 'language', 'lo', > 'ພາສາລາວ'); > @@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, > description, added) > VALUES ( 'it', 'language', 'Italian','2005-10-16' ); > > INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > -VALUES( 'it','ind'); > +VALUES( 'it','ita'); > > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'it', 'language', 'it', 'Italiano'); > @@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin'); > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'la', 'language', 'fr', 'Latin'); > > --- Galacian > +-- Galician > > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'gl', 'language', 'Galician','2005-10-16' ); > @@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe'); > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'sr', 'language', 'Serbian','2005-10-16' ); > > +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > +VALUES( 'sr','srp'); > + > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'sr', 'language', 'sr', > 'српски'); > > @@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Su?dois'); > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'tet', 'language', 'Tetum','2005-10-16' ); > > +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > +VALUES( 'tet','tet'); > + > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'tet', 'language', 'tet', 'tetun'); > > @@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian'); > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'uk', 'language', 'fr', 'Ukrainien'); > > --- English > +-- Urdu > INSERT INTO language_subtag_registry( subtag, type, description, added) > VALUES ( 'ur', 'language', 'Urdu','2005-10-16' ); > > +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) > +VALUES( 'ur','urd'); > + > INSERT INTO language_descriptions(subtag, type, lang, description) > VALUES( 'ur', 'language', 'en', 'Urdu'); > > diff --git a/installer/data/mysql/updatedatabase.plb/installer/data/mysql/ > updatedatabase.pl > index 400fef7..89517c6 100755 > --- a/installer/data/mysql/updatedatabase.pl > +++ b/installer/data/mysql/updatedatabase.pl > @@ -3744,6 +3744,22 @@ if (C4::Context->preference("Version") < > TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > > +$DBversion = '3.03.00.001'; > +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='arm' > WHERE rfc4646_subtag='hy';"); > + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='eng' > WHERE rfc4646_subtag='en';"); > + $dbh->do("INSERT INTO > language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( > 'fi','fin');"); > + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='fre' > WHERE rfc4646_subtag='fr';"); > + $dbh->do("INSERT INTO > language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( > 'lo','lao');"); > + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='it' > WHERE rfc4646_subtag='ita';"); > + $dbh->do("INSERT INTO > language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( > 'sr','srp');"); > + $dbh->do("INSERT INTO > language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( > 'tet','tet');"); > + $dbh->do("INSERT INTO > language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( > 'ur','urd');"); > + > + print "Upgrade to $DBversion done (Correct language mappings)\n"; > + SetVersion ($DBversion); > +} > + > =item DropAllForeignKeys($table) > > Drop all foreign keys of the table $table > -- > 1.7.1 > > -- Jared Camins-Esakov Freelance bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins at cpbibliography.com (web) http://www.cpbibliography.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jcamins at cpbibliography.com Sat Oct 30 05:13:56 2010 From: jcamins at cpbibliography.com (Jared Camins-Esakov) Date: Fri, 29 Oct 2010 23:13:56 -0400 Subject: [Koha-patches] [PATCH] Update language mappings to fix Bug 5311 Message-ID: <1288408436-11469-1-git-send-email-jcamins@cpbibliography.com> This patch updates the language_rfc4646_to_iso639 mapping table with the correct mappings for several languages that were not mapped correctly to the codes used in MARC, including Finnish (which was not mapped at all), and Armenian (which was mapped to an obsolete code). This patch also changes English and French to use the proper three-letter codes, which will eliminate false positives when, for example, limiting by French brings up results in Afrikaans. This patch adds the changes to the updatedatabase.pl script, and removes the incorrectly specified DBversion in the previous patch. --- .../data/mysql/en/mandatory/subtag_registry.sql | 30 ++++++++++++++------ installer/data/mysql/updatedatabase.pl | 16 ++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index f2e0648..852805d 100644 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hy', 'language', 'Armenian','2005-10-16'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'hy','hy'); +VALUES( 'hy','arm'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'hy', 'language', 'hy', 'Հայերէն'); @@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'en', 'language', 'English','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'en','en'); +VALUES( 'en','eng'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'en', 'English'); @@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'fr', 'Anglais'); --- English +-- Finnish INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fi', 'language', 'Finnish','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'fi','fin'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fi', 'language', 'fi', 'suomi'); @@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fr', 'language', 'French','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'fr','fr'); +VALUES( 'fr','fre'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fr', 'language', 'en', 'French'); @@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'lo', 'language', 'Lao','2005-10-16' ); --- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) --- VALUES( 'lo','nor'); ??? +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'lo','lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'lo', 'language', 'lo', 'ພາສາລາວ'); @@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); @@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'la', 'language', 'fr', 'Latin'); --- Galacian +-- Galician INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'gl', 'language', 'Galician','2005-10-16' ); @@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'sr', 'language', 'Serbian','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'sr','srp'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'sr', 'language', 'sr', 'српски'); @@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Su?dois'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'tet', 'language', 'Tetum','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'tet','tet'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'tet', 'language', 'tet', 'tetun'); @@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'uk', 'language', 'fr', 'Ukrainien'); --- English +-- Urdu INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ur', 'language', 'Urdu','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'ur','urd'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'ur', 'language', 'en', 'Urdu'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 400fef7..3b34520 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3744,6 +3744,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='arm' WHERE rfc4646_subtag='hy';"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='eng' WHERE rfc4646_subtag='en';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'fi','fin');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='fre' WHERE rfc4646_subtag='fr';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'lo','lao');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='it' WHERE rfc4646_subtag='ita';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'sr','srp');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'tet','tet');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'ur','urd');"); + + print "Upgrade to $DBversion done (Correct language mappings)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 1.7.1 From engard at gmail.com Sat Oct 30 05:34:34 2010 From: engard at gmail.com (Brian Engard) Date: Fri, 29 Oct 2010 23:34:34 -0400 Subject: [Koha-patches] [PATCH] Create Unit Test for ImportBatch Message-ID: <1288409674-9710-1-git-send-email-engard@gmail.com> --- t/ImportBatch.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 t/ImportBatch.t diff --git a/t/ImportBatch.t b/t/ImportBatch.t new file mode 100644 index 0000000..3c4935c --- /dev/null +++ b/t/ImportBatch.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ImportBatch'); +} + -- 1.7.2.3 From nengard at bywatersolutions.com Thu Oct 28 21:01:20 2010 From: nengard at bywatersolutions.com (Nicole Engard) Date: Thu, 28 Oct 2010 15:01:20 -0400 Subject: [Koha-patches] [PATCH] create unit test files Message-ID: <1288292480-6013-1-git-send-email-nengard@bywatersolutions.com> --- t/Cache.t | 14 ++++++++++++++ t/Review.t | 1 + t/Scheduler.t | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-) create mode 100644 t/Cache.t create mode 100644 t/Scheduler.t diff --git a/t/Cache.t b/t/Cache.t new file mode 100644 index 0000000..75f5acf --- /dev/null +++ b/t/Cache.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Cache'); +} + diff --git a/t/Review.t b/t/Review.t index 40e650f..90323bc 100755 --- a/t/Review.t +++ b/t/Review.t @@ -1,5 +1,6 @@ #!/usr/bin/perl # +# # This Koha test module is a stub! # Add more tests here!!! diff --git a/t/Scheduler.t b/t/Scheduler.t new file mode 100644 index 0000000..5fd05b3 --- /dev/null +++ b/t/Scheduler.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Scheduler'); +} + -- 1.5.6.5 From gmcharlt at gmail.com Sat Oct 30 05:39:26 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:39:26 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Create Unit Test for ImportBatch Message-ID: <1288409966-18765-1-git-send-email-gmcharlt@gmail.com> From: Brian Engard Signed-off-by: Galen Charlton --- t/ImportBatch.t | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) create mode 100644 t/ImportBatch.t diff --git a/t/ImportBatch.t b/t/ImportBatch.t new file mode 100644 index 0000000..3c4935c --- /dev/null +++ b/t/ImportBatch.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ImportBatch'); +} + -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 05:41:25 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:41:25 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] create unit test files Message-ID: <1288410085-18891-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- t/Cache.t | 14 ++++++++++++++ t/Review.t | 1 + t/Scheduler.t | 14 ++++++++++++++ 3 files changed, 29 insertions(+), 0 deletions(-) create mode 100644 t/Cache.t create mode 100644 t/Scheduler.t diff --git a/t/Cache.t b/t/Cache.t new file mode 100644 index 0000000..75f5acf --- /dev/null +++ b/t/Cache.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Cache'); +} + diff --git a/t/Review.t b/t/Review.t index 40e650f..90323bc 100755 --- a/t/Review.t +++ b/t/Review.t @@ -1,5 +1,6 @@ #!/usr/bin/perl # +# # This Koha test module is a stub! # Add more tests here!!! diff --git a/t/Scheduler.t b/t/Scheduler.t new file mode 100644 index 0000000..5fd05b3 --- /dev/null +++ b/t/Scheduler.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Scheduler'); +} + -- 1.7.0 From Katrin.Fischer.83 at web.de Sat Oct 30 05:45:30 2010 From: Katrin.Fischer.83 at web.de (Katrin Fischer) Date: Sat, 30 Oct 2010 05:45:30 +0200 Subject: [Koha-patches] [PATCH] Bug 5327: Add basic unit tests to some C4 modules Message-ID: <1288410330-11371-1-git-send-email-Katrin.Fischer.83@web.de> --- t/Auth_with_cas.t | 14 ++++++++++++++ t/AuthoritiesMarc.t | 14 ++++++++++++++ t/Biblio.t | 14 ++++++++++++++ t/Breeding.t | 14 ++++++++++++++ t/Category.t | 14 ++++++++++++++ t/ClassSortRoutine.t | 14 ++++++++++++++ t/ClassSource.t | 14 ++++++++++++++ t/Contract.t | 14 ++++++++++++++ t/Creators.t | 14 ++++++++++++++ t/Csv.t | 14 ++++++++++++++ t/Heading.t | 14 ++++++++++++++ t/ItemCirculationAlertPreference.t | 14 ++++++++++++++ t/Items.t | 14 ++++++++++++++ t/Letters.t | 14 ++++++++++++++ t/Log.t | 14 ++++++++++++++ t/Matcher.t | 14 ++++++++++++++ t/Members.t | 14 ++++++++++++++ t/Message.t | 14 ++++++++++++++ t/NewsChannels.t | 14 ++++++++++++++ t/Overdues.t | 14 ++++++++++++++ t/Patroncards.t | 14 ++++++++++++++ t/Print.t | 14 ++++++++++++++ t/Reports.t | 14 ++++++++++++++ t/Ris.t | 14 ++++++++++++++ t/RotatingCollections.t | 14 ++++++++++++++ t/SMS.t | 14 ++++++++++++++ t/Tags.t | 14 ++++++++++++++ t/UploadedFile.t | 14 ++++++++++++++ 28 files changed, 392 insertions(+), 0 deletions(-) create mode 100755 t/Auth_with_cas.t create mode 100755 t/AuthoritiesMarc.t create mode 100755 t/Biblio.t create mode 100755 t/Breeding.t create mode 100755 t/Category.t create mode 100755 t/ClassSortRoutine.t create mode 100755 t/ClassSource.t create mode 100755 t/Contract.t create mode 100755 t/Creators.t create mode 100755 t/Csv.t create mode 100755 t/Heading.t create mode 100755 t/ItemCirculationAlertPreference.t create mode 100755 t/Items.t create mode 100755 t/Letters.t create mode 100755 t/Log.t create mode 100755 t/Matcher.t create mode 100755 t/Members.t create mode 100755 t/Message.t create mode 100755 t/NewsChannels.t create mode 100755 t/Overdues.t create mode 100755 t/Patroncards.t create mode 100755 t/Print.t create mode 100755 t/Reports.t create mode 100755 t/Ris.t create mode 100755 t/RotatingCollections.t create mode 100755 t/SMS.t create mode 100755 t/Tags.t create mode 100755 t/UploadedFile.t diff --git a/t/Auth_with_cas.t b/t/Auth_with_cas.t new file mode 100755 index 0000000..77dd21f --- /dev/null +++ b/t/Auth_with_cas.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Auth_with_cas'); +} + diff --git a/t/AuthoritiesMarc.t b/t/AuthoritiesMarc.t new file mode 100755 index 0000000..d59b43b --- /dev/null +++ b/t/AuthoritiesMarc.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::AuthoritiesMarc'); +} + diff --git a/t/Biblio.t b/t/Biblio.t new file mode 100755 index 0000000..c186058 --- /dev/null +++ b/t/Biblio.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Biblio'); +} + diff --git a/t/Breeding.t b/t/Breeding.t new file mode 100755 index 0000000..e672bf1 --- /dev/null +++ b/t/Breeding.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Breeding'); +} + diff --git a/t/Category.t b/t/Category.t new file mode 100755 index 0000000..6c251ea --- /dev/null +++ b/t/Category.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Category'); +} + diff --git a/t/ClassSortRoutine.t b/t/ClassSortRoutine.t new file mode 100755 index 0000000..be379a2 --- /dev/null +++ b/t/ClassSortRoutine.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ClassSortRoutine'); +} + diff --git a/t/ClassSource.t b/t/ClassSource.t new file mode 100755 index 0000000..ffb3104 --- /dev/null +++ b/t/ClassSource.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ClassSource'); +} + diff --git a/t/Contract.t b/t/Contract.t new file mode 100755 index 0000000..87df569 --- /dev/null +++ b/t/Contract.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Contract'); +} + diff --git a/t/Creators.t b/t/Creators.t new file mode 100755 index 0000000..5264d32 --- /dev/null +++ b/t/Creators.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Creators'); +} + diff --git a/t/Csv.t b/t/Csv.t new file mode 100755 index 0000000..068f094 --- /dev/null +++ b/t/Csv.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Csv'); +} + diff --git a/t/Heading.t b/t/Heading.t new file mode 100755 index 0000000..d780944 --- /dev/null +++ b/t/Heading.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Heading'); +} + diff --git a/t/ItemCirculationAlertPreference.t b/t/ItemCirculationAlertPreference.t new file mode 100755 index 0000000..d937c26 --- /dev/null +++ b/t/ItemCirculationAlertPreference.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ItemCirculationAlertPreference'); +} + diff --git a/t/Items.t b/t/Items.t new file mode 100755 index 0000000..c19cdc7 --- /dev/null +++ b/t/Items.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Items'); +} + diff --git a/t/Letters.t b/t/Letters.t new file mode 100755 index 0000000..603e37e --- /dev/null +++ b/t/Letters.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Letters'); +} + diff --git a/t/Log.t b/t/Log.t new file mode 100755 index 0000000..eca6b9c --- /dev/null +++ b/t/Log.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Log'); +} + diff --git a/t/Matcher.t b/t/Matcher.t new file mode 100755 index 0000000..f374877 --- /dev/null +++ b/t/Matcher.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Matcher'); +} + diff --git a/t/Members.t b/t/Members.t new file mode 100755 index 0000000..bbcfc95 --- /dev/null +++ b/t/Members.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Members'); +} + diff --git a/t/Message.t b/t/Message.t new file mode 100755 index 0000000..7641d57 --- /dev/null +++ b/t/Message.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Message'); +} + diff --git a/t/NewsChannels.t b/t/NewsChannels.t new file mode 100755 index 0000000..bbcaab1 --- /dev/null +++ b/t/NewsChannels.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::NewsChannels'); +} + diff --git a/t/Overdues.t b/t/Overdues.t new file mode 100755 index 0000000..62725cb --- /dev/null +++ b/t/Overdues.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Overdues'); +} + diff --git a/t/Patroncards.t b/t/Patroncards.t new file mode 100755 index 0000000..60a7237 --- /dev/null +++ b/t/Patroncards.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Patroncards'); +} + diff --git a/t/Print.t b/t/Print.t new file mode 100755 index 0000000..1a05304 --- /dev/null +++ b/t/Print.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Print'); +} + diff --git a/t/Reports.t b/t/Reports.t new file mode 100755 index 0000000..667cb8c --- /dev/null +++ b/t/Reports.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Reports'); +} + diff --git a/t/Ris.t b/t/Ris.t new file mode 100755 index 0000000..30157e4 --- /dev/null +++ b/t/Ris.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Ris'); +} + diff --git a/t/RotatingCollections.t b/t/RotatingCollections.t new file mode 100755 index 0000000..10a4e20 --- /dev/null +++ b/t/RotatingCollections.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::RotatingCollections'); +} + diff --git a/t/SMS.t b/t/SMS.t new file mode 100755 index 0000000..d88633f --- /dev/null +++ b/t/SMS.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::SMS'); +} + diff --git a/t/Tags.t b/t/Tags.t new file mode 100755 index 0000000..83b3c9b --- /dev/null +++ b/t/Tags.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Tags'); +} + diff --git a/t/UploadedFile.t b/t/UploadedFile.t new file mode 100755 index 0000000..dd01e1b --- /dev/null +++ b/t/UploadedFile.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::UploadedFile'); +} + -- 1.7.1 From gmcharlt at gmail.com Sat Oct 30 05:49:14 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:49:14 -0400 Subject: [Koha-patches] [PATCH 2/3] bug 5311: correction to database update In-Reply-To: <1288410555-19185-1-git-send-email-gmcharlt@gmail.com> References: <1288410555-19185-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288410555-19185-2-git-send-email-gmcharlt@gmail.com> Signed-off-by: Galen Charlton --- installer/data/mysql/updatedatabase.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 9b1ed15..3ddc2ce 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3806,7 +3806,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'fi','fin');"); $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='fre' WHERE rfc4646_subtag='fr';"); $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'lo','lao');"); - $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='it' WHERE rfc4646_subtag='ita';"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='ita' WHERE rfc4646_subtag='it';"); $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'sr','srp');"); $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'tet','tet');"); $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'ur','urd');"); -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 05:49:15 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:49:15 -0400 Subject: [Koha-patches] [PATCH 3/3] [SIGNED-OFF] Fix bug 3811; Index language as word In-Reply-To: <1288410555-19185-2-git-send-email-gmcharlt@gmail.com> References: <1288410555-19185-1-git-send-email-gmcharlt@gmail.com> <1288410555-19185-2-git-send-email-gmcharlt@gmail.com> Message-ID: <1288410555-19185-3-git-send-email-gmcharlt@gmail.com> From: Jared CAMINS-ESAKOV An incorrect definition in record.abs was resulting in searches on languages returning incorrect results. By changing the indexing mode from numeric to word, this patch fixes that problem. Signed-off-by: Galen Charlton --- etc/zebradb/marc_defs/marc21/biblios/record.abs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) mode change 100644 => 100755 etc/zebradb/marc_defs/marc21/biblios/record.abs diff --git a/etc/zebradb/marc_defs/marc21/biblios/record.abs b/etc/zebradb/marc_defs/marc21/biblios/record.abs old mode 100644 new mode 100755 index 6cf37ba..ba46db1 --- a/etc/zebradb/marc_defs/marc21/biblios/record.abs +++ b/etc/zebradb/marc_defs/marc21/biblios/record.abs @@ -44,7 +44,7 @@ melm 001 Control-number melm 005 Date/time-last-modified melm 007 Microform-generation:n:range(data,11,1),Material-type,ff7-00:w:range(data,0,1),ff7-01:w:range(data,1,1),ff7-02:w:range(data,2,1),ff7-01-02:w:range(data,0,2) -melm 008 date-entered-on-file:n:range(data,0,5),date-entered-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate:s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1),lf:w:range(data,33,1),bio:w:range(data,34,1),ln:n:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range(data,39,0) +melm 008 date-entered-on-file:n:range(data,0,5),date-entered-on-file:s:range(data,0,5),pubdate:w:range(data,7,4),pubdate:n:range(data,7,4),pubdate:y:range(data,7,4),pubdate:s:range(data,7,4),pl:w:range(data,15,3),ta:w:range(data,22,1),ff8-23:w:range(data,23,1),ff8-29:w:range(data,29,1),lf:w:range(data,33,1),bio:w:range(data,34,1),ln:w:range(data,35,3),ctype:w:range(data,24,4),Record-source:w:range(data,39,0) melm 010 LC-card-number,Identifier-standard melm 011 LC-card-number,Identifier-standard -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 05:49:13 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:49:13 -0400 Subject: [Koha-patches] [PATCH 1/3] [SIGNED-OFF] Update language mappings to fix Bug 5311 Message-ID: <1288410555-19185-1-git-send-email-gmcharlt@gmail.com> From: Jared Camins-Esakov This patch updates the language_rfc4646_to_iso639 mapping table with the correct mappings for several languages that were not mapped correctly to the codes used in MARC, including Finnish (which was not mapped at all), and Armenian (which was mapped to an obsolete code). This patch also changes English and French to use the proper three-letter codes, which will eliminate false positives when, for example, limiting by French brings up results in Afrikaans. This patch adds the changes to the updatedatabase.pl script, and removes the incorrectly specified DBversion in the previous patch. Signed-off-by: Galen Charlton --- .../data/mysql/en/mandatory/subtag_registry.sql | 30 ++++++++++++++------ installer/data/mysql/updatedatabase.pl | 16 ++++++++++ 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/installer/data/mysql/en/mandatory/subtag_registry.sql b/installer/data/mysql/en/mandatory/subtag_registry.sql index f2e0648..852805d 100644 --- a/installer/data/mysql/en/mandatory/subtag_registry.sql +++ b/installer/data/mysql/en/mandatory/subtag_registry.sql @@ -68,7 +68,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'hy', 'language', 'Armenian','2005-10-16'); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'hy','hy'); +VALUES( 'hy','arm'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES ( 'hy', 'language', 'hy', 'Հայերէն'); @@ -164,7 +164,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'en', 'language', 'English','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'en','en'); +VALUES( 'en','eng'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'en', 'English'); @@ -172,10 +172,13 @@ VALUES( 'en', 'language', 'en', 'English'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'en', 'language', 'fr', 'Anglais'); --- English +-- Finnish INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fi', 'language', 'Finnish','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'fi','fin'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fi', 'language', 'fi', 'suomi'); @@ -187,7 +190,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'fr', 'language', 'French','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'fr','fr'); +VALUES( 'fr','fre'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'fr', 'language', 'en', 'French'); @@ -202,8 +205,8 @@ VALUES( 'fr', 'language', 'fr', 'Français'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'lo', 'language', 'Lao','2005-10-16' ); --- INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) --- VALUES( 'lo','nor'); ??? +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'lo','lao'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'lo', 'language', 'lo', 'ພາສາລາວ'); @@ -312,7 +315,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); @@ -371,7 +374,7 @@ VALUES( 'la', 'language', 'en', 'Latin'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'la', 'language', 'fr', 'Latin'); --- Galacian +-- Galician INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'gl', 'language', 'Galician','2005-10-16' ); @@ -485,6 +488,9 @@ VALUES( 'ru', 'language', 'fr', 'Russe'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'sr', 'language', 'Serbian','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'sr','srp'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'sr', 'language', 'sr', 'српски'); @@ -527,6 +533,9 @@ VALUES( 'sv', 'language', 'fr', 'Su??dois'); INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'tet', 'language', 'Tetum','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'tet','tet'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'tet', 'language', 'tet', 'tetun'); @@ -582,10 +591,13 @@ VALUES( 'uk', 'language', 'en', 'Ukranian'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'uk', 'language', 'fr', 'Ukrainien'); --- English +-- Urdu INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'ur', 'language', 'Urdu','2005-10-16' ); +INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) +VALUES( 'ur','urd'); + INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'ur', 'language', 'en', 'Urdu'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 523c533..9b1ed15 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -3799,6 +3799,22 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = '3.03.00.XXX'; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='arm' WHERE rfc4646_subtag='hy';"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='eng' WHERE rfc4646_subtag='en';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'fi','fin');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='fre' WHERE rfc4646_subtag='fr';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'lo','lao');"); + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='it' WHERE rfc4646_subtag='ita';"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'sr','srp');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'tet','tet');"); + $dbh->do("INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) VALUES( 'ur','urd');"); + + print "Upgrade to $DBversion done (Correct language mappings)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 05:53:45 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Fri, 29 Oct 2010 23:53:45 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5327: Add basic unit tests to some C4 modules Message-ID: <1288410825-19505-1-git-send-email-gmcharlt@gmail.com> From: Katrin Fischer Signed-off-by: Galen Charlton --- t/Auth_with_cas.t | 14 ++++++++++++++ t/AuthoritiesMarc.t | 14 ++++++++++++++ t/Biblio.t | 14 ++++++++++++++ t/Breeding.t | 14 ++++++++++++++ t/Category.t | 14 ++++++++++++++ t/ClassSortRoutine.t | 14 ++++++++++++++ t/ClassSource.t | 14 ++++++++++++++ t/Contract.t | 14 ++++++++++++++ t/Creators.t | 14 ++++++++++++++ t/Csv.t | 14 ++++++++++++++ t/Heading.t | 14 ++++++++++++++ t/ItemCirculationAlertPreference.t | 14 ++++++++++++++ t/Items.t | 14 ++++++++++++++ t/Letters.t | 14 ++++++++++++++ t/Log.t | 14 ++++++++++++++ t/Matcher.t | 14 ++++++++++++++ t/Members.t | 14 ++++++++++++++ t/Message.t | 14 ++++++++++++++ t/NewsChannels.t | 14 ++++++++++++++ t/Overdues.t | 14 ++++++++++++++ t/Patroncards.t | 14 ++++++++++++++ t/Print.t | 14 ++++++++++++++ t/Reports.t | 14 ++++++++++++++ t/Ris.t | 14 ++++++++++++++ t/RotatingCollections.t | 14 ++++++++++++++ t/SMS.t | 14 ++++++++++++++ t/Tags.t | 14 ++++++++++++++ t/UploadedFile.t | 14 ++++++++++++++ 28 files changed, 392 insertions(+), 0 deletions(-) create mode 100755 t/Auth_with_cas.t create mode 100755 t/AuthoritiesMarc.t create mode 100755 t/Biblio.t create mode 100755 t/Breeding.t create mode 100755 t/Category.t create mode 100755 t/ClassSortRoutine.t create mode 100755 t/ClassSource.t create mode 100755 t/Contract.t create mode 100755 t/Creators.t create mode 100755 t/Csv.t create mode 100755 t/Heading.t create mode 100755 t/ItemCirculationAlertPreference.t create mode 100755 t/Items.t create mode 100755 t/Letters.t create mode 100755 t/Log.t create mode 100755 t/Matcher.t create mode 100755 t/Members.t create mode 100755 t/Message.t create mode 100755 t/NewsChannels.t create mode 100755 t/Overdues.t create mode 100755 t/Patroncards.t create mode 100755 t/Print.t create mode 100755 t/Reports.t create mode 100755 t/Ris.t create mode 100755 t/RotatingCollections.t create mode 100755 t/SMS.t create mode 100755 t/Tags.t create mode 100755 t/UploadedFile.t diff --git a/t/Auth_with_cas.t b/t/Auth_with_cas.t new file mode 100755 index 0000000..77dd21f --- /dev/null +++ b/t/Auth_with_cas.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Auth_with_cas'); +} + diff --git a/t/AuthoritiesMarc.t b/t/AuthoritiesMarc.t new file mode 100755 index 0000000..d59b43b --- /dev/null +++ b/t/AuthoritiesMarc.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::AuthoritiesMarc'); +} + diff --git a/t/Biblio.t b/t/Biblio.t new file mode 100755 index 0000000..c186058 --- /dev/null +++ b/t/Biblio.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Biblio'); +} + diff --git a/t/Breeding.t b/t/Breeding.t new file mode 100755 index 0000000..e672bf1 --- /dev/null +++ b/t/Breeding.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Breeding'); +} + diff --git a/t/Category.t b/t/Category.t new file mode 100755 index 0000000..6c251ea --- /dev/null +++ b/t/Category.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Category'); +} + diff --git a/t/ClassSortRoutine.t b/t/ClassSortRoutine.t new file mode 100755 index 0000000..be379a2 --- /dev/null +++ b/t/ClassSortRoutine.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ClassSortRoutine'); +} + diff --git a/t/ClassSource.t b/t/ClassSource.t new file mode 100755 index 0000000..ffb3104 --- /dev/null +++ b/t/ClassSource.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ClassSource'); +} + diff --git a/t/Contract.t b/t/Contract.t new file mode 100755 index 0000000..87df569 --- /dev/null +++ b/t/Contract.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Contract'); +} + diff --git a/t/Creators.t b/t/Creators.t new file mode 100755 index 0000000..5264d32 --- /dev/null +++ b/t/Creators.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Creators'); +} + diff --git a/t/Csv.t b/t/Csv.t new file mode 100755 index 0000000..068f094 --- /dev/null +++ b/t/Csv.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Csv'); +} + diff --git a/t/Heading.t b/t/Heading.t new file mode 100755 index 0000000..d780944 --- /dev/null +++ b/t/Heading.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Heading'); +} + diff --git a/t/ItemCirculationAlertPreference.t b/t/ItemCirculationAlertPreference.t new file mode 100755 index 0000000..d937c26 --- /dev/null +++ b/t/ItemCirculationAlertPreference.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::ItemCirculationAlertPreference'); +} + diff --git a/t/Items.t b/t/Items.t new file mode 100755 index 0000000..c19cdc7 --- /dev/null +++ b/t/Items.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Items'); +} + diff --git a/t/Letters.t b/t/Letters.t new file mode 100755 index 0000000..603e37e --- /dev/null +++ b/t/Letters.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Letters'); +} + diff --git a/t/Log.t b/t/Log.t new file mode 100755 index 0000000..eca6b9c --- /dev/null +++ b/t/Log.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Log'); +} + diff --git a/t/Matcher.t b/t/Matcher.t new file mode 100755 index 0000000..f374877 --- /dev/null +++ b/t/Matcher.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Matcher'); +} + diff --git a/t/Members.t b/t/Members.t new file mode 100755 index 0000000..bbcfc95 --- /dev/null +++ b/t/Members.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Members'); +} + diff --git a/t/Message.t b/t/Message.t new file mode 100755 index 0000000..7641d57 --- /dev/null +++ b/t/Message.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Message'); +} + diff --git a/t/NewsChannels.t b/t/NewsChannels.t new file mode 100755 index 0000000..bbcaab1 --- /dev/null +++ b/t/NewsChannels.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::NewsChannels'); +} + diff --git a/t/Overdues.t b/t/Overdues.t new file mode 100755 index 0000000..62725cb --- /dev/null +++ b/t/Overdues.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Overdues'); +} + diff --git a/t/Patroncards.t b/t/Patroncards.t new file mode 100755 index 0000000..60a7237 --- /dev/null +++ b/t/Patroncards.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Patroncards'); +} + diff --git a/t/Print.t b/t/Print.t new file mode 100755 index 0000000..1a05304 --- /dev/null +++ b/t/Print.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Print'); +} + diff --git a/t/Reports.t b/t/Reports.t new file mode 100755 index 0000000..667cb8c --- /dev/null +++ b/t/Reports.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Reports'); +} + diff --git a/t/Ris.t b/t/Ris.t new file mode 100755 index 0000000..30157e4 --- /dev/null +++ b/t/Ris.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Ris'); +} + diff --git a/t/RotatingCollections.t b/t/RotatingCollections.t new file mode 100755 index 0000000..10a4e20 --- /dev/null +++ b/t/RotatingCollections.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::RotatingCollections'); +} + diff --git a/t/SMS.t b/t/SMS.t new file mode 100755 index 0000000..d88633f --- /dev/null +++ b/t/SMS.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::SMS'); +} + diff --git a/t/Tags.t b/t/Tags.t new file mode 100755 index 0000000..83b3c9b --- /dev/null +++ b/t/Tags.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Tags'); +} + diff --git a/t/UploadedFile.t b/t/UploadedFile.t new file mode 100755 index 0000000..dd01e1b --- /dev/null +++ b/t/UploadedFile.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::UploadedFile'); +} + -- 1.7.0 From magnus at enger.priv.no Sat Oct 30 06:22:06 2010 From: magnus at enger.priv.no (Magnus Enger) Date: Sat, 30 Oct 2010 06:22:06 +0200 Subject: [Koha-patches] [PATCH 15/15] Bug 5327: Add basic unit tests to some C4 modules Message-ID: <1288412526-10580-1-git-send-email-magnus@enger.priv.no> --- t/Utils.t | 14 ++++++++++++++ t/XISBN.t | 14 ++++++++++++++ t/XSLT.t | 14 ++++++++++++++ 3 files changed, 42 insertions(+), 0 deletions(-) create mode 100755 t/Utils.t create mode 100755 t/XISBN.t create mode 100755 t/XSLT.t diff --git a/t/Utils.t b/t/Utils.t new file mode 100755 index 0000000..01fb10b --- /dev/null +++ b/t/Utils.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Utils'); +} + diff --git a/t/XISBN.t b/t/XISBN.t new file mode 100755 index 0000000..9e08efb --- /dev/null +++ b/t/XISBN.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::XISBN'); +} + diff --git a/t/XSLT.t b/t/XSLT.t new file mode 100755 index 0000000..1f78eb9 --- /dev/null +++ b/t/XSLT.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::XSLT'); +} + -- 1.7.0.4 From gmcharlt at gmail.com Sat Oct 30 06:41:24 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:41:24 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 4991: follow-up tweaks In-Reply-To: <1288413684-21944-1-git-send-email-gmcharlt@gmail.com> References: <1288413684-21944-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288413684-21944-2-git-send-email-gmcharlt@gmail.com> * make some strings translatable * display library name instead of code in add/edit holiday panel * minor textual fixes to hints Signed-off-by: Galen Charlton --- .../prog/en/modules/tools/holidays.tmpl | 22 ++++++++++---------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl index 423c7da..38b12dd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/holidays.tmpl @@ -21,7 +21,7 @@ $("#showHoliday").slideDown("fast"); $('#showDaynameOutput').html(dayName); $('#showDayname').val(dayName); - $('#showBranchNameOutput').html($("#branch").val()); + $('#showBranchNameOutput').html($("#branch :selected").text()); $('#showBranchName').val($("#branch").val()); $('#showDayOutput').html(day); $('#showDay').val(day); @@ -35,14 +35,14 @@ $('#showHolidayType').val(holidayType); if (holidayType == 'exception') { - $("#showOperationDelLabel").html('Delete this exception.'); - $("#holtype").attr("class","key exception").html("Holiday exception"); + $("#showOperationDelLabel").html(_('Delete this exception.')); + $("#holtype").attr("class","key exception").html(_("Holiday exception")); } else if(holidayType == 'weekday') { - $("#showOperationDelLabel").html('Delete this holiday.'); - $("#holtype").attr("class","key repeatableday").html("Repeatable holiday"); + $("#showOperationDelLabel").html(_('Delete this holiday.')); + $("#holtype").attr("class","key repeatableday").html(_("Repeatable holiday")); } else { - $("#showOperationDelLabel").html('Delete this holiday.'); - $("#holtype").attr("class","key holiday").html("Unique holiday"); + $("#showOperationDelLabel").html(_('Delete this holiday.')); + $("#holtype").attr("class","key holiday").html(_("Unique holiday")); } if (exceptionPosibility == 1) { @@ -58,7 +58,7 @@ $("#newHoliday").slideDown("fast"); $("#newDaynameOutput").html(dayName); $("#newDayname").val(dayName); - $("#newBranchNameOutput").html($('#branch').val()); + $("#newBranchNameOutput").html($('#branch :selected').text()); $("#newBranchName").val($('#branch').val()); $("#newDayOutput").html(day); $("#newDay").val(day); @@ -201,7 +201,7 @@

    Add new holiday

    1. - Library + Library:
    2. @@ -224,7 +224,7 @@
    3. . [?] -
      Make a single holiday. For example, selecting August 1st, 2012 will make it holiday, but will not affect August 1st in other years.
      +
      Make a single holiday. For example, selecting August 1st, 2012 will make it a holiday, but will not affect August 1st in other years.
    4. . @@ -234,7 +234,7 @@
    5. . [?] -
      This will take this day and month as a reference to make it holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.
      +
      This will take this day and month as a reference to make it a holiday. Through this option, you can repeat this rule for every year. For example, selecting August 1st will make August 1st a holiday every year.
    6. -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 06:42:59 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:42:59 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5327: Add basic unit tests to some C4 modules Message-ID: <1288413779-22069-1-git-send-email-gmcharlt@gmail.com> From: Magnus Enger Signed-off-by: Galen Charlton --- t/Utils.t | 14 ++++++++++++++ t/XISBN.t | 14 ++++++++++++++ t/XSLT.t | 14 ++++++++++++++ 3 files changed, 42 insertions(+), 0 deletions(-) create mode 100755 t/Utils.t create mode 100755 t/XISBN.t create mode 100755 t/XSLT.t diff --git a/t/Utils.t b/t/Utils.t new file mode 100755 index 0000000..01fb10b --- /dev/null +++ b/t/Utils.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::Utils'); +} + diff --git a/t/XISBN.t b/t/XISBN.t new file mode 100755 index 0000000..9e08efb --- /dev/null +++ b/t/XISBN.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::XISBN'); +} + diff --git a/t/XSLT.t b/t/XSLT.t new file mode 100755 index 0000000..1f78eb9 --- /dev/null +++ b/t/XSLT.t @@ -0,0 +1,14 @@ +#!/usr/bin/perl +# +# This Koha test module is a stub! +# Add more tests here!!! + +use strict; +use warnings; + +use Test::More tests => 1; + +BEGIN { + use_ok('C4::XSLT'); +} + -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 06:48:19 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:48:19 -0400 Subject: [Koha-patches] [PATCH 2/2] [SIGNED-OFF] bug 5171 change 'edit items' to read 'edit item' when next to 1 item In-Reply-To: <1288414099-22243-1-git-send-email-gmcharlt@gmail.com> References: <1288414099-22243-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288414099-22243-2-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/catalogue/moredetail.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl index 8577193..55ca81f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tmpl @@ -42,7 +42,7 @@

      ">Barcode

      -

      Item Information &itemnumber=">[Edit Items]

      +

      Item Information &itemnumber=">[Edit Item]

      1. Home Library:  
      2. -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 06:48:18 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:48:18 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] bug 5168 change link text from holdings to items Message-ID: <1288414099-22243-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/cataloguing/addbooks.tmpl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl index 778e90f..ff4eb83 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tmpl @@ -104,7 +104,7 @@ - ">Add holdings + ">Add/Edit Items -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 06:52:27 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:52:27 -0400 Subject: [Koha-patches] Pull request - git://git.librarypolice.com/git/koha-galen.git bug4991 Message-ID: <1288414347-22506-1-git-send-email-gmcharlt@gmail.com> Owen's patch gets dropped by git-send-email The following changes since commit 391ce2b4693a98753b16980d42c3a5682660ba6f: Galen Charlton (1): bug 3211: fix some errors that crept into the cleanup are available in the git repository at: git://git.librarypolice.com/git/koha-galen.git bug4991 Galen Charlton (1): bug 4991: follow-up tweaks Owen Leonard (1): Fix for Bug 4991, Overhaul of Calendar interface C4/Calendar.pm | 2 +- .../intranet-tmpl/prog/en/css/staff-global.css | 6 +- .../prog/en/modules/tools/holidays.tmpl | 329 ++++++++++---------- tools/holidays.pl | 20 +- 4 files changed, 173 insertions(+), 184 deletions(-) From gmcharlt at gmail.com Sat Oct 30 06:53:35 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 00:53:35 -0400 Subject: [Koha-patches] [PATCH 2/2] bug 4991: follow-up tweaks In-Reply-To: <1288413684-21944-2-git-send-email-gmcharlt@gmail.com> References: <1288413684-21944-1-git-send-email-gmcharlt@gmail.com> <1288413684-21944-2-git-send-email-gmcharlt@gmail.com> Message-ID: Hi, Please disregard and use my pull request for the bug4991 branch. The patch that this depends on gets dropped by git-send-email. Regards, Galen On Sat, Oct 30, 2010 at 12:41 AM, Galen Charlton wrote: > * make some strings translatable > * display library name instead of code in add/edit > ?holiday panel > * minor textual fixes to hints From gmcharlt at gmail.com Sat Oct 30 07:13:22 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 01:13:22 -0400 Subject: [Koha-patches] [PATCH 1/2] [SIGNED-OFF] add missing help file for merging records Message-ID: <1288415603-23648-1-git-send-email-gmcharlt@gmail.com> From: Nicole Engard Signed-off-by: Galen Charlton --- .../prog/en/modules/help/cataloguing/merge.tmpl | 23 ++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl new file mode 100644 index 0000000..74357a0 --- /dev/null +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl @@ -0,0 +1,23 @@ + + +

        Merging Items

        + +

        Important: Merging will only work with two items that use the same bibliographic framework.

        + +

        The easiest way to merge together duplicate bibliographic records is to add them to a list and use the Merge Tool from there.

        + +

        From the list, check the two items you want to merge. If you choose more than or fewer than 2, you will be presented with an error.

        + +

        Once you have selected the records you want to merge, click the 'Merge selected items' button. You will be asked which of the two records you would like to keep as your primary record and which will be deleted after the merge.

        + +

        You will be presented with the MARC for both of the records (each accessible by tabs labeled with the bib numbers for those records). By default the entire first record will be selected, uncheck the fields you don't want in the final (destination) record and then move on to the second tab to choose which fields should be in the final (destination) record.

        + +

        Should you try to add a field that is not repeatable two times (like choosing the 245 field from both record #1 and #2) you will be presented with an error

        + +

        Most importantly you want to make sure that all of the items from the two records are attached to the new record. To do this you want to make sure that all 952 files are selected before completing the merge.

        + +

        Once you have completed your selections click the 'merge' button. The primary record will now show the data you chose for it, and the second record will be deleted.

        + +

        Important: It is important to rebuild your zebra index immediately after merging records. If a search is performed for a record which has been deleted Koha will present the patrons with an error in the OPAC.

        + + \ No newline at end of file -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 07:13:23 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 01:13:23 -0400 Subject: [Koha-patches] [PATCH 2/2] tweak wording of merge target In-Reply-To: <1288415603-23648-1-git-send-email-gmcharlt@gmail.com> References: <1288415603-23648-1-git-send-email-gmcharlt@gmail.com> Message-ID: <1288415603-23648-2-git-send-email-gmcharlt@gmail.com> Since the merge functionality is for merging biblio records, not items, made the language more precise. Signed-off-by: Galen Charlton --- .../prog/en/modules/help/cataloguing/merge.tmpl | 8 ++++---- .../prog/en/modules/virtualshelves/shelves.tmpl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl index 74357a0..aba4e22 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/cataloguing/merge.tmpl @@ -2,13 +2,13 @@

        Merging Items

        -

        Important: Merging will only work with two items that use the same bibliographic framework.

        +

        Important: Merging will only work with two bibliographic records that use the same bibliographic framework.

        The easiest way to merge together duplicate bibliographic records is to add them to a list and use the Merge Tool from there.

        -

        From the list, check the two items you want to merge. If you choose more than or fewer than 2, you will be presented with an error.

        +

        From the list, check the two bibliographic records you want to merge. If you choose more than or fewer than 2, you will be presented with an error.

        -

        Once you have selected the records you want to merge, click the 'Merge selected items' button. You will be asked which of the two records you would like to keep as your primary record and which will be deleted after the merge.

        +

        Once you have selected the records you want to merge, click the 'Merge selected records' button. You will be asked which of the two records you would like to keep as your primary record and which will be deleted after the merge.

        You will be presented with the MARC for both of the records (each accessible by tabs labeled with the bib numbers for those records). By default the entire first record will be selected, uncheck the fields you don't want in the final (destination) record and then move on to the second tab to choose which fields should be in the final (destination) record.

        @@ -20,4 +20,4 @@

        Important: It is important to rebuild your zebra index immediately after merging records. If a search is performed for a record which has been deleted Koha will present the patrons with an error in the OPAC.

        - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl index 547668a..35c022b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tmpl @@ -211,8 +211,8 @@ function placeHold () {
        - - + +
        -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 07:33:42 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 01:33:42 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5135 - Authorized value input maxlength should match table column Message-ID: <1288416822-23865-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/authorised_values.tmpl | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl index 367930a..7d9bec1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tmpl @@ -46,7 +46,7 @@
        1. - + Category @@ -54,15 +54,15 @@
        2. " /> - " /> + " maxlength="80" />
        3. - " /> + " maxlength="80" />
        4. - " /> + " maxlength="80" />
        -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 07:36:57 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 01:36:57 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Fix for Bug 5136, Replace SQL with call to GetAuthorisedValues Message-ID: <1288417017-23991-1-git-send-email-gmcharlt@gmail.com> From: Owen Leonard An embedded query in circulation.pl for BOR_NOTES authorized values can be replaced with a call to GetAuthorisedValues Signed-off-by: Galen Charlton --- circ/circulation.pl | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 4b67920..1d84aa4 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -700,15 +700,7 @@ my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'}); $template->param( picture => 1 ) if $picture; # get authorised values with type of BOR_NOTES -my @canned_notes; -my $sth = $dbh->prepare('SELECT * FROM authorised_values WHERE category = "BOR_NOTES"'); -$sth->execute(); -while ( my $row = $sth->fetchrow_hashref() ) { - push @canned_notes, $row; -} -if ( scalar( @canned_notes ) ) { - $template->param( canned_bor_notes_loop => \@canned_notes ); -} +my $canned_notes = GetAuthorisedValues("BOR_NOTES");; $template->param( debt_confirmed => $debt_confirmed, @@ -717,5 +709,6 @@ $template->param( AllowRenewalLimitOverride => C4::Context->preference("AllowRenewalLimitOverride"), dateformat => C4::Context->preference("dateformat"), DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(), + canned_bor_notes_loop => $canned_notes, ); output_html_with_http_headers $query, $cookie, $template->output; -- 1.7.0 From gmcharlt at gmail.com Sat Oct 30 07:52:50 2010 From: gmcharlt at gmail.com (Galen Charlton) Date: Sat, 30 Oct 2010 01:52:50 -0400 Subject: [Koha-patches] [PATCH] [SIGNED-OFF 4/4] Fix for Bug 5082 - Not translatable name of default framework 'Default' in MARCdetail.tmpl In-Reply-To: <1288417970-24850-3-git-send-email-gmcharlt@gmail.com> References: <1288417970-24850-1-git-send-email-gmcharlt@gmail.com> <1288417970-24850-2-git-send-email-gmcharlt@gmail.com> <1288417970-24850-3-git-send-email-gmcharlt@gmail.com> Message-ID: <1288417970-24850-4-git-send-email-gmcharlt@gmail.com> From: Owen Leonard This patch also fixes an unreported bug where switching from any other framework to 'Default' would bring up no MARC data. Signed-off-by: Galen Charlton --- catalogue/MARCdetail.pl | 37 +++++++------------ .../prog/en/modules/catalogue/MARCdetail.tmpl | 7 +++- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/catalogue/MARCdetail.pl b/catalogue/MARCdetail.pl index 6547567..b543d75 100755 --- a/catalogue/MARCdetail.pl +++ b/catalogue/MARCdetail.pl @@ -90,30 +90,21 @@ my $itemcount = GetItemsCount($biblionumber); $template->param( count => $itemcount, bibliotitle => $biblio->{title}, ); -#Getting the list of all frameworks -my $queryfwk = - $dbh->prepare("select frameworktext, frameworkcode from biblio_framework"); -$queryfwk->execute; -my %select_fwk; -my @select_fwk; -my $curfwk; -push @select_fwk, "Default"; -$select_fwk{"Default"} = "Default"; - -while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) { - push @select_fwk, $fwk; - $select_fwk{$fwk} = $description; +# Getting the list of all frameworks +# get framework list +my $frameworks = getframeworks; +my @frameworkcodeloop; +foreach my $thisframeworkcode ( keys %$frameworks ) { + my %row = ( + value => $thisframeworkcode, + frameworktext => $frameworks->{$thisframeworkcode}->{'frameworktext'}, + ); + if ($frameworkcode eq $thisframeworkcode){ + $row{'selected'}= 1; + } + push @frameworkcodeloop, \%row; } -$curfwk=$frameworkcode; -my $framework=CGI::scrolling_list( -name => 'Frameworks', - -id => 'Frameworks', - -default => $curfwk, - -OnChange => 'Changefwk(this);', - -values => \@select_fwk, - -labels => \%select_fwk, - -size => 1, - -multiple => 0 ); -$template->param(framework => $framework); +$template->param( frameworkcodeloop => \@frameworkcodeloop, ); # fill arrays my @loop_data = (); my $tag; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl index b5dd80b..8880f8b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tmpl @@ -36,7 +36,12 @@ function Changefwk(FwkList) { -

        With Framework :

        +

        With Framework :