Merge remote branch 'kc/master'

This commit is contained in:
Chris Cormack 2010-07-29 09:35:42 +12:00
commit c6a38d75b3
13 changed files with 26 additions and 283 deletions

View file

@ -1,142 +0,0 @@
package C4::Frequency;
# Copyright 2000-2002 Biblibre SARL
#
# 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
use C4::Context;
use C4::SQLHelper qw<:all>;
use C4::Debug;
use vars qw($VERSION @ISA @EXPORT);
BEGIN {
# set the version for version checking
$VERSION = 3.01;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetFrequencies
&GetFrequency
&new
&all
&AddFrequency
&ModFrequency
&DelFrequency
);
}
# -------------------------------------------------------------------
my %count_issues_a_year=(
day=>365,
week=>52,
month=>12,
quarter=>4,
year=>1
);
sub new {
my ($class, $opts) = @_;
bless $opts => $class;
}
sub AddFrequency {
my ($class,$frequency) = @_;
return InsertInTable("subscription_frequency",$frequency);
}
sub GetExpectedissuesayear {
my ($class,$unit,$issuesperunit,$unitperissues) = @_;
return Int($count_issues_a_year{$unit}/$issuesperunit)*$unitperissues;
}
# -------------------------------------------------------------------
sub ModFrequency {
my ($class,$frequency) = @_;
return UpdateInTable("subscription_frequency",$frequency);
}
# -------------------------------------------------------------------
sub DelFrequency {
my ($class,$frequency) = @_;
return DeleteInTable("subscription_frequency",$frequency);
}
sub all {
my ($class) = @_;
my $dbh = C4::Context->dbh;
return map { $class->new($_) } @{$dbh->selectall_arrayref(
# The subscription_frequency table is small enough for
# `SELECT *` to be harmless.
"SELECT * FROM subscription_frequency ORDER BY description",
{ Slice => {} },
)};
}
=head3 GetFrequency
=over 4
&GetFrequency($freq_id);
gets frequency where $freq_id is the identifier
=back
=cut
# -------------------------------------------------------------------
sub GetFrequency {
my ($freq_id) = @_;
return undef unless $freq_id;
my $results= SearchInTable("subscription_frequency",{frequency_id=>$freq_id}, undef, undef,undef, undef, "wide");
return undef unless ($results);
return $$results[0];
}
=head3 GetFrequencies
=over 4
&GetFrequencies($filter, $order_by);
gets frequencies restricted on filters
=back
=cut
# -------------------------------------------------------------------
sub GetFrequencies {
my ($filters,$orderby) = @_;
return SearchInTable("subscription_frequency",$filters, $orderby, undef,undef, undef, "wide");
}
END { } # module clean-up code here (global destructor)
1;
__END__
=head1 AUTHOR
Koha Development Team <http://koha-community.org/>
=cut

View file

@ -1,129 +0,0 @@
package C4::Numberpattern;
# Copyright 2000-2002 Biblibre SARL
#
# 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
use C4::Context;
use C4::SQLHelper qw<:all>;
use C4::Debug;
use vars qw($VERSION @ISA @EXPORT);
BEGIN {
# set the version for version checking
$VERSION = 3.01;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
&GetNumberpatterns
&GetNumberpattern
&new
&all
&AddNumberpattern
&ModNumberpattern
&DelNumberpattern
);
}
# -------------------------------------------------------------------
sub new {
my ($class, $opts) = @_;
bless $opts => $class;
}
sub AddNumberpattern {
my ($class,$numberpattern) = @_;
return InsertInTable("subscription_numberpattern",$numberpattern);
}
# -------------------------------------------------------------------
sub ModNumberpattern {
my ($class,$numberpattern) = @_;
return UpdateInTable("subscription_numberpattern",$numberpattern);
}
# -------------------------------------------------------------------
sub DelNumberpattern {
my ($class,$numberpattern) = @_;
return DeleteInTable("subscription_numberpattern",$numberpattern);
}
sub all {
my ($class) = @_;
my $dbh = C4::Context->dbh;
return map { $class->new($_) } @{$dbh->selectall_arrayref(
# The subscription_numberpattern table is small enough for
# `SELECT *` to be harmless.
"SELECT * FROM subscription_numberpattern ORDER BY description",
{ Slice => {} },
)};
}
=head3 GetNumberpattern
=over 4
&GetNumberpattern($freq_id);
gets numberpattern where $freq_id is the identifier
=back
=cut
# -------------------------------------------------------------------
sub GetNumberpattern {
my ($numpattern_id) = @_;
return undef unless $num_patternid;
my $results= SearchInTable("subscription_numberpattern",{numberpattern_id=>$freq_id}, undef, undef,undef, undef, "wide");
return undef unless ($results);
return $$results[0];
}
=head3 GetFrequencies
=over 4
&GetFrequencies($filter, $order_by);
gets frequencies restricted on filters
=back
=cut
# -------------------------------------------------------------------
sub GetNumberPatterns {
my ($filters,$orderby) = @_;
return SearchInTable("subscription_numberpattern",$filters, $orderby, undef,undef, undef, "wide");
}
END { } # module clean-up code here (global destructor)
1;
__END__
=head1 AUTHOR
Koha Development Team <http://koha-community.org/>
=cut

View file

@ -97,7 +97,7 @@ foreach my $thisframeworkcode ( keys %$frameworks ) {
if ( $row{'value'} eq $frameworkcode){
$row{'active'} = 'true';
}
push @frameworkcodeloop, $row;
push @frameworkcodeloop, \%row;
}
$template->param( frameworkcode => $frameworkcode,

View file

@ -837,7 +837,7 @@ sub get_prefs_from_files {
my $name = $element->{pref};
next unless $name;
push @names, $name;
last;
next;
}
}
}

2
debian/control vendored
View file

@ -1,5 +1,5 @@
Source: koha
Maintainer: Lars Wirzenius <lars@catalyst.net.nz>
Maintainer: Robin Sheat <robin@catalyst.net.nz>
Section: web
Priority: optional
Standards-Version: 3.8.4

View file

@ -46,8 +46,8 @@ lockDir: /var/lock/koha/__KOHASITE__/authorities
perm.anonymous:ar
perm.kohauser:rw
passwd: /etc/koha/sites/__KOHASITE__/zebra.passwd
register: /var/lib/koha/__KOHASITE__/biblios/register:4G
shadow: /var/lib/koha/__KOHASITE__/biblios/shadow:1G
register: /var/lib/koha/__KOHASITE__/authorities/register:4G
shadow: /var/lib/koha/__KOHASITE__/authorities/shadow:1G
# Temp File area for result sets
setTmpDir: /var/lib/koha/__KOHASITE__/authorities/tmp

View file

@ -262,6 +262,7 @@ CREATE TABLE `borrowers` (
KEY `categorycode` (`categorycode`),
KEY `branchcode` (`branchcode`),
KEY `userid` (`userid`),
KEY `guarantorid` (`guarantorid`),
CONSTRAINT `borrowers_ibfk_1` FOREIGN KEY (`categorycode`) REFERENCES `categories` (`categorycode`),
CONSTRAINT `borrowers_ibfk_2` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View file

@ -3687,6 +3687,19 @@ if (C4::Context->preference('Version') < TransformToNum($DBversion)){
SetVersion ($DBversion);
}
$DBversion = '3.01.00.144';
if (C4::Context->preference('Version') < TransformToNum($DBversion)){
$dbh->do(qq{UPDATE systempreferences SET value='normal' where value='default' and variable='IntranetBiblioDefaultView'});
print "Update the 'default' to 'normal' for the IntranetBiblioDefaultView syspref (bug 5007)";
SetVersion ($DBversion);
}
$DBversion = "3.01.00.145";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("ALTER TABLE borrowers ADD KEY `guarantorid` (guarantorid);");
print "Upgrade to $DBversion done (Add index on guarantorid)\n";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)

View file

@ -21,7 +21,7 @@
<!-- TMPL_IF NAME="budget_period_id" -->
var budgets_menu = [
{ text: _("New budget"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form" },
{ text: _("New fund for '<!-- TMPL_VAR NAME="budget_period_description" -->'"), url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->"
{ text: _("New fund for") + " '<!-- TMPL_VAR NAME="budget_period_description" -->'", url: "/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->"
<!-- TMPL_IF NAME="budget_period_locked" -->, disabled:true<!-- /TMPL_IF -->
<!-- TMPL_UNLESS NAME="CAN_user_acquisition_budget_add_del" -->, disabled:true <!-- /TMPL_UNLESS -->
}
@ -32,8 +32,8 @@
<!-- TMPL_IF NAME="budget_period_id" -->
var periods_menu = [
{ text: _("Edit budget '<!-- TMPL_VAR NAME="budget_period_description" -->'"), url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },
{ text: _("Duplicate budget '<!-- TMPL_VAR NAME="budget_period_description" -->'") }
{ text: _("Edit budget") + " '<!-- TMPL_VAR NAME="budget_period_description" -->'", url: "/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&budget_period_id=<!-- TMPL_VAR NAME="budget_period_id" -->" },
{ text: _("Duplicate budget") + " '<!-- TMPL_VAR NAME="budget_period_description" -->'" }
]
<!-- /TMPL_IF -->

View file

@ -98,7 +98,7 @@ Cataloging:
- By default, display biblio records in
- pref: IntranetBiblioDefaultView
choices:
default: normal form.
normal: normal form.
marc: MARC form.
labeled_marc: Labelled MARC form
isbd: ISBD form (see below).

View file

@ -9,7 +9,7 @@
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> &rsaquo;
<a href="/cgi-bin/koha/labels/labels-home.pl">Labels Home</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-home.pl">Labels Home</a> &rsaquo;
<a href="/cgi-bin/koha/labels/label-manage.pl?label_element=batch">Mange Label Batches</a> &rsaquo;
Manage Batch Number <!-- TMPL_VAR NAME="batch_id" -->
</div>

View file

@ -11,7 +11,7 @@ use strict;
sub kohaversion {
our $VERSION = '3.01.00.143';
our $VERSION = '3.01.00.145';
# version needs to be set this way
# so that it can be picked up by Makefile.PL

View file

@ -157,7 +157,7 @@ $template->param(
);
$template->param(
branchloop=>$branches,
categoryloop=>\@categories,
categories=>\@categories,
);