View | Details | Raw Unified | Return to bug 13029
Collapse All | Expand All

(-)a/C4/SMS.pm (-4 / +21 lines)
Lines 1-6 Link Here
1
package C4::SMS;
1
package C4::SMS;
2
2
3
# Copyright 2007 Liblime
3
# Copyright 2007 Liblime
4
# Copyright 2015 Biblibre
5
# Copyright 2016 Catalyst
4
#
6
#
5
# This file is part of Koha.
7
# This file is part of Koha.
6
#
8
#
Lines 28-34 my $success = C4::SMS->send_sms({ message => 'This is my text message', Link Here
28
30
29
=head1 DESCRIPTION
31
=head1 DESCRIPTION
30
32
33
A wrapper for SMS::Send.
31
34
35
Can use a yaml file for config, the path to which is in the koha-conf.xml
36
<sms_send_config>__KOHA_CONF_DIR__/sms_send/</sms_send_config>
37
38
Each file needs to be in the format of
39
__KOHA_CONF_DIR__/sms_send/<driver>.yaml
40
41
For example for SMS::Send::UK::Kapow the config would be
42
43
/etc/koha/sites/instancename/sms_send/UK/Kapow.yaml for package install
44
or
45
/etc/koha/sms_send/UK/Kapow.yaml for tarball
46
47
A underscore character is prepended to all parameter names so they are
48
treated as driver-specific options (leading underscore must not appear
49
in config file).
32
50
33
=cut
51
=cut
34
52
Lines 77-86 sub send_sms { Link Here
77
    my $subpath = $driver;
95
    my $subpath = $driver;
78
    $subpath =~ s|::|/|;
96
    $subpath =~ s|::|/|;
79
97
80
    my $conf_file = File::Spec->catfile(
98
    my $conf_file =
81
        C4::Context->config('installdir'),
99
      File::Spec->catfile( C4::Context->config('sms_send_config'), $subpath )
82
        'etc', 'sms', 'driver', $subpath
100
      . q{.yaml};
83
    ) . q{.yaml};
84
    my %args;
101
    my %args;
85
    if ( -f $conf_file ) {
102
    if ( -f $conf_file ) {
86
        require YAML;
103
        require YAML;
(-)a/debian/templates/koha-conf-site.xml.in (+2 lines)
Lines 311-315 __END_SRU_PUBLICSERVER__ Link Here
311
    <font type="HBO">/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf</font>
311
    <font type="HBO">/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans-BoldOblique.ttf</font>
312
 </ttf>
312
 </ttf>
313
313
314
 <!-- Path to the config file for SMS::Send -->
315
 <sms_send_config>__KOHA_CONF_DIR__/sms_send/</sms_send_config>
314
</config>
316
</config>
315
</yazgfs>
317
</yazgfs>
(-)a/etc/koha-conf.xml (-1 / +2 lines)
Lines 138-142 __PAZPAR2_TOGGLE_XML_POST__ Link Here
138
    <font type="HBO">__FONT_DIR__/DejaVuSans-BoldOblique.ttf</font>
138
    <font type="HBO">__FONT_DIR__/DejaVuSans-BoldOblique.ttf</font>
139
 </ttf>
139
 </ttf>
140
140
141
 <!-- Path to the config file for SMS::Send -->
142
  <sms_send_config>__KOHA_CONF_DIR__/sms_send/</sms_send_config>
141
</config>
143
</config>
142
</yazgfs>
144
</yazgfs>
143
- 

Return to bug 13029