bug #1541189, views not displayed in export list
This commit is contained in:
@@ -5,6 +5,13 @@ phpMyAdmin - ChangeLog
|
|||||||
$Id$
|
$Id$
|
||||||
$HeadURL$
|
$HeadURL$
|
||||||
|
|
||||||
|
2006-10-14 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* export.php, db_details_export.php: bug #1541189, views are not displayed
|
||||||
|
in export list;
|
||||||
|
However I'm still not sure what should be done if a user only chooses
|
||||||
|
a view. In the past we ensured to avoid exporting data from a view
|
||||||
|
because it would create redundant data in the export file
|
||||||
|
|
||||||
2006-10-13 Marc Delisle <lem9@users.sourceforge.net>
|
2006-10-13 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* css/phpmyadmin.css.php: bug #1517428, some IE 6 versions have
|
* css/phpmyadmin.css.php: bug #1517428, some IE 6 versions have
|
||||||
problems loading CSS when zlip.output_compression is on,
|
problems loading CSS when zlip.output_compression is on,
|
||||||
|
@@ -36,10 +36,11 @@ $multi_values = '<div align="center"><select name="table_select[]" size="6" mult
|
|||||||
$multi_values .= "\n";
|
$multi_values .= "\n";
|
||||||
|
|
||||||
foreach ( $tables as $each_table ) {
|
foreach ( $tables as $each_table ) {
|
||||||
if ( PMA_MYSQL_INT_VERSION >= 50000 && is_null($each_table['Engine']) ) {
|
// ok we show also views
|
||||||
|
//if ( PMA_MYSQL_INT_VERSION >= 50000 && is_null($each_table['Engine']) ) {
|
||||||
// Don't offer to export views yet.
|
// Don't offer to export views yet.
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
if ( ! empty( $unselectall )
|
if ( ! empty( $unselectall )
|
||||||
|| ( isset( $tmp_select )
|
|| ( isset( $tmp_select )
|
||||||
&& false !== strpos( $tmp_select, '|' . $each_table['Name'] . '|') ) ) {
|
&& false !== strpos( $tmp_select, '|' . $each_table['Name'] . '|') ) ) {
|
||||||
|
36
export.php
36
export.php
@@ -354,22 +354,27 @@ if (!$save_on_server) {
|
|||||||
|
|
||||||
// Check if we have something to export
|
// Check if we have something to export
|
||||||
if ($export_type == 'database') {
|
if ($export_type == 'database') {
|
||||||
|
if (isset($table_select)) {
|
||||||
|
$tables = $table_select;
|
||||||
|
} else {
|
||||||
|
// not sure if this can happen, let's play safe
|
||||||
$tables = PMA_DBI_get_tables($db);
|
$tables = PMA_DBI_get_tables($db);
|
||||||
|
}
|
||||||
$num_tables = count($tables);
|
$num_tables = count($tables);
|
||||||
if ($num_tables == 0) {
|
if ($num_tables == 0) {
|
||||||
$message = $strNoTablesFound;
|
$message = $strNoTablesFound;
|
||||||
$js_to_run = 'functions.js';
|
$js_to_run = 'functions.js';
|
||||||
require_once('./libraries/header.inc.php');
|
require_once('./libraries/header.inc.php');
|
||||||
if ($export_type == 'server') {
|
//if ($export_type == 'server') {
|
||||||
$active_page = 'server_export.php';
|
// $active_page = 'server_export.php';
|
||||||
require('./server_export.php');
|
// require('./server_export.php');
|
||||||
} elseif ($export_type == 'database') {
|
//} elseif ($export_type == 'database') {
|
||||||
$active_page = 'db_details_export.php';
|
$active_page = 'db_details_export.php';
|
||||||
require('./db_details_export.php');
|
require('./db_details_export.php');
|
||||||
} else {
|
//} else {
|
||||||
$active_page = 'tbl_properties_export.php';
|
// $active_page = 'tbl_properties_export.php';
|
||||||
require('./tbl_properties_export.php');
|
// require('./tbl_properties_export.php');
|
||||||
}
|
//}
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -456,12 +461,13 @@ if ($export_type == 'server') {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($table_select)) {
|
//if (isset($table_select)) {
|
||||||
$tmp_select = implode($table_select, '|');
|
// $tmp_select = implode($table_select, '|');
|
||||||
$tmp_select = '|' . $tmp_select . '|';
|
// $tmp_select = '|' . $tmp_select . '|';
|
||||||
}
|
//}
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$views = array();
|
$views = array();
|
||||||
|
// $tables contains the choices from the user (via $table_select)
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
// if this is a view, collect it for later; views must be exported after
|
// if this is a view, collect it for later; views must be exported after
|
||||||
// the tables
|
// the tables
|
||||||
@@ -470,8 +476,8 @@ if ($export_type == 'server') {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table);
|
$local_query = 'SELECT * FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table);
|
||||||
if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $table . '|'))
|
//if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $table . '|'))
|
||||||
|| !isset($tmp_select)) {
|
//|| !isset($tmp_select)) {
|
||||||
|
|
||||||
if (isset($GLOBALS[$what . '_structure'])) {
|
if (isset($GLOBALS[$what . '_structure'])) {
|
||||||
if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates)) {
|
if (!PMA_exportStructure($db, $table, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates)) {
|
||||||
@@ -483,7 +489,7 @@ if ($export_type == 'server') {
|
|||||||
break 2;
|
break 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
foreach ($views as $view) {
|
foreach ($views as $view) {
|
||||||
// no data export for a view
|
// no data export for a view
|
||||||
|
Reference in New Issue
Block a user