Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
dee31183d1
@ -179,7 +179,7 @@ function PMA_getImage($image, $alternate = '', $attributes = array())
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the maximum size for an upload
|
||||
* Returns the formatted maximum size for an upload
|
||||
*
|
||||
* @param integer $max_upload_size the size
|
||||
*
|
||||
@ -187,7 +187,7 @@ function PMA_getImage($image, $alternate = '', $attributes = array())
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_displayMaximumUploadSize($max_upload_size)
|
||||
function PMA_getFormattedMaximumUploadSize($max_upload_size)
|
||||
{
|
||||
// I have to reduce the second parameter (sensitiveness) from 6 to 4
|
||||
// to avoid weird results like 512 kKib
|
||||
@ -3312,7 +3312,7 @@ function PMA_browseUploadFile($max_upload_size)
|
||||
echo '<div id="upload_form_status" style="display: none;"></div>';
|
||||
echo '<div id="upload_form_status_info" style="display: none;"></div>';
|
||||
echo '<input type="file" name="import_file" id="input_import_file" />';
|
||||
echo PMA_displayMaximumUploadSize($max_upload_size) . "\n";
|
||||
echo PMA_getFormattedMaximumUploadSize($max_upload_size) . "\n";
|
||||
// some browsers should respect this :)
|
||||
echo PMA_generateHiddenMaxFileSize($max_upload_size) . "\n";
|
||||
}
|
||||
|
||||
@ -442,7 +442,7 @@ function PMA_sqlQueryFormUpload()
|
||||
echo __('Browse your computer:') . '</legend>';
|
||||
echo '<div class="formelement">';
|
||||
echo '<input type="file" name="sql_file" class="textfield" /> ';
|
||||
echo PMA_displayMaximumUploadSize($GLOBALS['max_upload_size']);
|
||||
echo PMA_getFormattedMaximumUploadSize($GLOBALS['max_upload_size']);
|
||||
// some browsers should respect this :)
|
||||
echo PMA_generateHiddenMaxFileSize($GLOBALS['max_upload_size']) . "\n";
|
||||
echo '</div>';
|
||||
|
||||
@ -918,7 +918,7 @@ foreach ($rows as $row_id => $vrow) {
|
||||
if ($this_field_max_size > $max_field_sizes[$field['pma_type']]) {
|
||||
$this_field_max_size = $max_field_sizes[$field['pma_type']];
|
||||
}
|
||||
echo PMA_displayMaximumUploadSize($this_field_max_size) . "\n";
|
||||
echo PMA_getFormattedMaximumUploadSize($this_field_max_size) . "\n";
|
||||
// do not generate here the MAX_FILE_SIZE, because we should
|
||||
// put only one in the form to accommodate the biggest field
|
||||
if ($this_field_max_size > $biggest_max_file_size) {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Test for PMA_displayMaximumUploadSize from common.lib.php
|
||||
* Test for PMA_getFormattedMaximumUploadSize from common.lib.php
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
* @group common.lib-tests
|
||||
@ -12,7 +12,7 @@
|
||||
*/
|
||||
require_once 'libraries/common.lib.php';
|
||||
|
||||
class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase
|
||||
class PMA_getFormattedMaximumUploadSize_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/*
|
||||
@ -37,7 +37,7 @@ class PMA_displayMaximumUploadSize_test extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
function testMaximumUploadSize($size, $unit, $res)
|
||||
{
|
||||
$this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));
|
||||
$this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_getFormattedMaximumUploadSize($size));
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user