The branch, master has been updated via 822a863690f675e42ab3b5adabd560590d1db797 (commit) via b7b7fe392001ff56592c14eaf9f6d42fe467977a (commit) from d29cf3227dd8d2827f55b0661dfd505345f49df3 (commit)
- Log ----------------------------------------------------------------- commit 822a863690f675e42ab3b5adabd560590d1db797 Author: Michal Čihař mcihar@suse.cz Date: Thu Aug 4 16:47:47 2011 +0200
Reintroduce mistakenly removed code
commit b7b7fe392001ff56592c14eaf9f6d42fe467977a Author: Michal Čihař mcihar@suse.cz Date: Thu Aug 4 16:46:45 2011 +0200
Properly handle special cases
-----------------------------------------------------------------------
Summary of changes: libraries/export/htmlword.php | 5 ++++- libraries/export/latex.php | 4 ++++ libraries/export/odt.php | 11 ++++++++++- 3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php index 5c7a84e..603729b 100644 --- a/libraries/export/htmlword.php +++ b/libraries/export/htmlword.php @@ -275,7 +275,10 @@ if (isset($plugin_list)) { $schema_insert = '<tr class="print-category">';
$extracted_fieldspec = PMA_extractFieldSpec($column['Type']); - $type = $extracted_fieldspec['print_type']; + $type = htmlspecialchars($extracted_fieldspec['print_type']); + if (empty($type)) { + $type = ' '; + }
if (! isset($column['Default'])) { if ($column['Null'] != 'NO') { diff --git a/libraries/export/latex.php b/libraries/export/latex.php index 54ee504..72fe347 100644 --- a/libraries/export/latex.php +++ b/libraries/export/latex.php @@ -393,6 +393,10 @@ if (isset($plugin_list)) { foreach ($fields as $row) { $extracted_fieldspec = PMA_extractFieldSpec($row['Type']); $type = $extracted_fieldspec['print_type']; + if (empty($type)) { + $type = ' '; + } + if (!isset($row['Default'])) { if ($row['Null'] != 'NO') { $row['Default'] = 'NULL'; diff --git a/libraries/export/odt.php b/libraries/export/odt.php index 16867a6..2d17452 100644 --- a/libraries/export/odt.php +++ b/libraries/export/odt.php @@ -317,8 +317,17 @@ if (isset($plugin_list)) {
$columns = PMA_DBI_get_columns($db, $table); foreach ($columns as $column) { + $field_name = $column['Field']; + $GLOBALS['odt_buffer'] .= 'table:table-row'; + $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">' + . 'text:p' . htmlspecialchars($field_name) . '</text:p>' + . '</table:table-cell>'; + $extracted_fieldspec = PMA_extractFieldSpec($column['Type']); - $type = $extracted_fieldspec['print_type']; + $type = htmlspecialchars($extracted_fieldspec['print_type']); + if (empty($type)) { + $type = ' '; + }
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">' . 'text:p' . htmlspecialchars($type) . '</text:p>'
hooks/post-receive