Skip to content

Commit

Permalink
[bugfix] dont try and generate pdf when there is no pdf
Browse files Browse the repository at this point in the history
git-svn-id: https://seewhatithink.svn.sourceforge.net/svnroot/seewhatithink/trunk@81 4bd0fe05-8733-449a-9ecc-25b3248bf382
  • Loading branch information
adamretter committed Sep 16, 2012
1 parent 5987cfc commit 7ab0b3c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ let $menus := if($is-logged-in)then
mylist:as-atom-feed()

else if($exist:path eq "/mylist.pdf")then
(: TODO consider a redirect to /list/<username>/mylist.pdf i.e. make lists public atom feeds etc :)
if(empty(mylist:get-entries()))then
local:redirect("mylist")
else
(: TODO consider a redirect to /list/<username>/mylist.pdf i.e. make lists public atom feeds etc :)
let $atom := mylist:as-atom-feed(),
$fo-doc := transform:transform($atom, fn:doc(fn:concat($rel-path, "/mylist-to-fo.xslt")), <parameters><param name="logoUri" value="{$rel-path}/images/bg/banner.gif"/><param name="bgUri" value="{$rel-path}/images/bg/fo-background.gif"/></parameters>),
$pdf := xslfo:render($fo-doc, "application/pdf", ()) return
Expand Down

0 comments on commit 7ab0b3c

Please sign in to comment.