improve function names

This commit is contained in:
Marc Delisle
2009-06-07 11:09:13 +00:00
parent a422f9a129
commit 8480ffb665
14 changed files with 30 additions and 30 deletions

View File

@@ -421,7 +421,7 @@ if (!$is_information_schema) {
'structure' => $strStrucOnly,
'data' => $strStrucData,
'dataonly' => $strDataOnly);
PMA_generate_html_radio('what', $choices, 'data', true);
PMA_display_html_radio('what', $choices, 'data', true);
unset($choices);
?>
<input type="checkbox" name="create_database_before_copying" value="1"

View File

@@ -317,7 +317,7 @@ $choices = array(
// 4th parameter set to true to add line breaks
// 5th parameter set to false to avoid htmlspecialchars() escaping in the label
// since we have some HTML in some labels
PMA_generate_html_radio('search_option', $choices, $search_option, true, false);
PMA_display_html_radio('search_option', $choices, $search_option, true, false);
unset($choices);
?>
</td>

View File

@@ -1289,7 +1289,7 @@ function PMA_profilingCheckbox($sql_query)
echo PMA_generate_common_hidden_inputs($GLOBALS['db'], $GLOBALS['table']);
echo '<input type="hidden" name="sql_query" value="' . htmlspecialchars($sql_query) . '" />' . "\n";
echo '<input type="hidden" name="profiling_form" value="1" />' . "\n";
PMA_generate_html_checkbox('profiling', $GLOBALS['strProfiling'], isset($_SESSION['profiling']), true);
PMA_display_html_checkbox('profiling', $GLOBALS['strProfiling'], isset($_SESSION['profiling']), true);
echo '<noscript><input type="submit" value="' . $GLOBALS['strGo'] . '" /></noscript>' . "\n";
echo '</form>' . "\n";
}
@@ -1517,7 +1517,7 @@ function PMA_localisedDate($timestamp = -1, $format = '')
* @return string html code for one tab, a link if valid otherwise a span
* @access public
*/
function PMA_getTab($tab, $url_params = array())
function PMA_generate_html_tab($tab, $url_params = array())
{
// default values
$defaults = array(
@@ -1600,18 +1600,18 @@ function PMA_getTab($tab, $url_params = array())
$out .= '</li>';
return $out;
} // end of the 'PMA_getTab()' function
} // end of the 'PMA_generate_html_tab()' function
/**
* returns html-code for a tab navigation
*
* @uses PMA_getTab()
* @uses PMA_generate_html_tab()
* @uses htmlentities()
* @param array $tabs one element per tab
* @param string $url_params
* @return string html-code for tab-navigation
*/
function PMA_getTabs($tabs, $url_params)
function PMA_generate_html_tabs($tabs, $url_params)
{
$tag_id = 'topmenu';
$tab_navigation =
@@ -1619,7 +1619,7 @@ function PMA_getTabs($tabs, $url_params)
.'<ul id="' . htmlentities($tag_id) . '">' . "\n";
foreach ($tabs as $tab) {
$tab_navigation .= PMA_getTab($tab, $url_params) . "\n";
$tab_navigation .= PMA_generate_html_tab($tab, $url_params) . "\n";
}
$tab_navigation .=
@@ -2330,7 +2330,7 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
* @param boolean $checked is it initially checked?
* @param boolean $onclick should it submit the form on click?
*/
function PMA_generate_html_checkbox($html_field_name, $label, $checked, $onclick) {
function PMA_display_html_checkbox($html_field_name, $label, $checked, $onclick) {
echo '<input type="checkbox" name="' . $html_field_name . '" id="' . $html_field_name . '"' . ($checked ? ' checked="checked"' : '') . ($onclick ? ' onclick="this.form.submit();"' : '') . ' /><label for="' . $html_field_name . '">' . $label . '</label>';
}
@@ -2346,7 +2346,7 @@ function PMA_generate_html_checkbox($html_field_name, $label, $checked, $onclick
* @param boolean $escape_label whether to use htmlspecialchars() on label
* @param string $class enclose each choice with a div of this class
*/
function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='') {
function PMA_display_html_radio($html_field_name, $choices, $checked_choice = '', $line_break = true, $escape_label = true, $class='') {
foreach ($choices as $choice_value => $choice_label) {
if (! empty($class)) {
echo '<div class="' . $class . '">';
@@ -2377,7 +2377,7 @@ function PMA_generate_html_radio($html_field_name, $choices, $checked_choice = '
* @param string $active_choice the choice to select by default
* @todo support titles
*/
function PMA_generate_html_dropdown($select_name, $choices, $active_choice)
function PMA_display_html_dropdown($select_name, $choices, $active_choice)
{
$result = '<select name="' . htmlspecialchars($select_name) . '" id="' . htmlspecialchars($select_name) . '">"' . "\n";
foreach ($choices as $one_choice) {

View File

@@ -131,7 +131,7 @@ if (! $db_is_information_schema) {
$url_params['db'] = $db;
echo PMA_getTabs($tabs, $url_params);
echo PMA_generate_html_tabs($tabs, $url_params);
unset($tabs);
/**

View File

@@ -557,7 +557,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
'P' => $GLOBALS['strPartialText'],
'F' => $GLOBALS['strFullText']
);
PMA_generate_html_radio('display_text', $choices, $_SESSION['userconf']['display_text']);
PMA_display_html_radio('display_text', $choices, $_SESSION['userconf']['display_text']);
echo '</div>';
// prepare full/partial text button or link
@@ -584,14 +584,14 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
'K' => $GLOBALS['strRelationalKey'],
'D' => $GLOBALS['strRelationalDisplayField']
);
PMA_generate_html_radio('relational_display', $choices, $_SESSION['userconf']['relational_display']);
PMA_display_html_radio('relational_display', $choices, $_SESSION['userconf']['relational_display']);
echo '</div>';
}
echo '<div class="formelement">';
PMA_generate_html_checkbox('display_binary', $GLOBALS['strShowBinaryContents'], ! empty($_SESSION['userconf']['display_binary']), false);
PMA_display_html_checkbox('display_binary', $GLOBALS['strShowBinaryContents'], ! empty($_SESSION['userconf']['display_binary']), false);
echo '<br />';
PMA_generate_html_checkbox('display_blob', $GLOBALS['strShowBLOBContents'], ! empty($_SESSION['userconf']['display_blob']), false);
PMA_display_html_checkbox('display_blob', $GLOBALS['strShowBLOBContents'], ! empty($_SESSION['userconf']['display_blob']), false);
echo '</div>';
// I would have preferred to name this "display_transformation".
@@ -599,7 +599,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// per SQL query, and at the same time have a default that displays
// the transformations.
echo '<div class="formelement">';
PMA_generate_html_checkbox('hide_transformation', $GLOBALS['strHide'] . ' ' . $GLOBALS['strMIME_transformation'], ! empty($_SESSION['userconf']['hide_transformation']), false);
PMA_display_html_checkbox('hide_transformation', $GLOBALS['strHide'] . ' ' . $GLOBALS['strMIME_transformation'], ! empty($_SESSION['userconf']['hide_transformation']), false);
echo '</div>';
echo '<div class="clearfloat"></div>';

View File

@@ -83,7 +83,7 @@ $tabs['import']['icon'] = 'b_import.png';
$tabs['import']['link'] = 'server_import.php';
$tabs['import']['text'] = $strImport;
echo PMA_getTabs($tabs, array());
echo PMA_generate_html_tabs($tabs, array());
unset($tabs);

View File

@@ -124,7 +124,7 @@ if ($table_info_num_rows == 0 && !$tbl_is_view) {
$tabs['search']['warning'] = $strTableIsEmpty;
}
echo PMA_getTabs($tabs, $url_params);
echo PMA_generate_html_tabs($tabs, $url_params);
unset($tabs);
/**

View File

@@ -279,7 +279,7 @@ if ($cfgRelation['pdfwork']) {
$choices = array(
'0' => $strEdit,
'1' => $strDelete);
PMA_generate_html_radio('action_choose', $choices, '0', false);
PMA_display_html_radio('action_choose', $choices, '0', false);
unset($choices);
?>
<input type="submit" value="<?php echo $strGo; ?>" /><br />

View File

@@ -31,7 +31,7 @@
* @uses PMA_generate_common_url()
* @uses PMA_generate_common_hidden_inputs()
* @uses PMA_escapeJsString()
* @uses PMA_getTabs()
* @uses PMA_generate_html_tabs()
* @uses PMA_sqlQueryForm()
* @uses PMA_jsFormat()
* @uses in_array()
@@ -206,7 +206,7 @@ require_once './libraries/header_scripts.inc.php';
<?php
if ($tabs) {
echo PMA_getTabs($tabs, array());
echo PMA_generate_html_tabs($tabs, array());
unset($tabs);
}

View File

@@ -1948,7 +1948,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
'1' => $GLOBALS['strChangeCopyModeJustDelete'],
'2' => $GLOBALS['strChangeCopyModeRevoke'],
'3' => $GLOBALS['strChangeCopyModeDeleteAndReload']);
PMA_generate_html_radio('mode', $choices, '4', true);
PMA_display_html_radio('mode', $choices, '4', true);
unset($choices);
echo ' </fieldset>' . "\n"
@@ -1986,7 +1986,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
// 4th parameter set to true to add line breaks
// 5th parameter set to false to avoid htmlspecialchars() escaping in the label
// since we have some HTML in some labels
PMA_generate_html_radio('createdb', $choices, $default_choice, true, false);
PMA_display_html_radio('createdb', $choices, $default_choice, true, false);
unset($choices);
unset($default_choice);

View File

@@ -444,7 +444,7 @@ if (isset($possible_row_formats[$tbl_type])) {
$current_row_format = strtoupper($showtable['Row_format']);
echo '<tr><td><label for="new_row_format">ROW_FORMAT</label></td>';
echo '<td>';
PMA_generate_html_dropdown('new_row_format', $possible_row_formats[$tbl_type], $current_row_format);
PMA_display_html_dropdown('new_row_format', $possible_row_formats[$tbl_type], $current_row_format);
unset($possible_row_formats, $current_row_format);
echo '</td>';
echo '</tr>';
@@ -485,7 +485,7 @@ if (isset($possible_row_formats[$tbl_type])) {
'structure' => $strStrucOnly,
'data' => $strStrucData,
'dataonly' => $strDataOnly);
PMA_generate_html_radio('what', $choices, 'data', true);
PMA_display_html_radio('what', $choices, 'data', true);
unset($choices);
?>
@@ -621,7 +621,7 @@ $this_url_params = array_merge($url_params,
'OPTIMIZE' => $strOptimize,
'REBUILD' => $strRebuild,
'REPAIR' => $strRepair);
PMA_generate_html_radio('partition_operation', $choices, '', false);
PMA_display_html_radio('partition_operation', $choices, '', false);
unset($choices);
echo PMA_showMySQLDocu('partitioning_maintenance', 'partitioning_maintenance');
// I'm not sure of the best way to display that; this link does

View File

@@ -304,7 +304,7 @@ while (list($operator) = each($GLOBALS['cfg']['UnaryOperators'])) {
'ASC' => $strAscending,
'DESC' => $strDescending
);
PMA_generate_html_radio('order', $choices, 'ASC', false, true, "formelement");
PMA_display_html_radio('order', $choices, 'ASC', false, true, "formelement");
unset($choices);
?>
</fieldset>

View File

@@ -526,7 +526,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) {
'first' => $strAtBeginningOfTable,
'after' => sprintf($strAfter, '')
);
PMA_generate_html_radio('field_where', $choices, 'last', false);
PMA_display_html_radio('field_where', $choices, 'last', false);
echo $fieldOptions;
unset($fieldOptions, $choices);
?>

View File

@@ -137,7 +137,7 @@ $tabs['import']['link'] = 'server_import.php';
$tabs['import']['text'] = 'active';
$tabs['import']['class'] = 'active';
echo PMA_getTabs($tabs, array());
echo PMA_generate_html_tabs($tabs, array());
unset($tabs);
if (@file_exists($pmaThemeImage . 'logo_right.png')) {