[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[6829] trunk/LedgerSMB



Revision: 6829
          http://sourceforge.net/p/ledger-smb/code/6829
Author:   einhverfr
Date:     2014-02-10 10:06:15 +0000 (Mon, 10 Feb 2014)
Log Message:
-----------
Template uploads for missing templates now supported

Modified Paths:
--------------
    trunk/LedgerSMB/Scripts/template.pm
    trunk/LedgerSMB/Template/DB.pm

Modified: trunk/LedgerSMB/Scripts/template.pm
===================================================================
--- trunk/LedgerSMB/Scripts/template.pm	2014-02-10 10:03:28 UTC (rev 6828)
+++ trunk/LedgerSMB/Scripts/template.pm	2014-02-10 10:06:15 UTC (rev 6829)
@@ -42,7 +42,7 @@
 sub display {
     my ($request) = @_;
     my $dbtemp = LedgerSMB::Template::DB->get(%$request);
-    $dbtemp->{content} = $dbtemp->template;
+    $dbtemp->{content} = $dbtemp->template if defined $dbtemp;
     LedgerSMB::Template->new(
         user     => $request->{_user},
         locale   => $request->{_locale},

Modified: trunk/LedgerSMB/Template/DB.pm
===================================================================
--- trunk/LedgerSMB/Template/DB.pm	2014-02-10 10:03:28 UTC (rev 6828)
+++ trunk/LedgerSMB/Template/DB.pm	2014-02-10 10:06:15 UTC (rev 6829)
@@ -110,7 +110,7 @@
          procname => 'template__get',
          args => [$args{template_name}, $args{language_code}, $args{format}]
     );
-    return {} unless $temp->{format};  # allows editing of blank templates
+    return undef unless $temp->{format};  # allows editing of blank templates
     return __PACKAGE__->new(%$temp);
 }
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits