Display choice for charset also when only UploadDir available.
This commit is contained in:
@@ -23,6 +23,8 @@ $Source$
|
|||||||
* footer.inc.php3: Fixed for quotes, HTML entities and other weird
|
* footer.inc.php3: Fixed for quotes, HTML entities and other weird
|
||||||
characters in db/table name.
|
characters in db/table name.
|
||||||
* libraries/display_tbl.lib.php3: Fixed bug #720672 - moved headers.
|
* libraries/display_tbl.lib.php3: Fixed bug #720672 - moved headers.
|
||||||
|
* db_details.php3, tbl_query_box.php3: Display choice for charset also
|
||||||
|
when only UploadDir available.
|
||||||
|
|
||||||
2003-04-14 Garvin Hicking <me@supergarv.de>
|
2003-04-14 Garvin Hicking <me@supergarv.de>
|
||||||
* libraries/common.lib.php3: Fixed SHOW TABLE STATUS LIKE ... FROM ...
|
* libraries/common.lib.php3: Fixed SHOW TABLE STATUS LIKE ... FROM ...
|
||||||
|
@@ -75,24 +75,6 @@ if ($is_upload) {
|
|||||||
<div style="margin-bottom: 5px">
|
<div style="margin-bottom: 5px">
|
||||||
<input type="file" name="sql_file" class="textfield" /><br />
|
<input type="file" name="sql_file" class="textfield" /><br />
|
||||||
<?php
|
<?php
|
||||||
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
|
|
||||||
$temp_charset = reset($cfg['AvailableCharsets']);
|
|
||||||
echo $strCharsetOfFile . "\n"
|
|
||||||
. ' <select name="charset_of_file" size="1">' . "\n"
|
|
||||||
. ' <option value="' . $temp_charset . '"';
|
|
||||||
if ($temp_charset == $charset) {
|
|
||||||
echo ' selected="selected"';
|
|
||||||
}
|
|
||||||
echo '>' . $temp_charset . '</option>' . "\n";
|
|
||||||
while ($temp_charset = next($cfg['AvailableCharsets'])) {
|
|
||||||
echo ' <option value="' . $temp_charset . '"';
|
|
||||||
if ($temp_charset == $charset) {
|
|
||||||
echo ' selected="selected"';
|
|
||||||
}
|
|
||||||
echo '>' . $temp_charset . '</option>' . "\n";
|
|
||||||
}
|
|
||||||
echo ' </select><br />' . "\n" . ' ';
|
|
||||||
} // end if (recoding)
|
|
||||||
$is_gzip = ($cfg['GZipDump'] && @function_exists('gzopen'));
|
$is_gzip = ($cfg['GZipDump'] && @function_exists('gzopen'));
|
||||||
$is_bzip = ($cfg['BZipDump'] && @function_exists('bzdecompress'));
|
$is_bzip = ($cfg['BZipDump'] && @function_exists('bzdecompress'));
|
||||||
if ($is_bzip || $is_gzip) {
|
if ($is_bzip || $is_gzip) {
|
||||||
@@ -119,14 +101,15 @@ if ($is_upload) {
|
|||||||
echo "\n";
|
echo "\n";
|
||||||
|
|
||||||
// web-server upload directory
|
// web-server upload directory
|
||||||
// (TODO: display the charset selection, even if is_upload == FALSE)
|
|
||||||
|
|
||||||
|
$is_upload_dir = false;
|
||||||
if ($cfg['UploadDir'] != '') {
|
if ($cfg['UploadDir'] != '') {
|
||||||
if ($handle = @opendir($cfg['UploadDir'])) {
|
if ($handle = @opendir($cfg['UploadDir'])) {
|
||||||
$is_first = 0;
|
$is_first = 0;
|
||||||
while ($file = @readdir($handle)) {
|
while ($file = @readdir($handle)) {
|
||||||
if (is_file($cfg['UploadDir'] . $file) && substr($file, -4) == '.sql') {
|
if (is_file($cfg['UploadDir'] . $file) && substr($file, -4) == '.sql') {
|
||||||
if ($is_first == 0) {
|
if ($is_first == 0) {
|
||||||
|
$is_upload_dir = true;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo ' <i>' . $strOr . '</i> ' . $strWebServerUploadDirectory . ' :<br />' . "\n";
|
echo ' <i>' . $strOr . '</i> ' . $strWebServerUploadDirectory . ' :<br />' . "\n";
|
||||||
echo ' <div style="margin-bottom: 5px">' . "\n";
|
echo ' <div style="margin-bottom: 5px">' . "\n";
|
||||||
@@ -151,6 +134,30 @@ if ($cfg['UploadDir'] != '') {
|
|||||||
}
|
}
|
||||||
} // end if (web-server upload directory)
|
} // end if (web-server upload directory)
|
||||||
|
|
||||||
|
// Charset conversion options
|
||||||
|
if ($is_upload || $is_upload_dir) {
|
||||||
|
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
|
||||||
|
echo ' <div style="margin-bottom: 5px">' . "\n";
|
||||||
|
$temp_charset = reset($cfg['AvailableCharsets']);
|
||||||
|
echo $strCharsetOfFile . "\n"
|
||||||
|
. ' <select name="charset_of_file" size="1">' . "\n"
|
||||||
|
. ' <option value="' . $temp_charset . '"';
|
||||||
|
if ($temp_charset == $charset) {
|
||||||
|
echo ' selected="selected"';
|
||||||
|
}
|
||||||
|
echo '>' . $temp_charset . '</option>' . "\n";
|
||||||
|
while ($temp_charset = next($cfg['AvailableCharsets'])) {
|
||||||
|
echo ' <option value="' . $temp_charset . '"';
|
||||||
|
if ($temp_charset == $charset) {
|
||||||
|
echo ' selected="selected"';
|
||||||
|
}
|
||||||
|
echo '>' . $temp_charset . '</option>' . "\n";
|
||||||
|
}
|
||||||
|
echo ' </select><br />' . "\n" . ' ';
|
||||||
|
echo ' </div>' . "\n";
|
||||||
|
} // end if (recoding)
|
||||||
|
}
|
||||||
|
|
||||||
// Bookmark Support
|
// Bookmark Support
|
||||||
if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
|
if ($cfg['Bookmark']['db'] && $cfg['Bookmark']['table']) {
|
||||||
if (($bookmark_list = PMA_listBookmarks($db, $cfg['Bookmark'])) && count($bookmark_list) > 0) {
|
if (($bookmark_list = PMA_listBookmarks($db, $cfg['Bookmark'])) && count($bookmark_list) > 0) {
|
||||||
|
@@ -137,24 +137,6 @@ if ($is_upload && (!isset($is_inside_querywindow) ||
|
|||||||
<div style="margin-bottom: 5px">
|
<div style="margin-bottom: 5px">
|
||||||
<input type="file" name="sql_file" class="textfield" /><br />
|
<input type="file" name="sql_file" class="textfield" /><br />
|
||||||
<?php
|
<?php
|
||||||
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
|
|
||||||
$temp_charset = reset($cfg['AvailableCharsets']);
|
|
||||||
echo $strCharsetOfFile . "\n"
|
|
||||||
. ' <select name="charset_of_file" size="1">' . "\n"
|
|
||||||
. ' <option value="' . $temp_charset . '"';
|
|
||||||
if ($temp_charset == $charset) {
|
|
||||||
echo ' selected="selected"';
|
|
||||||
}
|
|
||||||
echo '>' . $temp_charset . '</option>' . "\n";
|
|
||||||
while ($temp_charset = next($cfg['AvailableCharsets'])) {
|
|
||||||
echo ' <option value="' . $temp_charset . '"';
|
|
||||||
if ($temp_charset == $charset) {
|
|
||||||
echo ' selected="selected"';
|
|
||||||
}
|
|
||||||
echo '>' . $temp_charset . '</option>' . "\n";
|
|
||||||
} // end while
|
|
||||||
echo ' </select><br />' . "\n" . ' ';
|
|
||||||
} // end if
|
|
||||||
$is_gzip = ($cfg['GZipDump'] && @function_exists('gzopen'));
|
$is_gzip = ($cfg['GZipDump'] && @function_exists('gzopen'));
|
||||||
$is_bzip = ($cfg['BZipDump'] && @function_exists('bzdecompress'));
|
$is_bzip = ($cfg['BZipDump'] && @function_exists('bzdecompress'));
|
||||||
if ($is_bzip || $is_gzip) {
|
if ($is_bzip || $is_gzip) {
|
||||||
@@ -187,7 +169,7 @@ if (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($qu
|
|||||||
}
|
}
|
||||||
|
|
||||||
// web-server upload directory
|
// web-server upload directory
|
||||||
// (TODO: display the charset selection, even if is_upload == FALSE)
|
$is_upload_dir = false;
|
||||||
if ($cfg['UploadDir'] != '' && !isset($is_inside_querywindow) ||
|
if ($cfg['UploadDir'] != '' && !isset($is_inside_querywindow) ||
|
||||||
($cfg['UploadDir'] != '' && isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && ($querydisplay_tab == 'files' || $querydisplay_tab == 'full')) && isset($db) && $db != '') {
|
($cfg['UploadDir'] != '' && isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && ($querydisplay_tab == 'files' || $querydisplay_tab == 'full')) && isset($db) && $db != '') {
|
||||||
|
|
||||||
@@ -196,6 +178,7 @@ if ($cfg['UploadDir'] != '' && !isset($is_inside_querywindow) ||
|
|||||||
while ($file = @readdir($handle)) {
|
while ($file = @readdir($handle)) {
|
||||||
if (is_file($cfg['UploadDir'] . $file) && substr($file, -4) == '.sql') {
|
if (is_file($cfg['UploadDir'] . $file) && substr($file, -4) == '.sql') {
|
||||||
if ($is_first == 0) {
|
if ($is_first == 0) {
|
||||||
|
$is_upload_dir = true;
|
||||||
echo "\n";
|
echo "\n";
|
||||||
echo ' ' . ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && $querydisplay_tab == 'full') || !isset($is_inside_querywindow) ? '<i>' . $strOr . '</i>' : '') . ' ' . $strWebServerUploadDirectory . ' :<br />' . "\n";
|
echo ' ' . ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE && isset($querydisplay_tab) && $querydisplay_tab == 'full') || !isset($is_inside_querywindow) ? '<i>' . $strOr . '</i>' : '') . ' ' . $strWebServerUploadDirectory . ' :<br />' . "\n";
|
||||||
echo ' <div style="margin-bottom: 5px">' . "\n";
|
echo ' <div style="margin-bottom: 5px">' . "\n";
|
||||||
@@ -225,6 +208,30 @@ if (function_exists('PMA_set_enc_form')) {
|
|||||||
echo PMA_set_enc_form(' ');
|
echo PMA_set_enc_form(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Charset conversion options
|
||||||
|
if ($is_upload || $is_upload_dir) {
|
||||||
|
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
|
||||||
|
echo ' <div style="margin-bottom: 5px">' . "\n";
|
||||||
|
$temp_charset = reset($cfg['AvailableCharsets']);
|
||||||
|
echo $strCharsetOfFile . "\n"
|
||||||
|
. ' <select name="charset_of_file" size="1">' . "\n"
|
||||||
|
. ' <option value="' . $temp_charset . '"';
|
||||||
|
if ($temp_charset == $charset) {
|
||||||
|
echo ' selected="selected"';
|
||||||
|
}
|
||||||
|
echo '>' . $temp_charset . '</option>' . "\n";
|
||||||
|
while ($temp_charset = next($cfg['AvailableCharsets'])) {
|
||||||
|
echo ' <option value="' . $temp_charset . '"';
|
||||||
|
if ($temp_charset == $charset) {
|
||||||
|
echo ' selected="selected"';
|
||||||
|
}
|
||||||
|
echo '>' . $temp_charset . '</option>' . "\n";
|
||||||
|
}
|
||||||
|
echo ' </select><br />' . "\n" . ' ';
|
||||||
|
echo ' </div>' . "\n";
|
||||||
|
} // end if (recoding)
|
||||||
|
}
|
||||||
|
|
||||||
// Bookmark Support
|
// Bookmark Support
|
||||||
$bookmark_go = FALSE;
|
$bookmark_go = FALSE;
|
||||||
if (!isset($is_inside_querywindow) ||
|
if (!isset($is_inside_querywindow) ||
|
||||||
|
Reference in New Issue
Block a user