The "upload dump file" feature is no long displayed if upload is disabled in the php configuration file

This commit is contained in:
Loïc Chapeaux
2001-11-18 20:54:51 +00:00
parent a40045227b
commit d9e5e6331f
3 changed files with 29 additions and 5 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-11-18 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* db_details.php3, lines 178-492; tbl_properties.php3, lines 670-685: the
"upload dump file" feature is no long displayed if upload is disabled in
the php configuration file.
2001-11-17 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3:
- lines 85-86: fixed bug #482627 - show full processlist should have

View File

@@ -475,11 +475,20 @@ if ($num_tables > 0) {
<input type="checkbox" name="show_query" value="y" checked="checked" />&nbsp;
<?php echo $strShowThisQuery; ?><br />
</div>
<?php echo "<i>$strOr</i> $strLocationTextfile"; ?>&nbsp;:<br />
<?php
// loic1: displays import dump feature only if file upload available
$is_upload = (PHP_INT_VERSION >= 40000 && function_exists('ini_get'))
? ((strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) && intval(ini_get('upload_max_filesize')))
: (intval(@get_cfg_var('upload_max_filesize')));
if ($is_upload) {
echo ' <i>' . $strOr . '</i> ' . $strLocationTextfile . '&nbsp;:<br />' . "\n";
?>
<div style="margin-bottom: 5px">
<input type="file" name="sql_file" /><br />
</div>
<?php
<?php
} // end if
echo "\n";
// Bookmark Support
if ($cfgBookmark['db'] && $cfgBookmark['table']) {
if (($bookmark_list = list_bookmarks($db, $cfgBookmark)) && count($bookmark_list) > 0) {

View File

@@ -667,11 +667,21 @@ echo "\n";
<input type="checkbox" name="show_query" value="y" checked="checked" />&nbsp;
<?php echo $strShowThisQuery; ?><br />
</div>
<?php echo "<i>$strOr</i> $strLocationTextfile"; ?>&nbsp;:<br />
<?php
// loic1: displays import dump feature only if file upload available
$is_upload = (PHP_INT_VERSION >= 40000 && function_exists('ini_get'))
? ((strtolower(ini_get('file_uploads')) == 'on' || ini_get('file_uploads') == 1) && intval(ini_get('upload_max_filesize')))
: (intval(@get_cfg_var('upload_max_filesize')));
if ($is_upload) {
echo ' <i>' . $strOr . '</i> ' . $strLocationTextfile . '&nbsp;:<br />' . "\n";
?>
<div style="margin-bottom: 5px">
<input type="file" name="sql_file" /><br />
</div>
<?php
<?php
} // end if
echo "\n";
// Bookmark Support
if ($cfgBookmark['db'] && $cfgBookmark['table']) {
if (($bookmark_list = list_bookmarks($db, $cfgBookmark)) && count($bookmark_list) > 0) {