Merge branch 'master' of git://git.koha-community.org/koha into 3.14-master
This commit is contained in:
commit
af6fa247fd
|
|
@ -308,7 +308,6 @@ sub output_with_http_headers {
|
|||
}
|
||||
|
||||
sub output_html_with_http_headers {
|
||||
binmode( STDOUT, ":encoding(utf8)" );
|
||||
my ( $query, $cookie, $data, $status ) = @_;
|
||||
output_with_http_headers( $query, $cookie, $data, 'html', $status );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<refnamediv>
|
||||
<refname>koha-email-disable</refname>
|
||||
<refpurpose>Turn off the email for a Koha instance.</refpurpose>
|
||||
<refpurpose>Turn off the email for Koha instances.</refpurpose>
|
||||
<refclass>UNIX/Linux</refclass>
|
||||
</refnamediv>
|
||||
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
</refsynopsisdiv>
|
||||
|
||||
<refsect1><title>Description</title>
|
||||
<para>Turn off the email for a Koha instance.</para>
|
||||
<para>Turn off the email for Koha instances.</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1><title>See also</title>
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@ override_dh_auto_install:
|
|||
rm $(TMP)/etc/koha/searchengine/solr/config.yaml
|
||||
rm $(TMP)/etc/koha/searchengine/solr/indexes.yaml
|
||||
rm $(TMP)/etc/koha/solr/indexes.yaml
|
||||
# rm $(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/lib/jquery/jquery.js
|
||||
# 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/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/lib/tiny_mce
|
||||
ln -s /usr/share/tinymce2/www \
|
||||
|
|
@ -59,6 +53,9 @@ override_dh_auto_install:
|
|||
install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \
|
||||
koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \
|
||||
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
|
||||
install -m 0644 koha-tmpl/opac-tmpl/lib/yui/skin.css \
|
||||
koha-tmpl/opac-tmpl/lib/yui/reset-fonts-grids.css \
|
||||
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/css
|
||||
install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \
|
||||
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/prog/en/css
|
||||
install -m 0644 koha-tmpl/intranet-tmpl/prog/en/lib/yui/menu-button-arrow-disabled.png \
|
||||
|
|
@ -93,8 +90,11 @@ override_dh_auto_install:
|
|||
$(TMP)/usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/css
|
||||
sed -i -e 's:url(.*/reset-fonts-grids.css.*):url("/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css"):' \
|
||||
-e 's:url(.*/skin.css.*):url("/opac-tmpl/lib/yui/assets/skins/sam/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/opac/htdocs/opac-tmpl/*/en/css/opac.css \
|
||||
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/*/en/css/sco.css
|
||||
sed -i -e 's:href="/opac-tmpl/lib/yui/reset-fonts-grids.css":href="/opac-tmpl/lib/yui/reset-fonts-grids/reset-fonts-grids.css":' \
|
||||
-e 's:href="/opac-tmpl/lib/yui/skin.css":href="/opac-tmpl/lib/yui/assets/skins/sam/skin.css":' \
|
||||
$(TMP)/usr/share/koha/opac/htdocs/opac-tmpl/ccsr/en/includes/doc-head-close.inc
|
||||
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/intranet/htdocs/intranet-tmpl/prog/en/css/staff-global*.css
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# koha-email-disable -- turn off the email for a Koha instance
|
||||
# koha-email-disable - turn off the email for Koha instances
|
||||
# Copyright 2010 Catalyst IT, Ltd
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
|
@ -18,19 +18,76 @@
|
|||
|
||||
set -e
|
||||
|
||||
if [ "$#" = 0 ]
|
||||
then
|
||||
echo "Disables the email for a koha instance." 1>&2
|
||||
echo "Usage: $0 instancename..." 1>&2
|
||||
die()
|
||||
{
|
||||
echo "$@" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
libdir=/var/lib/koha
|
||||
}
|
||||
|
||||
warn()
|
||||
{
|
||||
echo "$@" 1>&2
|
||||
}
|
||||
|
||||
is_instance()
|
||||
{
|
||||
local instancename=$1
|
||||
|
||||
if find /etc/koha/sites -mindepth 1 -maxdepth 1 \
|
||||
-type d -printf '%f\n'\
|
||||
| grep -q -x $instancename ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
is_email_enabled()
|
||||
{
|
||||
local instancename=$1
|
||||
|
||||
if [ -e /var/lib/koha/$instancename/email.enabled ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
disable_email()
|
||||
{
|
||||
local instancename=$1
|
||||
local libdir="/var/lib/koha"
|
||||
|
||||
rm -f $libdir/$instancename/email.enabled
|
||||
|
||||
echo "Disabled email for instance $instancename."
|
||||
}
|
||||
|
||||
usage()
|
||||
{
|
||||
local scriptname=$0
|
||||
cat <<EOF
|
||||
Disables the email for Koha instances.
|
||||
|
||||
Usage: $scriptname instancename1 instancename2...
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# Parse command line.
|
||||
[ $# -ge 1 ] || ( usage ; die "Missing instance name..." )
|
||||
|
||||
for name in "$@"
|
||||
do
|
||||
if [ ! -d $libdir/$name ]
|
||||
then
|
||||
echo "$0: no koha instance \"$name\"" 1>&2
|
||||
continue
|
||||
if is_instance $name; then
|
||||
if is_email_enabled $name; then
|
||||
disable_email $name
|
||||
else
|
||||
warn "Email already disabled for instance $name."
|
||||
fi
|
||||
else
|
||||
warn "Unknown instance $name."
|
||||
fi
|
||||
rm -f $libdir/$name/email.enabled
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue