[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6339] trunk
- Subject: SF.net SVN: ledger-smb:[6339] trunk
- From: ..hidden..
- Date: Thu, 2 Jan 2014 05:42:59 +0000
Revision: 6339
http://sourceforge.net/p/ledger-smb/code/6339
Author: einhverfr
Date: 2014-01-02 05:42:57 +0000 (Thu, 02 Jan 2014)
Log Message:
-----------
Fixes for template tables
Modified Paths:
--------------
trunk/LedgerSMB/Template/HTML.pm
trunk/sql/Pg-database.sql
trunk/sql/modules/Fixes.sql
Modified: trunk/LedgerSMB/Template/HTML.pm
===================================================================
--- trunk/LedgerSMB/Template/HTML.pm 2014-01-02 03:34:58 UTC (rev 6338)
+++ trunk/LedgerSMB/Template/HTML.pm 2014-01-02 05:42:57 UTC (rev 6339)
@@ -127,7 +127,11 @@
} else {
$output = \$parent->{output};
}
- if (ref $parent->{template} eq 'SCALAR') {
+ if ($parent->{include_path} eq 'DB'){
+ $source = LedgerSMB::Template::DB->get_template(
+ $parent->{template}, $parent->{include_path_lang}
+ );
+ } elsif (ref $parent->{template} eq 'SCALAR') {
$source = $parent->{template};
} elsif (ref $parent->{template} eq 'ARRAY') {
$source = join "\n", @{$parent->{template}};
Modified: trunk/sql/Pg-database.sql
===================================================================
--- trunk/sql/Pg-database.sql 2014-01-02 03:34:58 UTC (rev 6338)
+++ trunk/sql/Pg-database.sql 2014-01-02 05:42:57 UTC (rev 6339)
@@ -4855,10 +4855,11 @@
template_name text not null,
language_code varchar(6) references language(code),
template text not null,
- unique(template_name, language_code)
+ format text not null,
+ unique(template_name, language_code, format)
);
-CREATE UNIQUE INDEX template_name_idx_u ON template(template_name)
+CREATE UNIQUE INDEX template_name_idx_u ON template(template_name, format)
WHERE language_code is null; -- Pseudo-Pkey
commit;
Modified: trunk/sql/modules/Fixes.sql
===================================================================
--- trunk/sql/modules/Fixes.sql 2014-01-02 03:34:58 UTC (rev 6338)
+++ trunk/sql/modules/Fixes.sql 2014-01-02 05:42:57 UTC (rev 6339)
@@ -304,10 +304,11 @@
template_name text not null,
language_code varchar(6) references language(code),
template text not null,
- unique(template_name, language_code)
+ format text not null,
+ unique(template_name, language_code, format)
);
-CREATE UNIQUE INDEX template_name_idx_u ON template(template_name)
+CREATE UNIQUE INDEX template_name_idx_u ON template(template_name, format)
WHERE language_code is null; -- Pseudo-Pkey
commit;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits