public function exportMetadata($db, $tables, $metadataTypes)
{
$cfgRelation = PMA_getRelationsParam();
if (!isset($cfgRelation['db'])) {
return true;
}
$comment = $this->_possibleCRLF() . $this->_possibleCRLF() . $this->_exportComment() . $this->_exportComment(__('Metadata')) . $this->_exportComment();
if (!PMA_exportOutputHandler($comment)) {
return false;
}
if (!$this->_exportUseStatement($cfgRelation['db'], $GLOBALS['sql_compatibility'])) {
return false;
}
$r = true;
if (is_array($tables)) {
// export metadata for each table
foreach ($tables as $table) {
$r &= $this->_exportMetadata($db, $table, $metadataTypes);
}
// export metadata for the database
$r &= $this->_exportMetadata($db, null, $metadataTypes);
} else {
// export metadata for single table
$r &= $this->_exportMetadata($db, $tables, $metadataTypes);
}
return $r;
}