coding style : fix indenting
This commit is contained in:
parent
f344774a37
commit
f1a90f78b1
@ -930,7 +930,8 @@ function PMA_DBI_get_databases_full($database = null, $force_stats = false,
|
||||
$databases[$database_name]['SCHEMA_LENGTH'] = 0;
|
||||
$databases[$database_name]['SCHEMA_DATA_FREE'] = 0;
|
||||
|
||||
$res = PMA_DBI_query('SHOW TABLE STATUS FROM '
|
||||
$res = PMA_DBI_query(
|
||||
'SHOW TABLE STATUS FROM '
|
||||
. $common_functions->backquote($database_name) . ';'
|
||||
);
|
||||
|
||||
|
||||
@ -370,9 +370,10 @@ if (isset($_GET['sql_query'])) {
|
||||
<?php } ?>
|
||||
|
||||
<div class="exportoptions" id="submit">
|
||||
<?php echo $common_functions->getExternalBug(
|
||||
__('SQL compatibility mode'), 'mysql', '50027', '14515'
|
||||
);
|
||||
<?php
|
||||
echo $common_functions->getExternalBug(
|
||||
__('SQL compatibility mode'), 'mysql', '50027', '14515'
|
||||
);
|
||||
?>
|
||||
<input type="submit" value="<?php echo __('Go'); ?>" id="buttonGo" />
|
||||
</div>
|
||||
|
||||
@ -25,9 +25,11 @@ $import_list = PMA_getPlugins(
|
||||
|
||||
/* Fail if we didn't find any plugin */
|
||||
if (empty($import_list)) {
|
||||
PMA_Message::error(__(
|
||||
'Could not load import plugins, please check your installation!'
|
||||
))->display();
|
||||
PMA_Message::error(
|
||||
__(
|
||||
'Could not load import plugins, please check your installation!'
|
||||
)
|
||||
)->display();
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
@ -223,16 +225,14 @@ if ($GLOBALS['is_upload'] && !empty($cfg['UploadDir'])) { ?>
|
||||
<ul>
|
||||
<li>
|
||||
<input type="radio" name="file_location" id="radio_import_file" />
|
||||
<?php echo $common_functions->getBrowseUploadFileBlock(
|
||||
$max_upload_size
|
||||
);
|
||||
<?php
|
||||
echo $common_functions->getBrowseUploadFileBlock($max_upload_size);
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" name="file_location" id="radio_local_import_file" />
|
||||
<?php echo $common_functions->getSelectUploadFileBlock(
|
||||
$import_list, $cfg['UploadDir']
|
||||
);
|
||||
<?php
|
||||
echo $common_functions->getSelectUploadFileBlock($import_list, $cfg['UploadDir']);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -144,10 +144,12 @@ function PMA_showEmptyResultMessageOrSetUniqueCondition($rows, $key_id,
|
||||
// No row returned
|
||||
if (! $rows[$key_id]) {
|
||||
unset($rows[$key_id], $where_clause_array[$key_id]);
|
||||
PMA_Response::getInstance()->addHtml(PMA_CommonFunctions::getInstance()->getMessage(
|
||||
__('MySQL returned an empty result set (i.e. zero rows).'),
|
||||
$local_query
|
||||
));
|
||||
PMA_Response::getInstance()->addHtml(
|
||||
PMA_CommonFunctions::getInstance()->getMessage(
|
||||
__('MySQL returned an empty result set (i.e. zero rows).'),
|
||||
$local_query
|
||||
)
|
||||
);
|
||||
/**
|
||||
* @todo not sure what should be done at this point, but we must not
|
||||
* exit if we want the message to be displayed
|
||||
|
||||
@ -460,8 +460,8 @@ function PMA_sqlQueryFormUpload()
|
||||
$files = PMA_getFileSelectOptions(
|
||||
$common_functions->userDir($GLOBALS['cfg']['UploadDir']), $matcher,
|
||||
(isset($timeout_passed) && $timeout_passed && isset($local_import_file))
|
||||
? $local_import_file
|
||||
: ''
|
||||
? $local_import_file
|
||||
: ''
|
||||
);
|
||||
} else {
|
||||
$files = '';
|
||||
|
||||
@ -127,14 +127,15 @@ if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
$mime_map = PMA_getMIME($db, $table);
|
||||
$available_mime = PMA_getAvailableMIMEtypes();
|
||||
|
||||
$hint = '<br />' .
|
||||
sprintf(
|
||||
__('For a list of available transformation options and their MIME'
|
||||
$hint = '<br />'
|
||||
. sprintf(
|
||||
__(
|
||||
'For a list of available transformation options and their MIME'
|
||||
. ' type transformations, click on %stransformation descriptions%s'
|
||||
),
|
||||
'<a href="transformation_overview.php?'
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. '" target="_blank">',
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
|
||||
@ -143,12 +144,15 @@ if ($cfgRelation['mimework'] && $cfg['BrowseMIME']) {
|
||||
$header_cells[] = __('Browser transformation');
|
||||
$header_cells[] = __('Transformation options')
|
||||
. $common_functions->showHint(
|
||||
__('Please enter the values for transformation options using this'
|
||||
__(
|
||||
'Please enter the values for transformation options using this'
|
||||
. ' format: \'a\', 100, b,\'c\'...<br />If you ever need to put'
|
||||
. ' a backslash ("\") or a single quote ("\'") amongst those'
|
||||
. ' values, precede it with a backslash (for example \'\\\\xyz\''
|
||||
. ' or \'a\\\'b\').'
|
||||
) . $hint);
|
||||
)
|
||||
. $hint
|
||||
);
|
||||
}
|
||||
|
||||
// workaround for field_fulltext, because its submitted indizes contain
|
||||
|
||||
@ -85,28 +85,17 @@ if (isset($_REQUEST['move_columns'])
|
||||
strtoupper($extracted_columnspec['type']),
|
||||
$extracted_columnspec['spec_in_brackets'],
|
||||
$extracted_columnspec['attribute'],
|
||||
isset($data['Collation'])
|
||||
? $data['Collation']
|
||||
: '',
|
||||
$data['Null'] === 'YES'
|
||||
? 'NULL'
|
||||
: 'NOT NULL',
|
||||
isset($data['Collation']) ? $data['Collation'] : '',
|
||||
$data['Null'] === 'YES' ? 'NULL' : 'NOT NULL',
|
||||
$default_type,
|
||||
$current_timestamp
|
||||
? ''
|
||||
: $data['Default'],
|
||||
isset($data['Extra']) && $data['Extra'] !== ''
|
||||
? $data['Extra']
|
||||
: false,
|
||||
$current_timestamp ? '' : $data['Default'],
|
||||
isset($data['Extra']) && $data['Extra'] !== '' ? $data['Extra'] : false,
|
||||
isset($data['Comments']) && $data['Comments'] !== ''
|
||||
? $data['Comments']
|
||||
: false,
|
||||
? $data['Comments'] : false,
|
||||
$we_dont_change_keys,
|
||||
$i,
|
||||
$i === 0
|
||||
? '-first'
|
||||
: $column_names[$i - 1]
|
||||
);
|
||||
$i === 0 ? '-first' : $column_names[$i - 1]
|
||||
);
|
||||
// update current column_names array, first delete old position
|
||||
for ($j = 0, $ll = count($column_names); $j < $ll; $j++) {
|
||||
if ($column_names[$j] == $column) {
|
||||
|
||||
@ -167,14 +167,18 @@ $foreigners = PMA_getForeigners($db, $table);
|
||||
|
||||
// Retrieve form parameters for insert/edit form
|
||||
$_form_params = PMA_getFormParametersForInsertForm(
|
||||
$db, $table, $where_clauses, $where_clause_array, $err_url);
|
||||
$db, $table, $where_clauses, $where_clause_array, $err_url
|
||||
);
|
||||
|
||||
/**
|
||||
* Displays the form
|
||||
*/
|
||||
// autocomplete feature of IE kills the "onchange" event handler and it
|
||||
// must be replaced by the "onpropertychange" one in this case
|
||||
$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5 && PMA_USR_BROWSER_VER < 7)
|
||||
$chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE'
|
||||
&& PMA_USR_BROWSER_VER >= 5
|
||||
&& PMA_USR_BROWSER_VER < 7
|
||||
)
|
||||
? 'onpropertychange'
|
||||
: 'onchange';
|
||||
// Had to put the URI because when hosted on an https server,
|
||||
@ -306,9 +310,14 @@ foreach ($rows as $row_id => $current_row) {
|
||||
$special_chars_encoded = '';
|
||||
if (isset($current_row)) {
|
||||
// (we are editing)
|
||||
list($real_null_value, $special_chars_encoded, $special_chars, $data, $backup_field)
|
||||
= PMA_getSpecialCharsAndBackupFieldForExistingRow($current_row, $column, $extracted_columnspec,
|
||||
$real_null_value, $gis_data_types, $column_name_appendix);
|
||||
list(
|
||||
$real_null_value, $special_chars_encoded, $special_chars,
|
||||
$data, $backup_field
|
||||
)
|
||||
= PMA_getSpecialCharsAndBackupFieldForExistingRow(
|
||||
$current_row, $column, $extracted_columnspec,
|
||||
$real_null_value, $gis_data_types, $column_name_appendix
|
||||
);
|
||||
} else {
|
||||
// (we are inserting)
|
||||
// display default values
|
||||
@ -325,16 +334,23 @@ foreach ($rows as $row_id => $current_row) {
|
||||
// The function column
|
||||
// -------------------
|
||||
if ($cfg['ShowFunctionFields']) {
|
||||
$html_output .= PMA_getFunctionColumn($column, $is_upload, $column_name_appendix,
|
||||
$html_output .= PMA_getFunctionColumn(
|
||||
$column, $is_upload, $column_name_appendix,
|
||||
$unnullify_trigger, $no_support_types, $tabindex_for_function,
|
||||
$tabindex, $idindex, $insert_mode);
|
||||
$tabindex, $idindex, $insert_mode
|
||||
);
|
||||
}
|
||||
|
||||
// The null column
|
||||
// ---------------
|
||||
$foreignData = PMA_getForeignData($foreigners, $column['Field'], false, '', '');
|
||||
$html_output .= PMA_getNullColumn($column, $column_name_appendix, $real_null_value,
|
||||
$tabindex, $tabindex_for_null, $idindex, $vkey, $foreigners, $foreignData);
|
||||
$foreignData = PMA_getForeignData(
|
||||
$foreigners, $column['Field'], false, '', ''
|
||||
);
|
||||
$html_output .= PMA_getNullColumn(
|
||||
$column, $column_name_appendix, $real_null_value,
|
||||
$tabindex, $tabindex_for_null, $idindex, $vkey, $foreigners,
|
||||
$foreignData
|
||||
);
|
||||
|
||||
// The value column (depends on type)
|
||||
// ----------------
|
||||
@ -355,7 +371,7 @@ foreach ($rows as $row_id => $current_row) {
|
||||
$no_support_types, $gis_data_types, $extracted_columnspec
|
||||
);
|
||||
|
||||
$html_output .= '</td>'
|
||||
$html_output .= '</td>'
|
||||
. '</tr>';
|
||||
|
||||
$odd_row = !$odd_row;
|
||||
@ -374,8 +390,10 @@ if (! isset($after_insert)) {
|
||||
}
|
||||
|
||||
//action panel
|
||||
$html_output .= PMA_getActionsPanel($where_clause, $after_insert, $tabindex,
|
||||
$tabindex_for_value, $found_unique_key);
|
||||
$html_output .= PMA_getActionsPanel(
|
||||
$where_clause, $after_insert, $tabindex,
|
||||
$tabindex_for_value, $found_unique_key
|
||||
);
|
||||
|
||||
if ($biggest_max_file_size > 0) {
|
||||
$html_output .= ' '
|
||||
|
||||
@ -207,8 +207,16 @@ if ($GLOBALS['is_ajax_request'] != true) {
|
||||
<strong>
|
||||
<label for="input_index_name">
|
||||
<?php echo __('Index name:'); ?>
|
||||
<?php echo PMA_CommonFunctions::getInstance()->showHint(PMA_Message::notice(__(
|
||||
'("PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!)'))); ?>
|
||||
<?php
|
||||
echo PMA_CommonFunctions::getInstance()->showHint(
|
||||
PMA_Message::notice(
|
||||
__(
|
||||
'("PRIMARY" <b>must</b> be the name of'
|
||||
. ' and <b>only of</b> a primary key!)'
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
</label>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
@ -201,8 +201,10 @@ foreach ($the_tables as $key => $table) {
|
||||
if ($have_rel) {
|
||||
echo ' <td>';
|
||||
if (isset($res_rel[$field_name])) {
|
||||
echo htmlspecialchars($res_rel[$field_name]['foreign_table']
|
||||
. ' -> ' . $res_rel[$field_name]['foreign_field']);
|
||||
echo htmlspecialchars(
|
||||
$res_rel[$field_name]['foreign_table']
|
||||
. ' -> ' . $res_rel[$field_name]['foreign_field']
|
||||
);
|
||||
}
|
||||
echo ' </td>' . "\n";
|
||||
}
|
||||
@ -217,8 +219,9 @@ foreach ($the_tables as $key => $table) {
|
||||
|
||||
echo ' <td>';
|
||||
if (isset($mime_map[$field_name])) {
|
||||
echo htmlspecialchars(str_replace('_', '/',
|
||||
$mime_map[$field_name]['mimetype']));
|
||||
echo htmlspecialchars(
|
||||
str_replace('_', '/', $mime_map[$field_name]['mimetype'])
|
||||
);
|
||||
}
|
||||
echo ' </td>' . "\n";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user