Permalink
Browse files

Improve function name

  • Loading branch information...
1 parent 2a7358c commit 8ec765a8bce231285b109c1209cb3b303816cb1b @lem9 lem9 committed May 14, 2012
View
@@ -179,15 +179,15 @@ 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
*
* @return string the message
*
* @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>';
View
@@ -918,7 +918,7 @@ class="textfield" <?php echo $unnullify_trigger; ?>
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 @@ public function dataProvider()
*/
function testMaximumUploadSize($size, $unit, $res)
{
- $this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_displayMaximumUploadSize($size));
+ $this->assertEquals("(" . __('Max: '). $res . $unit .")", PMA_getFormattedMaximumUploadSize($size));
}
}

0 comments on commit 8ec765a

Please sign in to comment.