Skip to content

Commit

Permalink
Merge pull request chilek#64 from prezeskk/master
Browse files Browse the repository at this point in the history
docview: replace include_once with readfile which is faster
  • Loading branch information
chilek committed May 31, 2012
2 parents 82d9b87 + 18ac14f commit 0ae0f47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/documentview.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
if($i > 0)
$htmlbuffer .= "\n<page>\n";
ob_start();
include_once($filename);
readfile($filename);
$htmlbuffer .= ob_get_contents();
ob_end_clean();
if($i > 0)
Expand Down Expand Up @@ -109,7 +109,7 @@
}

ob_start();
include_once($filename);
readfile($filename);
$htmlbuffer = ob_get_contents();
ob_end_clean();
html2pdf($htmlbuffer, $subject, $title, $doc['type'], $doc['id'], 'P', array(10, 5, 15, 5), ($_GET['save'] == 1) ? true : false);
Expand Down
2 changes: 1 addition & 1 deletion userpanel/modules/info/docview.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

ob_start();
include_once($filename);
readfile($filename);
$htmlbuffer = ob_get_contents();
ob_end_clean();
html2pdf($htmlbuffer, $subject, $title, $doc['type'], $doc['id'], 'P', array(10, 5, 15, 5), ($_GET['save'] == 1) ? true : false, $copy);
Expand Down

0 comments on commit 0ae0f47

Please sign in to comment.