|
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 751-758
sub _parseletter_sth {
Link Here
|
| 751 |
# broke things for the rest of us. prepare_cached is a better |
752 |
# broke things for the rest of us. prepare_cached is a better |
| 752 |
# way to cache statement handles anyway. |
753 |
# way to cache statement handles anyway. |
| 753 |
my $query = |
754 |
my $query = |
|
|
755 |
($table eq 'accountlines' ) ? "SELECT * FROM $table WHERE accountlines_id = ?" : |
| 754 |
($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
756 |
($table eq 'biblio' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
| 755 |
($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
757 |
($table eq 'biblioitems' ) ? "SELECT * FROM $table WHERE biblionumber = ?" : |
|
|
758 |
($table eq 'credits' ) ? "SELECT * FROM accountlines WHERE accountlines_id = ?" : |
| 759 |
($table eq 'debits' ) ? "SELECT * FROM accountlines WHERE accountlines_id = ?" : |
| 756 |
($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
760 |
($table eq 'items' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
| 757 |
($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
761 |
($table eq 'issues' ) ? "SELECT * FROM $table WHERE itemnumber = ?" : |
| 758 |
($table eq 'old_issues' ) ? "SELECT * FROM $table WHERE itemnumber = ? ORDER BY timestamp DESC LIMIT 1" : |
762 |
($table eq 'old_issues' ) ? "SELECT * FROM $table WHERE itemnumber = ? ORDER BY timestamp DESC LIMIT 1" : |
|
Lines 1487-1492
sub _process_tt {
Link Here
|
| 1487 |
my $loops = $params->{loops}; |
1491 |
my $loops = $params->{loops}; |
| 1488 |
my $substitute = $params->{substitute} || {}; |
1492 |
my $substitute = $params->{substitute} || {}; |
| 1489 |
|
1493 |
|
|
|
1494 |
my $htdocs = C4::Context->config('intrahtdocs'); |
| 1495 |
my ($theme, $lang, $activethemes)= C4::Templates::themelanguage( $htdocs, 'about.tt', 'intranet'); |
| 1496 |
my @includes; |
| 1497 |
foreach (@$activethemes) { |
| 1498 |
push @includes, "$htdocs/$_/$lang/includes"; |
| 1499 |
push @includes, "$htdocs/$_/en/includes" unless $lang eq 'en'; |
| 1500 |
} |
| 1501 |
|
| 1490 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
1502 |
my $use_template_cache = C4::Context->config('template_cache_dir') && defined $ENV{GATEWAY_INTERFACE}; |
| 1491 |
my $template = Template->new( |
1503 |
my $template = Template->new( |
| 1492 |
{ |
1504 |
{ |
|
Lines 1495-1500
sub _process_tt {
Link Here
|
| 1495 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
1507 |
PLUGIN_BASE => 'Koha::Template::Plugin', |
| 1496 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
1508 |
COMPILE_EXT => $use_template_cache ? '.ttc' : '', |
| 1497 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
1509 |
COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', |
|
|
1510 |
INCLUDE_PATH => \@includes, |
| 1498 |
FILTERS => {}, |
1511 |
FILTERS => {}, |
| 1499 |
ENCODING => 'UTF-8', |
1512 |
ENCODING => 'UTF-8', |
| 1500 |
} |
1513 |
} |
|
Lines 1548-1553
sub _get_tt_params {
Link Here
|
| 1548 |
plural => 'branches', |
1561 |
plural => 'branches', |
| 1549 |
pk => 'branchcode', |
1562 |
pk => 'branchcode', |
| 1550 |
}, |
1563 |
}, |
|
|
1564 |
credits => { |
| 1565 |
module => 'Koha::Account::Lines', |
| 1566 |
singular => 'credit', |
| 1567 |
plural => 'credits', |
| 1568 |
pk => 'accountlines_id', |
| 1569 |
}, |
| 1570 |
debits => { |
| 1571 |
module => 'Koha::Account::Lines', |
| 1572 |
singular => 'debit', |
| 1573 |
plural => 'debits', |
| 1574 |
pk => 'accountlines_id', |
| 1575 |
}, |
| 1551 |
items => { |
1576 |
items => { |
| 1552 |
module => 'Koha::Items', |
1577 |
module => 'Koha::Items', |
| 1553 |
singular => 'item', |
1578 |
singular => 'item', |