Convert export to plugin architecture, so that plugins are independant piece of code (RFE #1325937).

This commit is contained in:
Michal Čihař
2006-04-26 16:33:59 +00:00
parent 29977afa0e
commit 6e17c995fb
12 changed files with 419 additions and 795 deletions

View File

@@ -6,6 +6,21 @@
* Set of functions used to build CSV dumps of tables
*/
if (isset($plugin_list)) {
$plugin_list['htmlword'] = array(
'text' => 'strHTMLWord',
'extension' => 'doc',
'options' => array(
array('type' => 'bool', 'name' => 'structure', 'text' => 'strStructure', 'force' => 'data'),
array('type' => 'bgroup', 'name' => 'data', 'text' => 'strData', 'force' => 'structure'),
array('type' => 'text', 'name' => 'null', 'text' => 'strReplaceNULLBy'),
array('type' => 'bool', 'name' => 'columns', 'text' => 'strPutColNames'),
array('type' => 'egroup'),
),
'options_text' => 'strHTMLWordOptions',
);
} else {
/**
* Outputs comment
*
@@ -133,7 +148,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$schema_insert = '<tr class="print-category">';
for ($j = 0; $j < $fields_cnt; $j++) {
if (!isset($row[$j]) || is_null($row[$j])) {
$value = $GLOBALS[$what . '_replace_null'];
$value = $GLOBALS[$what . '_null'];
} elseif ($row[$j] == '0' || $row[$j] != '') {
$value = $row[$j];
} else {
@@ -320,4 +335,6 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
return PMA_exportOutputHandler('</table>');
}
}
?>