=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Paul POULAIN paul.poulain@free.fr
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Paul POULAIN paul.poulain@free.fr
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com> refactoring code by Andrew Moore.
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
C4::Installer is a refactoring of logic originally from installer/installer.pl, which was
originally written by Henri-Damien Laurant.
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=head1 SEE ALSO
my ($itemnumber, $borrowernumber, $biblionumber) = @_;
my $dbh = C4::Context->dbh;
- my $borrower = C4::Members::GetMember( $borrowernumber );
+ my $borrower = C4::Members::GetMember(borrowernumber => $borrowernumber);
my $letter_code;
my $print_mode = 0;
my $messagingprefs;
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
use C4::Context;
use C4::Dates qw(format_date_in_iso);
use C4::Debug;
-use YAML;
require Exporter;
use vars qw($VERSION @ISA @EXPORT_OK %EXPORT_TAGS);
use C4::Branch;
use C4::Reserves; # CheckReserves
use C4::Debug;
-use YAML;
use URI::Escape;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $DEBUG);
#
foreach ( keys %{ C4::Context->stopwords } ) {
next if ( $_ =~ /(and|or|not)/ ); # don't remove operators
- $debug && warn "$_ Dump($operand)";
if ( my ($matched) = ($operand =~
/([^\X\p{isAlnum}]\Q$_\E[^\X\p{isAlnum}]|[^\X\p{isAlnum}]\Q$_\E$|^\Q$_\E[^\X\p{isAlnum}])/gi))
{
=head2 searchResults
+ my @search_results = searchResults($search_context, $searchdesc, $hits,
+ $results_per_page, $offset, $scan,
+ @marcresults, $hidelostitems);
+
Format results in a form suitable for passing to the template
=cut
# IMO this subroutine is pretty messy still -- it's responsible for
# building the HTML output for the template
sub searchResults {
- my ( $searchdesc, $hits, $results_per_page, $offset, $scan, @marcresults, $hidelostitems ) = @_;
+ my ( $search_context, $searchdesc, $hits, $results_per_page, $offset, $scan, @marcresults, $hidelostitems ) = @_;
my $dbh = C4::Context->dbh;
my @newresults;
+ $search_context = 'opac' unless $search_context eq 'opac' or $search_context eq 'intranet';
+
#Build branchnames hash
#find branchname
#get branch information.....
use C4::Charset;
SetUTF8Flag($marcrecord);
$debug && warn $marcrecord->as_formatted;
- if (C4::Context->preference("XSLTResultsDisplay") && !$scan) {
- $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display(
- $oldbiblio->{biblionumber}, $marcrecord, 'Results' );
+ if (!$scan && $search_context eq 'opac' && C4::Context->preference("OPACXSLTResultsDisplay")) {
+ # FIXME note that XSLTResultsDisplay (use of XSLT to format staff interface bib search results)
+ # is not implemented yet
+ $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, 'Results',
+ $search_context);
}
# last check for norequest : if itemtype is notforloan, it can't be reserved either, whatever the items
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=head1 SEE ALSO
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
=cut
New Zealand by Katipo Communications, Ltd and first deployed in January of 2000
for the Horowhenua Library Trust, it is currently maintained by a team of
software providers and library technology staff from around the globe. Learn
-more about the Koha project at http://koha.org.
+more about the Koha project at http://koha-community.org.
INSTALLATION
============
my $period_total = 0;
my ( $period_alloc_total, $base_spent_total );
- use YAML;
- $debug && warn Dump(@budgets);
#This Looks WEIRD to me : should budgets be filtered in such a way ppl who donot own it would not see the amount spent on the budget by others ?
foreach my $budget (@budgets) {
if ($server =~/biblioserver/) { # this is the local bibliographic server
$hits = $results_hashref->{$server}->{"hits"};
my $page = $cgi->param('page') || 0;
- my @newresults = searchResults( $query_desc,$hits,$results_per_page,$offset,$scan,@{$results_hashref->{$server}->{"RECORDS"}});
+ my @newresults = searchResults('intranet', $query_desc, $hits, $results_per_page, $offset, $scan,
+ @{$results_hashref->{$server}->{"RECORDS"}});
$total = $total + $results_hashref->{$server}->{"hits"};
## If there's just one result, redirect to the detail page
if ($total == 1) {
# format output
# SimpleSearch() give the results per page we want, so 0 offet here
my $total = scalar @$marcresults;
- my @newresults = searchResults( $query, $total, $results_per_page, 0, 0, @$marcresults );
+ my @newresults = searchResults( 'intranet', $query, $total, $results_per_page, 0, 0, @$marcresults );
$template->param(
total => $total_hits,
query => $query,
use C4::Items;
use C4::Biblio;
use C4::Serials;
-use YAML;
my $input = new CGI;
my @biblionumber = $input->param('biblionumber');
# Moving items from the other record to the reference record
my $itemnumbers = get_itemnumbers_of($frombiblio);
- use Data::Dumper;
foreach my $itloop ($itemnumbers->{$frombiblio}) {
foreach my $itemnumber (@$itloop) {
my $res = MoveItemFromBiblio($itemnumber, $frombiblio, $tobiblio);
--- /dev/null
+#!/usr/bin/python
+
+import re
+import debian.deb822
+
+exclusions = [
+ 'debhelper',
+]
+
+exclusions = [re.compile(s) for s in exclusions]
+
+depstring = debian.deb822.Deb822(file('debian/control')).get('Build-Depends')
+deps = [s.strip() for s in depstring.split(',')]
+result = []
+for dep in deps:
+ for ex in exclusions:
+ if ex.match(dep):
+ break
+ else:
+ result.append(dep)
+print 'koha:Depends=%s' % ', '.join(result)
-koha (3.01.00.128-1~) squeeze; urgency=low
+koha (3.2~0.1) experimental; urgency=low
* Initial release.
Section: web
Priority: optional
Standards-Version: 3.8.4
-Build-Depends: koha-dev-env, debhelper (>= 7.0.50), gettext
+# NOTA BENE: Build dependencies end up as runtime dependencies as well.
+# See debian/rules, the override_dh_gencontrol rules.
+# There are some exceptions.
+Build-Depends: debhelper (>= 7.0.50), gettext,
+ perl,
+ libalgorithm-checkdigits-perl,
+ libauthen-cas-client-perl,
+ libbiblio-endnotestyle-perl,
+ libcgi-session-perl,
+ libcgi-session-serialize-yaml-perl,
+ libclass-accessor-perl,
+ libclass-factory-util-perl,
+ libdbd-sqlite2-perl,
+ libdbd-mysql-perl,
+ libdbi-perl,
+ libdata-ical-perl,
+ libdate-calc-perl,
+ libdate-ical-perl,
+ libdate-manip-perl,
+ libemail-date-perl,
+ libgd-gd2-perl,
+ libgraphics-magick-perl,
+ libhtml-scrubber-perl,
+ libhtml-template-pro-perl,
+ libjson-perl,
+ liblingua-stem-perl,
+ liblingua-stem-snowball-perl,
+ liblist-moreutils-perl,
+ liblocale-po-perl,
+ libmarc-charset-perl,
+ libmarc-crosswalk-dublincore-perl,
+ libmarc-record-perl,
+ libmarc-xml-perl,
+ libmime-lite-perl,
+ libmail-sendmail-perl,
+ libnet-ldap-perl,
+ libnet-z3950-zoom-perl,
+ libnumber-format-perl,
+ libpdf-api2-perl,
+ libpdf-reuse-perl,
+ libpdf-reuse-barcode-perl,
+ libpdf-table-perl,
+ libpoe-perl,
+ libsms-send-perl,
+ libschedule-at-perl,
+ libstorable-perl,
+ libtext-csv-perl,
+ libxml-dumper-perl,
+ libxml-libxml-perl,
+ libxml-libxslt-perl,
+ libxml-rss-perl,
+ libxml-sax-writer-perl,
+ libxml-simple-perl,
+ libyaml-syck-perl,
+ libyaml-perl,
+ libmodule-install-perl,
+ libhttp-oai-perl,
+ libtext-csv-encoded-perl,
+ libpdf-api2-simple-perl,
+ libmemoize-memcached-perl,
+ liblocale-currency-format-perl
-Package: koha
+Package: koha-common
Architecture: all
-Depends: ${shlib:Depends}, ${misc:Depends},
- dbconfig-common,
- koha-dev-env,
+Depends: ${shlib:Depends}, ${misc:Depends}, ${koha:Depends},
apache2,
- mysql-server,
- daemon,
at,
+ daemon,
idzebra-2.0,
- yaz,
libjs-jquery,
+ libjs-yui,
+ mysql-client,
tinymce2,
- libjs-yui
-Recommends: mysql-client
+ yaz
+Suggests: mysql-server
Homepage: http://koha-community.org/
Description: integrated (physical) library management system
Koha is an Integrated Library Managment system for real-world libraries
(the kinds with books).
+ .
+ This package contains everything needed to run Koha, except the site
+ specific configuration files. See the package koha for the rest.
+Package: koha
+Architecture: all
+Depends: ${shlib:Depends}, ${misc:Depends},
+ koha-common,
+ dbconfig-common,
+ mysql-server
+Homepage: http://koha-community.org/
+Description: integrated (physical) library management system
+ Koha is an Integrated Library Managment system for real-world libraries
+ (the kinds with books).
+ .
+ This package contains site-specific configuration files and sets up
+ the MySQL database for Koha. For simplicity, the database server is
+ assumed to run on the same host as Koha. This package also does some
+ Apache reconfiguration.
-This will be filled in later.
+Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
+Name: Koha
+Maintainer: Lars Wirzenius <lars@catalyst.net.nz>
+Source: git://git.koha-community.org/koha.git
-Copyright by various people.
-
-Debian packaging copyright:
-
-Copyright 2010 Catalyst IT Ltd
+Files: *
+Copyright: 2000-2010, various people and organisations
+License: GPL-2+
+ 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
+ .
+ On a Debian system, you can find a copy of GPL version 2 at
+ /usr/share/common-licenses/GPL-2 .
--- /dev/null
+Koha filesystem layout on Debian
+================================
+
+The Debian packaging of Koha puts files in the following places:
+
+* /etc/koha -- system configuration files
+* /etc/cron.hourly/koha-common -- cron job
+* /usr/share/koha -- shared files (HTML templates, Perl code, etc)
+
+Each Koha instance has files in the following places:
+
+* /etc/koha/sites/$name -- confguration files
+* /etc/apache2/sites-available/$name -- Apache config file
+* /var/lib/koha/$name -- Zebra databases
+* /var/log/koha/$name -- log files (Apache, Zebra)
+* /var/lock/koha/$name -- run-time lock files
+* /var/run/koha/$name -- run-time sockets etc
+* /var/spool/koha/$name -- database dumps
+
+
+Koha and MySQL
+==============
+
+koha-common's postinst script sets up the /etc/mysql/koha-common.cnf,
+and all scripts use that to access the MySQL database. By default, it
+is a symlink pointing at debian.cnf, and only works on localhost.
+If you wish, you can create a file /etc/mysql/koha-common.cnf instead
+of the symlink, and point it at a remote server. There is currently
+no tool to help you do that, but it should be fairly straightforward.
--- /dev/null
+# /etc/cron.d/koha-common
+#
+# Call koha-rebuild-zebra for each enabled Koha instance, to make sure the
+# Zebra indexes are up to date.
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+*/5 * * * * root test -x /usr/sbin/koha-rebuild-zebra && koha-rebuild-zebra $(koha-list --enabled)
--- /dev/null
+#!/bin/sh
+# /etc/cron.hourly/koha-common -- Hourly housekeeping tasks for all Kohas.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+koha-foreach --enabled /usr/share/koha/bin/cronjobs/holds/build_holds_queue.pl
--- /dev/null
+etc/koha/sites
+var/lib/koha
+var/log/koha
+var/lock/koha
+var/spool/koha
--- /dev/null
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: koha-common
+# Required-Start: $remote_fs
+# Required-Stop: $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start Zebra server for each Koha instance
+# Description: For each enabled Koha instance on this host,
+# as listed by "koha-list --enabled", start a Zebra
+# server (using koha-start-zebra).
+### END INIT INFO
+
+# Author: Lars Wirzenius <lars@catalyst.net.nz>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Koha ILS"
+NAME=daemonexecutablename
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS="--options args"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x /usr/sbin/koha-start-zebra ] || exit 0
+
+# Read configuration variable file if it is present
+# [ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ koha-start-zebra $(koha-list --enabled)
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # We stop everything, including disabled ones.
+ koha-stop-zebra $(koha-list) || true
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ koha-restart-zebra $(koha-list --enabled)
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ *) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ *) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+# status)
+# status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+# ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ #echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
--- /dev/null
+misc/release_notes/release_notes_3*.txt usr/share/doc/koha-common
+debian/tmp/usr/* usr
+debian/tmp/etc/koha/pazpar2
+debian/tmp/etc/koha/zebradb/[!z]*
+debian/templates/* etc/koha
+debian/koha-post-install-setup usr/sbin
+debian/unavailable.html usr/share/koha/intranet/htdocs
+debian/unavailable.html usr/share/koha/opac/htdocs
+debian/templates/* etc/koha
+debian/scripts/koha-create usr/sbin
+debian/scripts/koha-create-dirs usr/sbin
+debian/scripts/koha-disable usr/sbin
+debian/scripts/koha-dump usr/sbin
+debian/scripts/koha-dump-defaults usr/sbin
+debian/scripts/koha-enable usr/sbin
+debian/scripts/koha-foreach usr/sbin
+debian/scripts/koha-list usr/sbin
+debian/scripts/koha-rebuild-zebra usr/sbin
+debian/scripts/koha-remove usr/sbin
+debian/scripts/koha-reset-passwd usr/sbin
+debian/scripts/koha-restart-zebra usr/sbin
+debian/scripts/koha-restore usr/sbin
+debian/scripts/koha-start-zebra usr/sbin
+debian/scripts/koha-stop-zebra usr/sbin
+debian/scripts/koha-upgrade-schema usr/sbin
+debian/scripts/*.8 usr/share/man/man8
--- /dev/null
+# Rotate log files for all Koha instances.
+
+/var/log/koha/*/*.log {
+ rotate 5
+ weekly
+ missingok
+ compress
+ delaycompress
+ notifempty
+ sharedscripts
+ postrotate
+ /etc/init.d/apache2 reload > /dev/null
+ endscript
+}
--- /dev/null
+#!/bin/sh
+
+set -e
+
+conf=/etc/mysql/koha-common.cnf
+if [ ! -e "$conf" ] && [ ! -L "$conf" ]
+then
+ ln -s debian.cnf "$conf"
+fi
+
+#DEBHELPER#
--- /dev/null
+#!/bin/sh
+#
+# Set up Apache post-install for koha-common.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+a2enmod rewrite
+a2enmod suexec
+service apache2 restart
implementation.
- edit /etc/perl/XML/SAX/ParserDetails.ini to
move XML::LibXML::SAX:Parser section last in the file
+ - FIXME: This should become unnecessary: Koha is in the process of
+ being patched to specify the parser it needs explicitly, instead
+ of assuming it is the default one.
+* Enable the suexec module for Apache.
+ - sudo a2enmod suexec
* Enable the rewrite module for Apache.
- sudo a2enmod rewrite
* Restart Apache.
- sudo service apache2 restart
+The latter two steps can be done by running the koha-post-install-setup
+script.
+
Then access the following URL:
http://localhost:8080/
-misc/release_notes/release_notes_3*.txt usr/share/doc/koha
+debian/tmp/etc/apache2
+debian/tmp/etc/koha/koha-httpd.conf
+debian/tmp/var
+debian/tmp/etc/koha/zebradb/zebra-biblios.cfg
+debian/tmp/etc/koha/zebradb/zebra-authorities.cfg
+debian/tmp/etc/koha/zebradb/zebra-authorities-dom.cfg
+++ /dev/null
-#!/bin/sh
-
-set -e
-
-alias stripwhitespace="sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//'"
-installeddebconfversion=dpkg -s debconf | sed -ne '/^Version/s/^Version: //p'
-
-. /usr/share/debconf/confmodule
-
+++ /dev/null
-#!/bin/sh
-set -e
-
-# Load the debconf library - this must come FIRST; do not insert any other
-# commands before this
-. /usr/share/debconf/confmodule
-
-echo "INFO: postinst as '$1'"
-
-case "$1" in
- configure)
- echo "Configuring..."
-
- # set up logrotate
- # remove first in case we are reconfiguring
-# rm /etc/logrotate.d/koha
-
- # add logrotate
- ln -s /etc/koha/koha.logrotate /etc/logrotate.d/koha
-
- # reload apache
- /etc/init.d/apache2 reload
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \$1'" >&2
- exit 0
- ;;
-esac
-
-#DEBHELPER#
-
-# finish up
-db_stop
-exit 0
\ No newline at end of file
#!/usr/bin/make -f
-PACKAGE = $(shell dh_listpackages)
-TMP = $(CURDIR)/debian/$(PACKAGE)
+TMP = $(CURDIR)/debian/tmp
# Make "perl Makefile.PL" be non-interactive.
export PERL_MM_USE_DEFAULT=1
%:
- dh $@
-
+ dh $@ --fail-missing
+
+override_dh_gencontrol:
+ debian/bd-to-depends >> debian/koha-common.substvars
+ dh_gencontrol
+
override_dh_auto_install:
dh_auto_install
+ rm $(TMP)/etc/koha/README.txt
+ rm -r $(TMP)/usr/share/koha/doc
rm -r $(TMP)/var/run
rm -r $(TMP)/var/lock
rm $(TMP)/var/log/koha/README
ln -s /usr/share/javascript/jquery/jquery.js \
$(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js
rm $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js
- ln -s /usr/share/javascript/jquery \
+ ln -s /usr/share/javascript/jquery/jquery.js \
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/jquery/jquery.js
rm -r \
$(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/js/tinymce
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/yui
ln -s /usr/share/javascript/yui \
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/lib/yui
+ install -d $(TMP)/etc/apache2/sites-available
+ install -d $(TMP)/etc/apache2/sites-enabled
+ install -d $(TMP)/etc/apache2/conf.d
ln -s ../../koha/koha-httpd.conf $(TMP)/etc/apache2/sites-available/koha
ln -s ../sites-available/koha $(TMP)/etc/apache2/sites-enabled/koha
install -m 0644 debian/koha.apache-ports $(TMP)/etc/apache2/conf.d/koha
mv $(TMP)/etc/koha/koha-conf.xml $(TMP)/usr/share/koha/koha-conf.xml.in
sed -i $(TMP)/usr/share/koha/koha-conf.xml.in \
-e '/^ <user>/s/>.*</>_DBC_DBUSER_</' \
- -e '/^ <pass>/s/>.*</>_DBC_DBPASS_</' \
+ -e '/^ <pass>/s/>.*</>_DBC_DBPASS_</'
+ install -m 0644 koha-tmpl/opac-tmpl/prog/en/lib/yui/skin.css \
+ koha-tmpl/opac-tmpl/prog/en/lib/yui/reset-fonts-grids.css \
+ $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
+ install -m 0644 koha-tmpl/opac-tmpl/prog/en/lib/yui/skin.css \
+ koha-tmpl/opac-tmpl/prog/en/lib/yui/reset-fonts-grids.css \
+ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
+ sed -i -e 's:url(.*/reset-fonts-grids.css.*):url(reset-fonts-grids.css):' \
+ -e 's:url(.*/skin.css.*):url(skin.css):' \
+ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/opac.css \
+ $(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css/sco.css \
+ $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css
--- /dev/null
+#!/bin/sh
+#
+# koha-create -- Create a new Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+generate_config_file() {
+ touch "$2"
+ chown "root:$username" "$2"
+ chmod 0640 "$2"
+ sed -e "s/__KOHASITE__/$name/g" \
+ -e "s/__OPACPORT__/80/g" \
+ -e "s/__INTRAPORT__/$INTRAPORT/g" \
+ -e "s/__OPACSERVER__/$domain/g" \
+ -e "s/__INTRASERVER__/$intradomain/g" \
+ -e "s/__ZEBRA_PASS__/$zebrapwd/g" \
+ -e "s/__DB_NAME__/$mysqldb/g" \
+ -e "s/__DB_HOST__/$mysqlhost/g" \
+ -e "s/__DB_USER__/$mysqluser/g" \
+ -e "s/__DB_PASS__/$mysqlpwd/g" \
+ -e "s/__UNIXUSER__/$username/g" \
+ -e "s/__UNIXGROUP__/$username/g" \
+ "/etc/koha/$1" > "$2"
+}
+
+getmysqlhost() {
+ awk '
+ /^\[/ { inclient = 0 }
+ /^\[client\]/ { inclient = 1 }
+ inclient && /^ *host *=/ { print $3 }' \
+ /etc/mysql/koha-common.cnf
+}
+
+getinstancemysqlpassword() {
+ sed -n '/<pass>/s:.*>\(.*\)</pass>.*:\1:p' \
+ "/etc/koha/sites/$1/koha-conf.xml"
+}
+
+
+# Set defaults and read config file, if it exists.
+DOMAIN=""
+INTRAPORT="8080"
+INTRAPREFIX=""
+INTRASUFFIX=""
+DEFAULTSQL=""
+if [ -e /etc/koha/koha-sites.conf ]
+then
+ . /etc/koha/koha-sites.conf
+fi
+
+
+# Parse command line.
+[ "$#" = 2 ] ||
+ die "Usage: $0 [--create-db|--request-db|--populate-db] instancename"
+case "$1" in
+ --create-db) op=create ;;
+ --request-db) op=request ;;
+ --populate-db) op=populate ;;
+ *) die "Usage: $0 [--create-db|--request-db|--populate-db] instancename" ;;
+esac
+
+name="$2"
+domain="$name$DOMAIN"
+if [ "$INTRAPORT" = 80 ] || [ "$INTRAPORT" = "" ]
+then
+ intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN"
+else
+ intradomain="$INTRAPREFIX$name$INTRASUFFIX$DOMAIN:$INTRAPORT"
+fi
+
+
+mysqldb="koha_$name"
+mysqlhost="$(getmysqlhost)"
+mysqluser="koha_$name"
+
+if [ "$op" = create ] || [ "$op" = request ]
+then
+ mysqlpwd="$(pwgen -1)"
+else
+ mysqlpwd="$(getinstancemysqlpassword $name)"
+fi
+
+
+if [ "$op" = create ] || [ "$op" = request ]
+then
+ # Create new user and group.
+ username="$name-koha"
+ if getent passwd "$username" > /dev/null
+ then
+ die "User $username already exists."
+ fi
+ if getent group "$username" > /dev/null
+ then
+ die "Group $username already exists."
+ fi
+ adduser --no-create-home --disabled-login \
+ --gecos "Koha instance $username" \
+ --quiet "$username"
+
+ # Create the site-specific directories.
+ koha-create-dirs "$name"
+
+ # Generate Zebra database password.
+ zebrapwd="$(pwgen -1)"
+
+ # Set up MySQL database for this instance.
+ if [ "$op" = create ]
+ then
+ mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
+CREATE DATABASE $mysqldb;
+CREATE USER '$mysqluser'@'%' IDENTIFIED BY '$mysqlpwd';
+GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser';
+FLUSH PRIVILEGES;
+eof
+ fi
+
+
+ # Generate and install Apache site-available file and log dir.
+ generate_config_file apache-site.conf.in \
+ "/etc/apache2/sites-available/$name"
+ mkdir "/var/log/koha/$name"
+ chown "$username:$username" "/var/log/koha/$name"
+
+
+ # Generate and install main Koha config file.
+ generate_config_file koha-conf-site.xml.in \
+ "/etc/koha/sites/$name/koha-conf.xml"
+
+ # Generate and install Zebra config files.
+ generate_config_file zebra-biblios-site.cfg.in \
+ "/etc/koha/sites/$name/zebra-biblios.cfg"
+ generate_config_file zebra-authorities-site.cfg.in \
+ "/etc/koha/sites/$name/zebra-authorities.cfg"
+ generate_config_file zebra-authorities-dom-site.cfg.in \
+ "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
+ generate_config_file zebra.passwd.in \
+ "/etc/koha/sites/$name/zebra.passwd"
+
+
+ # Create a GPG-encrypted file for requesting a DB to be set up.
+ if [ "$op" = request ]
+ then
+ touch "$name-db-request.txt"
+ chmod 0600 "$name-db-request.txt"
+ cat > "$name-db-request.txt" << eof
+Please create a database and user on $mysqlhost as follows:
+
+database name: $mysqldb
+database user: $mysqluser
+ password: $mysqlpwd
+
+Thank you.
+eof
+
+ echo "See $name-db-request.txt for database creation request."
+ echo "Please forward it to the right person, and then run"
+ echo "$0 --populate-db $name"
+ echo "Thanks."
+ fi
+fi
+
+
+if [ "$op" = create ] || [ "$op" = populate ]
+then
+ # Use the default database content if that exists.
+ if [ -e "$DEFAULTSQL" ]
+ then
+ # Populate the database with default content.
+ zcat "$DEFAULTSQL" |
+ sed "s/__KOHASITE__/$name/g" |
+ mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd"
+
+
+ # Change the default user's password.
+ staffpass="$(pwgen -1)"
+ staffdigest=$(echo -n "$staffpass" |
+ perl -e '
+ use Digest::MD5 qw(md5_base64);
+ while (<>) { print md5_base64($_), "\n"; }')
+ mysql --host="$mysqlhost" --user="$mysqluser" \
+--password="$mysqlpwd" <<eof
+USE \`$mysqldb\`;
+UPDATE borrowers
+SET password = '$staffdigest'
+WHERE borrowernumber = 3;
+eof
+
+ echo "staff user password is '$staffpass' but keep that secret"
+
+ # Upgrade the database schema, just in case the dump was from an
+ # old version.
+ koha-upgrade-schema "$name"
+ else
+ echo "Koha instance is empty, no staff user created."
+ fi
+fi
+
+
+if [ "$op" = create ] || [ "$op" = populate ]
+then
+ # Reconfigure Apache.
+ a2ensite "$name"
+ service apache2 restart
+
+ # Start Zebra.
+ koha-start-zebra "$name"
+fi
--- /dev/null
+#!/bin/sh
+#
+# koha-create-dirs -- Create dirs for a Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+userdir() {
+ local username="$1-koha"
+ local directory="$2"
+ if [ ! -d "$directory" ]
+ then
+ install -d -o "$username" -g "$username" "$directory"
+ fi
+}
+
+rootdir() {
+ local directory="$1"
+ if [ ! -d "$directory" ]
+ then
+ install -d -o root -g root "$directory"
+ fi
+}
+
+for name in "$@"
+do
+ rootdir "/var/spool/koha/$name"
+ userdir "$name" "/etc/koha/sites/$name"
+ userdir "$name" "/var/lib/koha/$name"
+ userdir "$name" "/var/lib/koha/$name/authorities"
+ userdir "$name" "/var/lib/koha/$name/biblios"
+ userdir "$name" "/var/lib/koha/$name/biblios/key"
+ userdir "$name" "/var/lib/koha/$name/biblios/register"
+ userdir "$name" "/var/lib/koha/$name/biblios/shadow"
+ userdir "$name" "/var/lock/koha/$name"
+ userdir "$name" "/var/lock/koha/$name/authorities"
+ userdir "$name" "/var/lock/koha/$name/biblios"
+ userdir "$name" "/var/run/koha/$name"
+ userdir "$name" "/var/run/koha/$name/authorities"
+ userdir "$name" "/var/run/koha/$name/biblios"
+done
+
--- /dev/null
+.\" Copyright 2010 Catalyst IT, Ltd
+.\"
+.\" This program 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 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+.TH KOHA-CREATE 8 2010-05-03 Koha
+.SH NAME
+koha-create \- create a new Koha instance
+.SH SYNOPSIS
+.B koha-create
+.IR instance-name
+.SH DESCRIPTION
+.B koha-create
+creates a new Koha instance.
+It is meant for a site that provides Koha hosting,
+and serves several sites from the same host.
+.PP
+The name of the instance is used as the domain name for Apache,
+and Unix user and group names, and MySQL username and table names
+are derived from it.
+Unix user and group are named
+.IR instance -koha.
+MySQL username is
+.RI koha_ instance ,
+and table is
+.RI koha_ instance .
+.PP
+The Unix user has logins disabled.
+The password for MySQL is generated randomly, and printed to the terminal.
+.PP
+The instance name is used as the domain name (ServerName) for Apache.
+The open catalog (OPAC), for library customers, is on port 80.
+The librarian intranet interface is on port 8080.
+.PP
+After the Koha instance is created, it is ready to be used,
+but the librarian needs to log in via the intranet and configure things.
+.PP
+Several configuration variables are available for adjusting this behavior.
+The variables are put into
+.B /etc/koha/koha-site.conf .
+The following variables are obeyed:
+.PP
+.TP
+.B DOMAIN
+The domain to append to the instance name, for Apache ServerName.
+Default is empty.
+The value must begin with a period.
+.TP
+.B INTRAPORT
+The port for the intranet.
+If you set this to empty or 80, then you
+.I must
+also define
+.B INTRAPREFIX
+or
+.BR INTRASUFFIX .
+.TP
+.B INTRAPREFIX
+This is inserted before the instance name when forming Apache ServerName.
+For subdomains, make sure it ends with a period.
+.TP
+.B INTRASUFFIX
+This is inserted after the instance name,
+but before the domain name,
+when forming Apache ServerName.
+.TP
+.B DEFAULTSQL
+An SQL file (possibly compressed with gzip) that can be fed to
+.BR mysql (1)
+to initialize the database after it has been created.
+Might be created using
+.BR koha-dump-defaults (8).
+.SH FILES
+.TP
+.B /etc/koha/koha-site.conf
+Configuration variables are read from this file, if it exists.
+.SH BUGS
+The program is a bit fragile.
+If something goes wrong, it does not clean up after itself.
+.SH EXAMPLE
+To create a new Koha instance:
+.PP
+.RS
+koha-create hslibrary
+.RE
+.PP
+The public catalog is now at
+.I http://hslibrary/
+and the librarian interface at
+.IR http://hslibrary:8080/ .
+.PP
+To use full domain names, and have the intranet interface on port 80, but
+on a different domain name, add the following variables to the
+configuration file:
+.PP
+.nf
+.RS
+DOMAIN=".example.com"
+INTRAPORT=""
+INTRASUFFIX="-intra"
+.RE
+.fi
+.PP
+This will result in the addresses for the public and intranet interfaces
+becoming these:
+.PP
+.nf
+.RS
+http://hslibrary.example.com/
+http://hslibrary-intra.example.com/
+.RE
+.fi
+.PP
+Configuration changes only apply to instances created afterwards.
+.SH "SEE ALSO"
+.BR koha-remove (8).
+.PP
+.B http://koha-community.org/
+
--- /dev/null
+#!/bin/sh
+#
+# koha-disable -- disable a Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+# Parse command line.
+[ "$#" = 1 ] || die "Usage: $0 instancename..."
+
+
+for name in "$@"
+do
+ sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-disable.conf\)$:\1:' \
+ "/etc/apache2/sites-available/$name"
+done
+
+/etc/init.d/apache2 restart
--- /dev/null
+#!/bin/sh
+#
+# koha-dump: dump all contents and configs for a Koha site
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+# Make sure the files we create are not accessible by anyone else.
+umask 0077
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+# Parse command line.
+[ "$#" = 1 ] || die "Usage: $0 instancename"
+name="$1"
+kohaconfig="/etc/koha/sites/$name/koha-conf.xml"
+date="$(date +%Y-%m-%d)"
+
+echo "Dumping Koha site $name:"
+
+
+# Dump database.
+mysqlhost="$(sed -n '/.*<hostname>\(.*\)<\/hostname>.*/s::\1:p' $kohaconfig)"
+mysqldb="$(sed -n '/.*<database>\(.*\)<\/database>.*/s::\1:p' $kohaconfig)"
+mysqluser="$(sed -n '/.*<user>\(.*\)<\/user>.*/s::\1:p' $kohaconfig | tail -n1)"
+mysqlpass="$(sed -n '/.*<pass>\(.*\)<\/pass>.*/s::\1:p' $kohaconfig)"
+dbdump="/var/spool/koha/$name/$name-$date.sql.gz"
+echo "* DB to $dbdump"
+mysqldump --databases --host="$mysqlhost" \
+ --user="$mysqluser" --password="$mysqlpass" "$mysqldb" |
+ gzip > "$dbdump"
+chown "root:$name-koha" "$dbdump"
+chmod g+r "$dbdump"
+
+
+# Dump configs, logs, etc.
+metadump="/var/spool/koha/$name/$name-$date.tar.gz"
+echo "* configs, logs to $metadump"
+tar -C / -czf "$metadump" \
+ "etc/koha/sites/$name" \
+ "etc/apache2/sites-available/$name" \
+ "etc/apache2/sites-enabled/$name" \
+ "var/lib/koha/$name" \
+ "var/log/koha/$name"
+
+echo "Done."
--- /dev/null
+#!/bin/sh
+#
+# koha-dump-defaults: create default contents from an existing Koha site
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+# Parse command line.
+[ "$#" = 1 ] || die "Usage: $0 instancename"
+name="$1"
+kohaconfig="/etc/koha/sites/$name/koha-conf.xml"
+date="$(date +%Y-%m-%d)"
+
+
+mysqldb="$(sed -n '/.*<database>\(.*\)<\/database>.*/s::\1:p' $kohaconfig)"
+mysqluser="$(sed -n '/.*<user>\(.*\)<\/user>.*/s::\1:p' $kohaconfig | tail -n1)"
+mysqlpass="$(sed -n '/.*<pass>\(.*\)<\/pass>.*/s::\1:p' $kohaconfig)"
+mysqldump --databases --user="$mysqluser" --password="$mysqlpass" "$mysqldb" |
+ sed "s/$name/__KOHASITE__/g"
--- /dev/null
+#!/bin/sh
+#
+# koha-enable -- enable a Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+# Parse command line.
+[ "$#" = 1 ] || die "Usage: $0 instancename..."
+
+
+for name in "$@"
+do
+ sed -i 's:^\(\s*Include /etc/koha/apache-shared-disable.conf\)$:#\1:' \
+ "/etc/apache2/sites-available/$name"
+done
+
+/etc/init.d/apache2 restart
--- /dev/null
+#!/bin/sh
+# koha-foreach -- run a command for each Koha instance
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+listopts=""
+if [ "$1" = --enabled ]
+then
+ listopts="--enabled"
+ shift
+fi
+
+
+for name in $(koha-list $listopts)
+do
+ sudo -u "$name-koha" \
+ env PERL5LIB=/usr/share/koha/lib \
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
+ "$@"
+done
+
--- /dev/null
+#!/bin/sh
+#
+# koha-instances -- List all Koha instances.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+is_enabled() {
+ if grep '^[[:space:]]*Include /etc/koha/apache-shared-disable.conf' \
+ "/etc/apache2/sites-available/$name" > /dev/null
+ then
+ return 1
+ else
+ return 0
+ fi
+}
+
+all=yes
+if [ "$1" = --enabled ]
+then
+ shift
+ all=no
+fi
+
+find /etc/koha/sites -mindepth 1 -maxdepth 1 -type d -printf '%f\n' |
+sort |
+while read name
+do
+ if [ "$all" = yes ] || is_enabled "$name"
+ then
+ echo "$name"
+ fi
+done
--- /dev/null
+#!/bin/sh
+#
+# koha-rebuild-zebra -- Rebuild the Zebra database for a Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+if [ "$1" = --full ]
+then
+ opts="-r"
+ shift
+else
+ opts="-z"
+fi
+
+
+for name in "$@"
+do
+ sudo -u "$name-koha" \
+ env PERL5LIB=/usr/share/koha/lib \
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
+ /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -b -a $opts
+done
--- /dev/null
+#!/bin/sh
+#
+# koha-remove -- Remove a Koha instance.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+for name in "$@"
+do
+ echo "Removing Koha instance $name"
+
+ mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
+DROP USER 'koha_$name';
+DROP DATABASE koha_$name;
+FLUSH PRIVILEGES;
+eof
+
+ rm "/etc/apache2/sites-available/$name"
+ rm "/etc/koha/sites/$name/koha-conf.xml"
+ rm "/etc/koha/sites/$name/zebra-biblios.cfg"
+ rm "/etc/koha/sites/$name/zebra-authorities.cfg"
+ rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
+ rm "/etc/koha/sites/$name/zebra.passwd"
+ rmdir "/etc/koha/sites/$name"
+ rm -r "/var/lock/koha/$name"
+ rm -r "/var/log/koha/$name"
+ rm -r "/var/run/koha/$name"
+ deluser --quiet "$name-koha"
+ a2dissite "$name"
+done
+
+service apache2 restart
--- /dev/null
+#!/bin/sh
+#
+# koha-reset-passwd -- reset password for a user in a Koha instance
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+pwdigest() {
+ echo -n "$1" |
+ perl -e 'use Digest::MD5 qw(md5_base64);
+ while (<>) { print md5_base64($_), "\n"; }'
+}
+
+
+[ $# -lt 2 ] && die "Usage: $0 instancename username..."
+instance="$1"
+shift
+
+temp="$(mktemp)"
+
+cat <<eof > "$temp"
+use koha_$instance;
+eof
+
+for userid in "$@"
+do
+ password="$(pwgen -1)"
+ digest="$(pwdigest $password)"
+ echo "$userid $password"
+ echo "UPDATE borrowers SET password = '$digest' WHERE userid = '$userid';" \
+ >> "$temp"
+done
+
+mysql --defaults-extra-file=/etc/mysql/koha-common.cnf < "$temp"
+
+rm "$temp"
--- /dev/null
+#!/bin/sh
+#
+# koha-restart-zebra -- Restart Zebra for named Koha instandes
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+for name in "$@"
+do
+ echo "Restarting Zebra server for $name"
+ daemon \
+ --name="$name-koha-zebra" \
+ --errlog="/var/log/koha/$name/zebra-error.log" \
+ --stdout="/var/log/koha/$name/zebra.log" \
+ --output="/var/log/koha/$name/zebra-output.log" \
+ --verbose=1 \
+ --respawn \
+ --delay=30 \
+ --user="$name-koha.$name-koha" \
+ --restart \
+ -- \
+ zebrasrv \
+ -v none,fatal,warn \
+ -f "/etc/koha/sites/$name/koha-conf.xml"
+done
--- /dev/null
+#!/bin/sh
+#
+# koha-restore: restore a Koha site from a dump (from koha-dump)
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+die() {
+ echo "$@" 1>&2
+ exit 1
+}
+
+
+# Parse command line.
+[ "$#" = 2 ] || die "Usage: $0 sqldump configdump"
+sqldump="$1"
+configdump="$2"
+
+
+# Verify that no files in the config dump exist on the filesystem.
+anyexists=no
+tar -tf "$configdump" |
+while read x
+do
+ if [ -e "/$x" ]
+ then
+ anyexists=yes
+ echo "ERROR: File exists: /$x" 1>&2
+ fi
+done
+if [ "$anyexists" = yes ]
+then
+ die "Config dump $configdump has files that exist on the filesystem."
+fi
+
+
+# Create user and group.
+name=$(tar tf "$configdump" |
+ sed -n '/^etc\/koha\/sites\/\([^/]*\)\/$/s//\1/p')
+username="$name-koha"
+adduser --no-create-home --disabled-login --gecos "Koha instance $username" \
+ --quiet "$username"
+
+
+# Create dirs. Some of them will be in the tarball, but not all, e.g.,
+# /var/run and /var/lock.
+koha-create-dirs "$name"
+
+
+# Unpack tarball.
+tar -C / -xf "$configdump"
+
+
+# Re-create database and database user.
+mysqldb="koha_$name"
+mysqluser="koha_$name"
+mysqlpwd="$(sed -n '/.*<pass>\(.*\)<\/pass>.*/s//\1/p' /etc/koha/sites/$name/koha-conf.xml)"
+zcat "$sqldump" | mysql --defaults-extra-file=/etc/mysql/koha-common.cnf
+mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof || true
+DROP USER '$mysqluser';
+eof
+mysql --defaults-extra-file=/etc/mysql/koha-common.cnf << eof || true
+CREATE USER '$mysqluser' IDENTIFIED BY '$mysqlpwd';
+GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser';
+FLUSH PRIVILEGES;
+eof
+koha-rebuild-zebra --full "$name"
+
+
+# Restart Apache.
+/etc/init.d/apache2 restart
+
--- /dev/null
+#!/bin/sh
+#
+# koha-start-zebra -- Start Zebra for named Koha instandes
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+for name in "$@"
+do
+ echo "Starting Zebra server for $name"
+ daemon \
+ --name="$name-koha-zebra" \
+ --errlog="/var/log/koha/$name/zebra-error.log" \
+ --stdout="/var/log/koha/$name/zebra.log" \
+ --output="/var/log/koha/$name/zebra-output.log" \
+ --verbose=1 \
+ --respawn \
+ --delay=30 \
+ --user="$name-koha.$name-koha" \
+ -- \
+ zebrasrv \
+ -v none,fatal,warn \
+ -f "/etc/koha/sites/$name/koha-conf.xml"
+done
--- /dev/null
+#!/bin/sh
+#
+# koha-stop-zebra -- Stop Zebra for named Koha instandes
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+set -e
+
+for name in "$@"
+do
+ echo "Stopping Zebra server for $name"
+ daemon \
+ --name="$name-koha-zebra" \
+ --errlog="/var/log/koha/$name/zebra-error.log" \
+ --stdout="/var/log/koha/$name/zebra.log" \
+ --output="/var/log/koha/$name/zebra-output.log" \
+ --verbose=1 \
+ --respawn \
+ --delay=30 \
+ --user="$name-koha.$name-koha" \
+ --stop \
+ -- \
+ zebrasrv \
+ -f "/etc/koha/sites/$name/koha-conf.xml"
+done
--- /dev/null
+#!/bin/sh
+#
+# koha-upgrade-schema -- Upgrade the DB schema for Koha instances.
+# Copyright 2010 Catalyst IT, Ltd
+#
+# This program 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 3 of the License, or
+# (at your option) any later version.
+#
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+set -e
+
+
+update="/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl"
+for name in "$@"
+do
+ echo "Upgrading database schema for $name"
+ KOHA_CONF="/etc/koha/sites/$name/koha-conf.xml" \
+ PERL5LIB="/usr/share/koha/lib" \
+ "$update"
+done
+
-3.0 (quilt)
+3.0 (native)
--- /dev/null
+# This file is included in a Koha site's Apache config to disable the site.
+
+RewriteRule .* /unavailable.html [L]
--- /dev/null
+# Apache configuration settings that are shared for every Koha instance.
+# This file contains settings for the intranet site.
+#
+# This file should be included from an instance's
+# /etc/apache2/site-available file, from within the VirtualHost section
+# for the intranet.
+
+DocumentRoot /usr/share/koha/intranet/htdocs
+
+ScriptAlias /cgi-bin/koha/ "/usr/share/koha/intranet/cgi-bin/"
+ScriptAlias /index.html "/usr/share/koha/intranet/cgi-bin/mainpage.pl"
+ScriptAlias /search "/usr/share/koha/intranet/cgi-bin/search.pl"
+
+
+RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
+RewriteRule (.+) $1?%1%2 [N,R,NE]
+RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT]
+RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
+RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
--- /dev/null
+# Apache configuration settings that are shared for every Koha instance.
+# This file contains settings for the OPAC site.
+#
+# This file should be included from an instance's
+# /etc/apache2/site-available file, from within the VirtualHost section
+# for OPAC.
+
+DocumentRoot /usr/share/koha/opac/htdocs
+
+ScriptAlias /cgi-bin/koha/ "/usr/share/koha/opac/cgi-bin/opac/"
+ScriptAlias /index.html "/usr/share/koha/opac/cgi-bin/opac/opac-main.pl"
+ScriptAlias /search "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
+ScriptAlias /opac-search.pl "/usr/share/koha/opac/cgi-bin/opac/opac-search.pl"
+
+RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
+RewriteRule (.+) $1?%1%2 [N,R,NE]
+RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
+RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
+RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
--- /dev/null
+# Apache configuration settings that are shared for every Koha instance.
+# This file contains settings that are the same for both the OPAC and
+# the Intranet site.
+#
+# This file should be included from an instance's
+# /etc/apache2/site-available file, once from the OPAC section, and once
+# from the intranet section.
+
+
+SetEnv PERL5LIB "/usr/share/koha/lib"
+
+
+<IfModule mod_gzip.c>
+ mod_gzip_on yes
+ mod_gzip_dechunk yes
+ mod_gzip_keep_workfiles No
+ mod_gzip_can_negotiate yes
+ mod_gzip_update_static No
+ mod_gzip_temp_dir /tmp
+ mod_gzip_minimum_file_size 512
+ mod_gzip_maximum_file_size 1000000
+ mod_gzip_maximum_inmem_size 1000000
+ mod_gzip_handle_methods GET POST
+ mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
+ mod_gzip_item_exclude mime ^image/.*
+ mod_gzip_item_exclude rspheader Content-Type:image/*
+ mod_gzip_item_include file \.js$
+ mod_gzip_item_include mime ^application/x-javascript$
+ mod_gzip_item_include file \.php$
+ mod_gzip_item_include mime ^text/html$
+ mod_gzip_item_include file \.css$
+ mod_gzip_item_include mime ^text/css$
+</IfModule>
+
+
+<IfModule mod_deflate.c>
+ # Compress content with type html, text, and css, ...
+ AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
+ AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
+
+ DeflateCompressionLevel 9
+
+ # Properly handle old browsers that do not support compression
+ BrowserMatch ^Mozilla/4 gzip-only-text/html
+ BrowserMatch ^Mozilla/4\.0[678] no-gzip
+ BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
+
+ DeflateFilterNote Input instream
+ DeflateFilterNote Output outstream
+ DeflateFilterNote Ratio ratio
+
+ LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
+ <IfModule mod_headers.c>
+ #properly handle requests coming from behind proxies
+ Header append Vary User-Agent
+ </IfModule>
+</IfModule>
+
+
+Options +FollowSymLinks
+
+
+ErrorDocument 400 /cgi-bin/koha/errors/400.pl
+ErrorDocument 401 /cgi-bin/koha/errors/401.pl
+ErrorDocument 403 /cgi-bin/koha/errors/403.pl
+ErrorDocument 404 /cgi-bin/koha/errors/404.pl
+ErrorDocument 500 /cgi-bin/koha/errors/500.pl
+
+RewriteEngine On
--- /dev/null
+# Koha instance __KOHASITE__ Apache config.
+
+# OPAC
+<VirtualHost *:__OPACPORT__>
+ Include /etc/koha/apache-shared.conf
+# Include /etc/koha/apache-shared-disable.conf
+ Include /etc/koha/apache-shared-opac.conf
+
+ ServerName __OPACSERVER__
+ SetEnv KOHA_CONF "/etc/koha/sites/__KOHASITE__/koha-conf.xml"
+ AssignUserID __UNIXUSER__ __UNIXGROUP__
+
+ ErrorLog /var/log/koha/__KOHASITE__/opac-error.log
+# TransferLog /var/log/koha/__KOHASITE__/opac-access_log
+# RewriteLog /var/log/koha/__KOHASITE__/opac-rewrite.log
+</VirtualHost>
+
+# Intranet
+<VirtualHost *:__INTRAPORT__>
+ Include /etc/koha/apache-shared.conf
+# Include /etc/koha/apache-shared-disable.conf
+ Include /etc/koha/apache-shared-intranet.conf
+
+ ServerName __INTRASERVER__
+ SetEnv KOHA_CONF "/etc/koha/sites/__KOHASITE__/koha-conf.xml"
+ AssignUserID __UNIXUSER__ __UNIXGROUP__
+
+ ErrorLog /var/log/koha/__KOHASITE__/intranet-error.log
+# TransferLog /var/log/koha/__KOHASITE__/intranet-access_log
+# RewriteLog /var/log/koha/__KOHASITE__/intranet-rewrite.log
+</VirtualHost>
--- /dev/null
+<yazgfs>
+
+<listen id="biblioserver" >unix:/var/run/koha/__KOHASITE__/bibliosocket</listen>
+<listen id="authorityserver" >unix:/var/run/koha/__KOHASITE__/authoritysocket</listen>
+
+<!-- BIBLIOGRAPHIC RECORDS -->
+<server id="biblioserver" listenref="biblioserver">
+ <directory>/var/lib/koha/__KOHASITE__/biblios</directory>
+ <config>/etc/koha/sites/__KOHASITE__/zebra-biblios.cfg</config>
+ <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
+ <retrievalinfo>
+ <retrieval syntax="usmarc" name="F"/>
+ <retrieval syntax="usmarc" name="B"/>
+ <retrieval syntax="xml" name="F"/>
+ <retrieval syntax="xml" name="B"/>
+ <retrieval syntax="xml" name="marcxml"
+ identifier="info:srw/schema/1/marcxml-v1.1">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="dc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="mods">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="rdfdc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="rss2">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RSS2.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="utils">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl"/>
+ </backend>
+ </retrieval>
+ </retrievalinfo>
+</server>
+<serverinfo id="biblioserver">
+ <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
+ <user>kohauser</user>
+ <password>__ZEBRA_PASS__</password>
+</serverinfo>
+
+<!-- AUTHORITY RECORDS -->
+<server id="authorityserver" listenref="authorityserver" >
+ <directory>/var/lib/koha/__KOHASITE__/authorities</directory>
+ <config>/etc/koha/sites/__KOHASITE__/zebra-authorities-dom.cfg</config>
+ <cql2rpn>/etc/koha/zebradb/pqf.properties</cql2rpn>
+ <xi:include href="/etc/koha/zebradb/retrieval-info-auth-dom.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:fallback>
+ <retrievalinfo>
+ <retrieval syntax="usmarc" name="F"/>
+ <retrieval syntax="usmarc" name="B"/>
+ <retrieval syntax="xml" name="marcxml"
+ identifier="info:srw/schema/1/marcxml-v1.1">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="dc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2DC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="mods">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2MODS.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="rdfdc">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slim2RDFDC.xsl"/>
+ </backend>
+ </retrieval>
+ <retrieval syntax="xml" name="utils">
+ <backend syntax="usmarc" name="F">
+ <marc inputformat="marc" outputformat="marcxml"
+ inputcharset="utf-8"/>
+ <xslt stylesheet="/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl"/>
+ </backend>
+ </retrieval>
+ </retrievalinfo>
+ </xi:fallback>
+ </xi:include>
+</server>
+<serverinfo id="authorityserver">
+ <ccl2rpn>/etc/koha/zebradb/ccl.properties</ccl2rpn>
+ <user>kohauser</user>
+ <password>__ZEBRA_PASS__</password>
+</serverinfo>
+
+<config>
+ <db_scheme>mysql</db_scheme>
+ <database>__DB_NAME__</database>
+ <hostname>__DB_HOST__</hostname>
+ <port>3306</port>
+ <user>__DB_USER__</user>
+ <pass>__DB_PASS__</pass>
+ <biblioserver>biblios</biblioserver>
+ <biblioservershadow>1</biblioservershadow>
+ <authorityserver>authorities</authorityserver>
+ <authorityservershadow>1</authorityservershadow>
+ <intranetdir>/usr/share/koha/intranet/cgi-bin</intranetdir>
+ <opacdir>/usr/share/koha/opac/cgi-bin/opac</opacdir>
+ <opachtdocs>/usr/share/koha/opac/htdocs/opac-tmpl</opachtdocs>
+ <intrahtdocs>/usr/share/koha/intranet/htdocs/intranet-tmpl</intrahtdocs>
+ <includes>/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/includes/</includes>
+ <logdir>/var/log/koha/__KOHASITE__</logdir>
+ <install_log>/usr/share/koha/misc/koha-install-log</install_log>
+ <useldapserver>0</useldapserver><!-- see C4::Auth_with_ldap for extra configs you must add if you want to turn this on -->
+ <memcached_servers></memcached_servers>
+ <memcached_namespace></memcached_namespace>
+</config>
+
+</yazgfs>
--- /dev/null
+
+# Simple Zebra configuration file that defines
+# a database with MARCXML records.
+# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
+#
+# Where are the config files located?
+profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en:/etc/koha/zebradb/xsl
+
+encoding: UTF-8
+# modulePath - where to look for loadable zebra modules
+modulePath: /usr/lib/idzebra-2.0/modules
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset: gils.att
+
+#systag sysno rank
+
+# Specify record type
+# group .recordType[ .name ]: type
+# type is split into fundamental type. file-read-type . argument
+# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
+# http://www.indexdata.dk/zebra/doc/grs.tkl
+recordtype: dom./etc/koha/zebradb/authorities/etc/dom-config.xml
+marcxml.recordtype: dom./etc/koha/zebradb/authorities/etc/dom-config.xml
+iso2709.recordtype: dom./etc/koha/zebradb/authorities/etc/dom-config-marc.xml
+
+recordId: (bib1,Local-Number)
+# was auth1
+storeKeys:1
+storeData:1
+
+# Lock File Area
+lockDir: /var/lock/koha/__KOHASITE__/authorities
+perm.anonymous:ar
+perm.kohauser:rw
+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
+
+# Temp File area for index program
+keyTmpDir: /var/lib/koha/__KOHASITE__/authorities/key
+
+# Approx. Memory usage during indexing
+memMax: 50M
+rank:rank-1
+
--- /dev/null
+
+# Simple Zebra configuration file that defines
+# a database with MARCXML records.
+# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
+#
+# Where are the config files located?
+profilePath:/etc/koha/zebradb/authorities/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/authorities:/etc/koha/zebradb/lang_defs/en
+
+encoding: UTF-8
+# modulePath - where to look for loadable zebra modules
+modulePath: /usr/lib/idzebra-2.0/modules
+
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset: gils.att
+
+#systag sysno rank
+
+# Specify record type
+# group .recordType[ .name ]: type
+# type is split into fundamental type. file-read-type . argument
+# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
+# http://www.indexdata.dk/zebra/doc/grs.tkl
+
+# Can use -g iso2709 to batch index raw iso2709 records in a single or
+# multiple files, or marcxml records that are split into separate files
+# the trailing .record tells zebraidx to use record.abs
+iso2709.recordType:grs.marcxml.record
+
+# Can use -g marcxml to batch index marcxml files
+# zebraidx uses record.abs because of <record> is the root element
+marcxml.recordType:grs.sgml
+
+# Koha uses grs.xml internally when updating a single record, no idea
+# why it knows to use record.abs
+recordType:grs.xml
+
+recordId: (bib1,Local-Number)
+# was auth1
+storeKeys:1
+storeData:1
+
+# Lock File Area
+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
+
+# Temp File area for result sets
+setTmpDir: /var/lib/koha/__KOHASITE__/authorities/tmp
+
+# Temp File area for index program
+keyTmpDir: /var/lib/koha/__KOHASITE__/authorities/key
+
+# Approx. Memory usage during indexing
+memMax: 50M
+rank:rank-1
+
--- /dev/null
+# Simple Zebra configuration file that defines
+# a database with MARCXML records.
+# $Id: zebra.cfg,v 1.1.2.2 2006/05/09 12:03:16 rangi Exp $
+#
+# Where are the config files located?
+profilePath:/etc/koha/zebradb/biblios/etc:/etc/koha/zebradb/etc:/etc/koha/zebradb/marc_defs/marc21/biblios:/etc/koha/zebradb/lang_defs/en
+# modulePath - where to look for loadable zebra modules
+modulePath: /usr/lib/idzebra-2.0/modules
+
+encoding: UTF-8
+# Files that describe the attribute sets supported.
+attset: bib1.att
+attset: explain.att
+attset: gils.att
+
+# systag sysno rank
+
+# Specify record type
+# group .recordType[ .name ]: type
+# type is split into fundamental type. file-read-type . argument
+# http://www.indexdata.dk/zebra/doc/zebra-cfg.tkl
+# http://www.indexdata.dk/zebra/doc/grs.tkl
+
+# Can use -g iso2709 to batch index raw iso2709 records in a single or
+# multiple files, or marcxml records that are split into separate files
+# the trailing .record tells zebraidx to use record.abs
+iso2709.recordType:grs.marcxml.record
+
+# Can use -g marcxml to batch index marcxml files
+# zebraidx uses record.abs because of <record> is the root element
+marcxml.recordType:grs.sgml
+
+# Koha uses grs.xml internally when updating a single record, no idea
+# why it knows to use record.abs
+recordType:grs.xml
+
+recordId: (bib1,Local-number)
+storeKeys:1
+storeData:1
+
+
+# Lock File Area
+lockDir: /var/lock/koha/__KOHASITE__/biblios
+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:4G
+
+# Temp File area for result sets
+setTmpDir: /var/lib/koha/__KOHASITE__/biblios/tmp
+
+# Temp File area for index program
+keyTmpDir: /var/lib/koha/__KOHASITE__/biblios/key
+
+# Approx. Memory usage during indexing
+memMax: 50M
+rank:rank-1
+truncmax: 1000000000
--- /dev/null
+kohauser:__ZEBRA_PASS__
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Unavailable</title>
+</head>
+<body>
+
+<h1>Sorry!</h1>
+
+<p>The Koha site you are trying to access is currently unavailable,
+probably because of maintenance.
+This is not at all your fault, and we apologize for any inconvenience
+the downtime may cause you. Please check back in a while.
+We hope to get things back up soon.</p>
+
+</body>
+</html>
('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.'),
('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'),
-('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>
-<<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
+('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'),
('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'),
('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).');
('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.'),
('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>'),
-('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>
-<<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
+('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'),
('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'),
('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).');
('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.'),
('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'),
-('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>
-<<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
+('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'),
('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'),
('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).');
('circulation','PREDUEDGST','Advance Notice of Item Due (Digest)','Advance Notice of Item Due','You have <<count>> items due soon'),
('circulation','EVENT','Upcoming Library Event','Upcoming Library Event','Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nThis is a reminder of an upcoming library event in which you have expressed interest.'),
('reserves', 'HOLD', 'Hold Available for Pickup', 'Hold Available for Pickup at <<branches.branchname>>', 'Dear <<borrowers.firstname>> <<borrowers.surname>>,\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\nLocation: <<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n<<branches.branchaddress3>>\r\n<<branches.branchcity>> <<branches.branchzip>>'),
-('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\n<<branches.branchaddress1>>\n<<branches.branchaddress2>>\n\n\nChange Service Requested\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>\n<<borrowers.address>>\n<<borrowers.city>> <<borrowers.zipcode>>\n\n\n\n\n\n\n\n\n\n\n<<borrowers.firstname>> <<borrowers.surname>>
-<<borrowers.cardnumber>>\n\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
+('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n'),
('circulation','CHECKIN','Item Check-in (Digest)','Check-ins','The following items have been checked in:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you.'),
('circulation','CHECKOUT','Item Check-out (Digest)','Checkouts','The following items have been checked out:\r\n----\r\n<<biblio.title>>\r\n----\r\nThank you for visiting <<branches.branchname>>.'),
('reserves', 'HOLDPLACED', 'Hold Placed on Item', 'Hold Placed on Item','A hold has been placed on the following item : <<title>> (<<biblionumber>>) by the user <<firstname>> <<surname>> (<<cardnumber>>).');
SetVersion ($DBversion);
}
+$DBversion = '3.01.00.135';
+if (C4::Context->preference('Version') < TransformToNum($DBversion)){
+ $dbh->do("
+ INSERT INTO `letter` (module, code, name, title, content) VALUES
+('reserves', 'HOLD_PRINT', 'Hold Available for Pickup (print notice)', 'Hold Available for Pickup (print notice)', '<<branches.branchname>>\r\n<<branches.branchaddress1>>\r\n<<branches.branchaddress2>>\r\n\r\n\r\nChange Service Requested\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>>\r\n<<borrowers.address>>\r\n<<borrowers.city>> <<borrowers.zipcode>>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> <<borrowers.cardnumber>>\r\n\r\nYou have a hold available for pickup as of <<reserves.waitingdate>>:\r\n\r\nTitle: <<biblio.title>>\r\nAuthor: <<biblio.author>>\r\nCopy: <<items.copynumber>>\r\n')
+");
+ print "Upgrade to $DBversion done (bug 4377: added HOLD_PRINT message template)";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
<script type="text/javascript">
//<![CDATA[
+function print_slip(subscriptionid,issue){
+ var myurl = 'routing-preview.pl?ok=1&subscriptionid='+subscriptionid+'&issue='+issue;
+ window.open(myurl,'PrintSlip','width=500,height=500,toolbar=no,scrollbars=yes');
+}
function addsubscriptionid()
{
var tab=new Array();
</th>
<th>Branch
</th>
+ <th>Routing
+ </th>
<th>Edit
</th>
</tr>
<td>
<!-- TMPL_VAR Name="branchcode" -->
</td>
+ <td>
+ <a href="" onclick="print_slip(<!-- TMPL_VAR NAME="subscriptionid" ESCAPE="HTML" -->, '<!-- TMPL_VAR NAME="serialseq" ESCAPE="HTML" -->'); return false" >Print list</a>
+ </td>
<td>
<!--TMPL_IF Name="cannotedit"-->
disabled
</div>
<!--/TMPL_IF -->
- <input type="hidden" name="op" value="serialchangestatus" />
+ <input type="hidden" name="op" value="serialchangestatus" />
+ <!--TMPL_LOOP Name="subscriptions"-->
+ <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
+ <!--/TMPL_LOOP -->
<table>
<tr>
<th>Numbered</th>
<!-- /TMPL_UNLESS -->
<td>
<input type="hidden" name="serialid" value="<!-- TMPL_VAR name="serialid" -->" />
- <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
<input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
<tr>
<td>
<input type="hidden" name="serialid" value="NEW" />
- <input type="hidden" name="subscriptionid" value="<!-- TMPL_VAR name="subscriptionid" -->" />
<input type="hidden" name="biblionumber" value="<!-- TMPL_VAR NAME="biblionumber" -->" />
<input type="hidden" name="itemcount" value="<!-- TMPL_VAR name="issuesatonce" -->" />
<input type="hidden" name="user" value="<!-- TMPL_VAR name="librarian" -->" />
</span>
</xsl:if>
- <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr>
-
<xsl:if test="marc:datafield[@tag=020]">
<span class="results_summary"><span class="label">ISBN: </span>
<xsl:for-each select="marc:datafield[@tag=020]">
<xsl:call-template name="tag_215" />
- <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=090]/marc:subfield[@code='a']}"><!-- unAPI --></abbr>
-
<xsl:if test="marc:controlfield[@tag=009]">
<li><strong>PPN: </strong>
<xsl:value-of select="marc:controlfield[@tag=009]"/>
</span>
</xsl:if>
- <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=999]/marc:subfield[@code='c']}" ><!-- unAPI --></abbr>
-
<xsl:if test="marc:datafield[@tag=020]">
<span class="results_summary"><span class="label">ISBN: </span>
<xsl:for-each select="marc:datafield[@tag=020]">
<xsl:call-template name="tag_215" />
- <abbr class="unapi-id" title="koha:biblionumber:{marc:datafield[@tag=090]/marc:subfield[@code='a']}"><!-- unAPI --></abbr>
-
<xsl:if test="marc:datafield[@tag=010]/marc:subfield[@code='a']">
<span class="results_summary"><span class="label">ISBN: </span>
<xsl:for-each select="marc:datafield[@tag=010]">
use strict;
sub kohaversion {
- our $VERSION = '3.01.00.134';
+ our $VERSION = '3.01.00.135';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
use C4::Branch;
use C4::Category;
use File::Basename;
-use YAML;
my $input = new CGI;
my $quicksearch = $input->param('quicksearch');
# because pazGetRecords handles retieving only the records
# we want as specified by $offset and $results_per_page,
# we need to set the offset parameter of searchResults to 0
- my @group_results = searchResults( $query_desc, $group->{'group_count'},$results_per_page, 0, $scan,
+ my @group_results = searchResults( 'opac', $query_desc, $group->{'group_count'},$results_per_page, 0, $scan,
@{ $group->{"RECORDS"} }, C4::Context->preference('hidelostitems'));
push @newresults, { group_label => $group->{'group_label'}, GROUP_RESULTS => \@group_results };
}
} else {
- @newresults = searchResults( $query_desc,$hits,$results_per_page,$offset,$scan,@{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems'));
+ @newresults = searchResults('opac', $query_desc, $hits, $results_per_page, $offset, $scan,
+ @{$results_hashref->{$server}->{"RECORDS"}},, C4::Context->preference('hidelostitems'));
}
my $tag_quantity;
if (C4::Context->preference('TagsEnabled') and
$$suggestion{suggestedby} ||= $borrowernumber unless ($allsuggestions);
}
# warn "bornum:",$borrowernumber;
-use YAML;
+
my $suggestions_loop =
&SearchSuggestion( $suggestion);
if ( $op eq "add_confirm" ) {
use strict;
use warnings;
+
+use CGI;
use C4::Biblio;
use C4::Items;
-use CGI;
use C4::Output;
use C4::Reserves;
use C4::Circulation;
use C4::Members;
+use C4::Auth qw/checkauth/;
-my $input = new CGI;
-#print $input->header;
+my $input = CGI->new();
+my ($user, $cookie, $sesion_id, $flags) = checkauth($input, 0, { reserveforothers => 'place_holds' }, 'intranet');
my @bibitems=$input->param('biblioitem');
# FIXME I think reqbib does not exist anymore, it's used in line 82, to AddReserve of contraint type 'o'
use C4::ClassSource;
use C4::Dates;
use C4::Debug;
-use YAML;
use Switch;
use MARC::File::XML;
=head1 AUTHOR
-Koha Developement team <info@koha.org>
+Koha Development Team <info@koha.org>
Galen Charlton <galen.charlton@liblime.com>
use Test::More qw(no_plan);
use C4::Context;
-use YAML;
my $root_dir = C4::Context->config( 'intranetdir' ) . '/installer/data/mysql';
my $base_perms_file = "en/mandatory/userpermissions.sql";