Lines 31-36
use Try::Tiny;
Link Here
|
31 |
use C4::Members; |
31 |
use C4::Members; |
32 |
use C4::Log; |
32 |
use C4::Log; |
33 |
use C4::SMS; |
33 |
use C4::SMS; |
|
|
34 |
use C4::Templates; |
34 |
use C4::Debug; |
35 |
use C4::Debug; |
35 |
use Koha::DateUtils; |
36 |
use Koha::DateUtils; |
36 |
use Koha::SMS::Providers; |
37 |
use Koha::SMS::Providers; |
Lines 784-791
sub _parseletter_sth {
Link Here
|
784 |
# broke things for the rest of us. prepare_cached is a better |
785 |
# broke things for the rest of us. prepare_cached is a better |
785 |
# way to cache statement handles anyway. |
786 |
# way to cache statement handles anyway. |
786 |
my $query = |
787 |
my $query = |
|
|
788 |
($table eq 'accountlines' ) ? "SELECT * FROM $table WHERE accountlines_id = ?" : |
787 |
($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
789 |
($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
788 |
($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
790 |
($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
|
|
791 |
($table eq 'credits' ) ? "SELECT * FROM accountlines WHERE accountlines_id = ?" : |
792 |
($table eq 'debits' ) ? "SELECT * FROM accountlines WHERE accountlines_id = ?" : |
789 |
($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
793 |
($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
790 |
($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
794 |
($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
791 |
($table eq 'old_issues' ) ? "SELECT * FROM $table WHERE itemnumber = ? ORDER BY timestamp DESC LIMIT 1" : |
795 |
($table eq 'old_issues' ) ? "SELECT * FROM $table WHERE itemnumber = ? ORDER BY timestamp DESC LIMIT 1" : |
Lines 1520-1525
sub _process_tt {
Link Here
|
1520 |
my $loops = $params->{loops}; |
1524 |
my $loops = $params->{loops}; |
1521 |
my $substitute = $params->{substitute} || {}; |
1525 |
my $substitute = $params->{substitute} || {}; |
1522 |
|
1526 |
|
|
|
1527 |
my $htdocs = C4::Context->config('intrahtdocs'); |
1528 |
my ($theme, $lang, $activethemes)= C4::Templates::themelanguage( $htdocs, 'about.tt', 'intranet'); |
1529 |
my @includes; |
1530 |
foreach (@$activethemes) { |
1531 |
push @includes, "$htdocs/$_/$lang/includes"; |
1532 |
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; |
1533 |
} |
1534 |
|
1523 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
1535 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
1524 |
my $template = Template->new( |
1536 |
my $template = Template->new( |
1525 |
{ |
1537 |
{ |
Lines 1528-1533
sub _process_tt {
Link Here
|
1528 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
1540 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
1529 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
1541 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
1530 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
1542 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
|
|
1543 |
INCLUDE_PATH => \@includes, |
1531 |
FILTERS => {}, |
1544 |
FILTERS => {}, |
1532 |
ENCODING => 'UTF-8', |
1545 |
ENCODING => 'UTF-8', |
1533 |
} |
1546 |
} |
Lines 1587-1592
sub _get_tt_params {
Link Here
|
1587 |
plural => 'branches', |
1600 |
plural => 'branches', |
1588 |
pk => 'branchcode', |
1601 |
pk => 'branchcode', |
1589 |
}, |
1602 |
}, |
|
|
1603 |
credits => { |
1604 |
module => 'Koha::Account::Lines', |
1605 |
singular => 'credit', |
1606 |
plural => 'credits', |
1607 |
pk => 'accountlines_id', |
1608 |
}, |
1609 |
debits => { |
1610 |
module => 'Koha::Account::Lines', |
1611 |
singular => 'debit', |
1612 |
plural => 'debits', |
1613 |
pk => 'accountlines_id', |
1614 |
}, |
1590 |
items => { |
1615 |
items => { |
1591 |
module => 'Koha::Items', |
1616 |
module => 'Koha::Items', |
1592 |
singular => 'item', |
1617 |
singular => 'item', |