generated filename is now dbname_pdfpagename instead of dbname_pdfnumber

This commit is contained in:
Mike Beck
2002-12-13 14:46:58 +00:00
parent b252e6af1d
commit 92058804fa
2 changed files with 20 additions and 3 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-12-13 Mike Beck <mikebeck@users.sourceforge.net>
* pdf_schema.php3: Change generated filename to
db_pdfname.pdf instead of db_pdfnumber.pdf
2002-12-12 Alexander M. Turek <rabus@users.sourceforge.net> 2002-12-12 Alexander M. Turek <rabus@users.sourceforge.net>
* lang/italian-*.inc.php3: Updates, thanks again to Pietro Danesi (danone). * lang/italian-*.inc.php3: Updates, thanks again to Pietro Danesi (danone).
* lang/polish-*.inc.php3: Updates, thanks again to Jakub Wilk (ubanus). * lang/polish-*.inc.php3: Updates, thanks again to Jakub Wilk (ubanus).

View File

@@ -1059,11 +1059,24 @@ class PMA_RT
*/ */
function PMA_RT_showRt() function PMA_RT_showRt()
{ {
global $pdf, $db, $pdf_page_number; global $pdf, $db, $pdf_page_number, $cfgRelation;
$pdf->SetFontSize(14); $pdf->SetFontSize(14);
$pdf->SetLineWidth(0.2); $pdf->SetLineWidth(0.2);
$pdf->SetDisplayMode('fullpage'); $pdf->SetDisplayMode('fullpage');
$pdf->Output($db . '_' . $pdf_page_number . '.pdf', TRUE); // Get the name of this pdfpage to use as filename (Mike Beck)
$_name_sql = 'SELECT page_descr FROM ' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE page_nr = ' . $pdf_page_number;
$_name_rs = PMA_query_as_cu($_name_sql);
if ($_name_rs) {
$_name_row = PMA_mysql_fetch_row($_name_rs);
$filename = $_name_row[0] . '.pdf';
}
// i don't know if there is a chance for this to happen, but rather be on the safe side:
if (empty($filename)) {
$filename = $pdf_page_number . '.pdf';
}
$pdf->Output($db . '_' . $filename, TRUE);
//$pdf->Output('', TRUE); //$pdf->Output('', TRUE);
} // end of the "PMA_RT_showRt()" method } // end of the "PMA_RT_showRt()" method