diff --git a/ChangeLog b/ChangeLog index 2440c21aa4..b70ca92e14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ phpMyAdmin - ChangeLog ====================== 4.2.4.0 (not yet released) +- bug #4449 Mediawiki export does not produce table header row; also fix related PHP warnings 4.2.3.0 (2014-06-08) - bug #4423 Moving fields not working diff --git a/export.php b/export.php index eb30ce2d6c..c2fb468243 100644 --- a/export.php +++ b/export.php @@ -64,6 +64,7 @@ if (!defined('TESTSUITE')) { 'htmlword_structure_or_data', 'htmlword_null', 'htmlword_columns', + 'mediawiki_headers', 'mediawiki_structure_or_data', 'mediawiki_caption', 'pdf_report_title', diff --git a/libraries/plugins/export/ExportMediawiki.class.php b/libraries/plugins/export/ExportMediawiki.class.php index 200ad98e55..e481ef0a3c 100644 --- a/libraries/plugins/export/ExportMediawiki.class.php +++ b/libraries/plugins/export/ExportMediawiki.class.php @@ -200,6 +200,7 @@ class ExportMediawiki extends ExportPlugin $do_mime = false, $dates = false ) { + $output = ''; switch($export_mode) { case 'create_table': $columns = $GLOBALS['dbi']->getColumns($db, $table); @@ -217,12 +218,12 @@ class ExportMediawiki extends ExportPlugin . $this->_exportCRLF(); // Add the table name - if ($GLOBALS['mediawiki_caption']) { + if (isset($GLOBALS['mediawiki_caption'])) { $output .= "|+'''" . $table . "'''" . $this->_exportCRLF(); } // Add the table headers - if ($GLOBALS['mediawiki_headers']) { + if (isset($GLOBALS['mediawiki_headers'])) { $output .= "|- style=\"background:#ffdead;\"" . $this->_exportCRLF(); $output .= "! style=\"background:#ffffff\" | " . $this->_exportCRLF(); @@ -293,12 +294,12 @@ class ExportMediawiki extends ExportPlugin . $this->_exportCRLF(); // Add the table name - if ($GLOBALS['mediawiki_caption']) { + if (isset($GLOBALS['mediawiki_caption'])) { $output .= "|+'''" . $table . "'''" . $this->_exportCRLF(); } // Add the table headers - if ($GLOBALS['mediawiki_headers']) { + if (isset($GLOBALS['mediawiki_headers'])) { // Get column names $column_names = $GLOBALS['dbi']->getColumnNames($db, $table);