[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5062] branches/1.3
- Subject: SF.net SVN: ledger-smb:[5062] branches/1.3
- From: ..hidden..
- Date: Mon, 30 Jul 2012 02:30:29 +0000
Revision: 5062
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=5062&view=rev
Author: einhverfr
Date: 2012-07-30 02:30:29 +0000 (Mon, 30 Jul 2012)
Log Message:
-----------
Performance fix for template detection. Only load all template modules when we actually need to check.
Modified Paths:
--------------
branches/1.3/Changelog
branches/1.3/LedgerSMB/Template.pm
branches/1.3/UI/Contact/pricelist.html
Modified: branches/1.3/Changelog
===================================================================
--- branches/1.3/Changelog 2012-07-30 02:16:20 UTC (rev 5061)
+++ branches/1.3/Changelog 2012-07-30 02:30:29 UTC (rev 5062)
@@ -21,6 +21,7 @@
* Fixed insufficient permissions check in System/Defaults (Chris T)
* Added missing ap_transaction_all role (Chris T, h/t Erik H)
* Fixed internal server error setting up user in setup.pl (Chris T)
+* Performance fix for templates and format detection (Chris T)
Changelog for 1.3.20
* Fixes for es_AR translation, duplicate keys removed (Andres B)
Modified: branches/1.3/LedgerSMB/Template.pm
===================================================================
--- branches/1.3/LedgerSMB/Template.pm 2012-07-30 02:16:20 UTC (rev 5061)
+++ branches/1.3/LedgerSMB/Template.pm 2012-07-30 02:30:29 UTC (rev 5062)
@@ -282,7 +282,7 @@
sub render {
my $self = shift;
my $vars = shift;
- $vars->{FORMATS} = $self->available_formats;
+ $vars->{LIST_FORMATS} = sub { return $self->available_formats} ;
$vars->{CSSDIR} = $LedgerSMB::Sysconfig::cssdir;
if ($self->{format} !~ /^\p{IsAlnum}+$/) {
throw Error::Simple "Invalid format";
Modified: branches/1.3/UI/Contact/pricelist.html
===================================================================
--- branches/1.3/UI/Contact/pricelist.html 2012-07-30 02:16:20 UTC (rev 5061)
+++ branches/1.3/UI/Contact/pricelist.html 2012-07-30 02:30:29 UTC (rev 5062)
@@ -83,6 +83,8 @@
value = "save_pricelist"
} ;
+FORMATS = LIST_FORMATS();
+
IF FORMATS.grep('PDF').size() ?> <a href="customer.pl?action=pricelist&format=PDF&credit_id=<?lsmb
credit_id ?>&entity_id=<?lsmb entity_id
?>">[<?lsmb text('PDF') ?>]</a>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.