[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11408] manual : download pdf
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11408] manual : download pdf |
Date: |
Tue, 29 Oct 2013 14:47:45 +0000 |
Revision: 11408
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11408
Author: sigurdne
Date: 2013-10-29 14:47:44 +0000 (Tue, 29 Oct 2013)
Log Message:
-----------
manual : download pdf
Modified Paths:
--------------
trunk/manual/inc/class.uimanual.inc.php
Modified: trunk/manual/inc/class.uimanual.inc.php
===================================================================
--- trunk/manual/inc/class.uimanual.inc.php 2013-10-29 10:28:25 UTC (rev
11407)
+++ trunk/manual/inc/class.uimanual.inc.php 2013-10-29 14:47:44 UTC (rev
11408)
@@ -73,6 +73,7 @@
$app = phpgw::get_var('app', 'string', 'GET');
$section = phpgw::get_var('section', 'string', 'GET');
+
if(!$section)
{
$menuaction = phpgw::get_var('referer');
@@ -96,6 +97,30 @@
$lang =
strtoupper(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'])
&& $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] ?
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang']: 'en');
$navbar = phpgw::get_var('navbar', 'string',
'GET');
+ $pdffile = PHPGW_SERVER_ROOT .
"/{$app}/help/{$lang}/{$section}.pdf";
+
+/*
+ if(is_file($pdffile))
+ {
+ $content = file_get_contents($pdffile);
+ $browser = CreateObject('phpgwapi.browser');
+ $browser->content_header("{$section}.pdf",
'application/pdf', strlen($content));
+ echo $content;
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+*/
+
+ if(is_file($pdffile))
+ {
+ $browser = CreateObject('phpgwapi.browser');
+ $browser->content_header("{$section}.pdf", '',
filesize($pdffile));
+ ob_clean();
+ flush();
+ readfile($pdffile);
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+
+
$GLOBALS['phpgw_info']['flags']['app_header'] = $app .
'::' . lang($section);
$GLOBALS['phpgw']->common->phpgw_header();
if($navbar)
@@ -105,18 +130,6 @@
$GLOBALS['phpgw']->hooks->process('help',array('manual'));
parse_navbar();
}
-
- $pdffile = PHPGW_SERVER_ROOT .
"/{$app}/help/{$lang}/{$section}.pdf";
-
- if(is_file($pdffile))
- {
- $browser = CreateObject('phpgwapi.browser');
- $browser->content_header("{$section}.pdf", '',
filesize($pdffile));
- ob_clean();
- flush();
- readfile($pdffile);
- exit;
- }
$odtfile = PHPGW_SERVER_ROOT .
"/{$app}/help/{$lang}/{$section}.odt";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11408] manual : download pdf,
Sigurd Nes <=