Use common file listing in query window, remove no more used functions. Please note that file import from query windows is currently half rewritten, so compressed imports will not work.

This commit is contained in:
Michal Čihař
2005-09-27 19:30:44 +00:00
parent de03ca872b
commit cbea45fa0f
5 changed files with 51 additions and 114 deletions

View File

@@ -2526,34 +2526,6 @@ if (typeof(document.getElementById) != 'undefined'
define('PMA_MULTIBYTE_ENCODING', 1);
} // end if
/**
* Function to check valid extension of file. It accepts entered
* extensions and bz2 and gz if supported.
*
* @param string File name to be tested.
* @param string Extension that is valid.
*
* @access public
* @author Michal Cihar (nijel@users.sourceforge.net)
* @return bool Whether extension is valid
*/
function PMA_checkFileExtensions($file, $extension) {
if (substr($file, -1 * strlen($extension)) == $extension) {
return TRUE;
}
if ($GLOBALS['cfg']['GZipDump'] && @function_exists('gzopen')) {
if (substr($file, -3 - strlen($extension)) == $extension . '.gz') {
return TRUE;
}
}
if ($GLOBALS['cfg']['BZipDump'] && @function_exists('bzdecompress')) {
if (substr($file, -4 - strlen($extension)) == $extension . '.bz2') {
return TRUE;
}
}
return FALSE;
} // end function
/**
* Function to generate unique condition for specified row.
*