Changeset 5949
- Timestamp:
- 01/06/10 02:33:08 (2 years ago)
- File:
-
- 1 edited
-
trunk/GenPDFAddOn/lib/Foswiki/Contrib/GenPDF.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/GenPDFAddOn/lib/Foswiki/Contrib/GenPDF.pm
r5722 r5949 247 247 # Get a topic name without any whitespace 248 248 $topic =~ s|\s||g; 249 250 ($webName, $topic) = Foswiki::Func::normalizeWebTopicName($webName, $topic); 251 249 252 if ( $prefs{'hftopic'} ) { 250 253 $text = Foswiki::Func::readTopicText( $webName, $topic ); … … 305 308 my $topic = $prefs{'titletopic'}; 306 309 310 ($webName, $topic) = Foswiki::Func::normalizeWebTopicName($webName, $topic); 311 312 313 _writeDebug("building title topic $topic" ) if $prefs{'debug'}; # DEBUG 314 315 307 316 # Get a topic name without any whitespace 308 317 $topic =~ s|\s||g; … … 312 321 my $doc = $prefs{'titledoc'}; 313 322 if ($doc) { 323 _writeDebug("building title topic from an attachment $webName, $topic, $doc" ) if $prefs{'debug'}; # DEBUG 314 324 $text = Foswiki::Func::readAttachment( $webName, $topic, $doc ); 315 325 if ($text) { … … 329 339 } 330 340 else { 341 _writeDebug("building title topic from a topic $webName, $topic" ) if $prefs{'debug'}; # DEBUG 331 342 $text .= Foswiki::Func::readTopicText( $webName, $topic ); 343 if ( $text =~ /^http.*\/.*\/oops\/.*oopsaccessview$/ ) { 344 _writeDebug("Access exception reading $webName, $topic" ); # DEBUG 345 } 346 332 347 } 333 348 } … … 503 518 Foswiki::Func::readAttachment( $imgInfo->{web}, $imgInfo->{topic}, 504 519 $imgInfo->{file} ); 505 binmode $tempfh; 506 print $tempfh $data; # copy the attachment to the temporary file 507 close $tempfh; 520 if ($data) { 521 binmode $tempfh; 522 print $tempfh $data; # copy the attachment to the temporary file 523 close $tempfh; 524 } 508 525 } 509 526 catch Foswiki::AccessControlException with {
Note: See TracChangeset
for help on using the changeset viewer.
