Permalink
Browse files

Wrap some long lines

  • Loading branch information...
1 parent 8cad88e commit 8243eace0f1bf6b22756ecada0f618b1c27a089f @madhuracj madhuracj committed Apr 30, 2012
Showing with 219 additions and 72 deletions.
  1. +10 −3 tbl_select.php
  2. +4 −1 tbl_sql.php
  3. +95 −26 tbl_structure.php
  4. +64 −25 tbl_tracking.php
  5. +16 −7 tbl_zoom_select.php
  6. +27 −9 transformation_wrapper.php
  7. +3 −1 url.php
View
@@ -78,7 +78,8 @@
$err_url = $goto . '?' . PMA_generate_common_url($db, $table);
// Gets the list and number of fields
- list($fields_list, $fields_type, $fields_collation, $fields_null, $geom_column_present) = PMA_tbl_getFields($db, $table);
+ list($fields_list, $fields_type, $fields_collation, $fields_null, $geom_column_present)
+ = PMA_tbl_getFields($db, $table);
$fields_cnt = count($fields_list);
// retrieve keys into foreign fields, if any
@@ -155,7 +156,10 @@
$foreignData = PMA_getForeignData($foreigners, $field, false, '', '');
- echo PMA_getForeignFields_Values($foreigners, $foreignData, $field, $fields_type, $i, $db, $table, $titles, $GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true);
+ echo PMA_getForeignFields_Values(
+ $foreigners, $foreignData, $field, $fields_type, $i, $db, $table,
+ $titles, $GLOBALS['cfg']['ForeignKeyMaxLimit'], '', true
+ );
?>
<input type="hidden" name="names[<?php echo $i; ?>]"
@@ -280,7 +284,10 @@
$unaryFlag = $GLOBALS['PMA_Types']->isUnaryOperator($func_type);
$tmp_geom_func = isset($geom_func[$i]) ? $geom_func[$i] : null;
- $whereClause = PMA_tbl_search_getWhereClause($fields[$i], $names[$i], $types[$i], $collations[$i], $func_type, $unaryFlag, $tmp_geom_func);
+ $whereClause = PMA_tbl_search_getWhereClause(
+ $fields[$i], $names[$i], $types[$i], $collations[$i],
+ $func_type, $unaryFlag, $tmp_geom_func
+ );
if ($whereClause) {
$w[] = $whereClause;
View
@@ -41,7 +41,10 @@
/**
* Query box, bookmark, insert data from textfile
*/
-PMA_sqlQueryForm(true, false, isset($_REQUEST['delimiter']) ? htmlspecialchars($_REQUEST['delimiter']) : ';');
+PMA_sqlQueryForm(
+ true, false,
+ isset($_REQUEST['delimiter']) ? htmlspecialchars($_REQUEST['delimiter']) : ';'
+);
/**
* Displays the footer
View
@@ -260,7 +260,9 @@
$type = $row['Type'];
$extracted_columnspec = PMA_extractColumnSpec($row['Type']);
- if ('set' == $extracted_columnspec['type'] || 'enum' == $extracted_columnspec['type']) {
+ if ('set' == $extracted_columnspec['type']
+ || 'enum' == $extracted_columnspec['type']
+ ) {
$type_nowrap = '';
} else {
$type_nowrap = ' class="nowrap"';
@@ -271,13 +273,20 @@
}
$field_charset = '';
- if ($extracted_columnspec['can_contain_collation'] && ! empty($row['Collation'])) {
+ if ($extracted_columnspec['can_contain_collation']
+ && ! empty($row['Collation'])
+ ) {
$field_charset = $row['Collation'];
}
// Display basic mimetype [MIME]
- if ($cfgRelation['commwork'] && $cfgRelation['mimework'] && $cfg['BrowseMIME'] && isset($mime_map[$row['Field']]['mimetype'])) {
- $type_mime = '<br />MIME: ' . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
+ if ($cfgRelation['commwork']
+ && $cfgRelation['mimework']
+ && $cfg['BrowseMIME']
+ && isset($mime_map[$row['Field']]['mimetype'])
+ ) {
+ $type_mime = '<br />MIME: '
+ . str_replace('_', '/', $mime_map[$row['Field']]['mimetype']);
} else {
$type_mime = '';
}
@@ -293,7 +302,10 @@
// here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as having the
// NULL attribute, but SHOW CREATE TABLE says the contrary. Believe
// the latter.
- if (!empty($analyzed_sql[0]['create_table_fields'][$row['Field']]['type']) && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null']) {
+ if (! empty($analyzed_sql[0]['create_table_fields'][$row['Field']]['type'])
+ && $analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP'
+ && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null']
+ ) {
$row['Null'] = '';
}
@@ -313,7 +325,9 @@
// underline commented fields and display a hover-title (CSS only)
if (isset($comments_map[$row['Field']])) {
- $displayed_field_name = '<span class="commented_column" title="' . htmlspecialchars($comments_map[$row['Field']]) . '">' . $field_name . '</span>';
+ $displayed_field_name = '<span class="commented_column" title="'
+ . htmlspecialchars($comments_map[$row['Field']]) . '">'
+ . $field_name . '</span>';
}
if ($primary && $primary->hasColumn($field_name)) {
@@ -559,22 +573,50 @@
<i><?php echo __('With selected:'); ?></i>
<?php
-PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_browse', __('Browse'), 'b_browse.png', 'browse');
+PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_browse',
+ __('Browse'), 'b_browse.png', 'browse'
+);
if (! $tbl_is_view && ! $db_is_information_schema) {
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_change', __('Change'), 'b_edit.png', 'change');
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_drop', __('Drop'), 'b_drop.png', 'drop');
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_change',
+ __('Change'), 'b_edit.png', 'change'
+ );
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_drop',
+ __('Drop'), 'b_drop.png', 'drop'
+ );
if ('ARCHIVE' != $tbl_storage_engine) {
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_primary', __('Primary'), 'b_primary.png', 'primary');
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_unique', __('Unique'), 'b_unique.png', 'unique');
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_index', __('Index'), 'b_index.png', 'index');
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_primary',
+ __('Primary'), 'b_primary.png', 'primary'
+ );
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_unique',
+ __('Unique'), 'b_unique.png', 'unique'
+ );
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_index',
+ __('Index'), 'b_index.png', 'index'
+ );
}
if (! empty($tbl_storage_engine) && $tbl_storage_engine == 'MYISAM') {
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_spatial', __('Spatial'), 'b_spatial.png', 'spatial');
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_spatial',
+ __('Spatial'), 'b_spatial.png', 'spatial'
+ );
}
- if (! empty($tbl_storage_engine) && ($tbl_storage_engine == 'MYISAM' || $tbl_storage_engine == 'ARIA' || $tbl_storage_engine == 'MARIA')) {
- PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_fulltext', __('Fulltext'), 'b_ftext.png', 'ftext');
+ if (! empty($tbl_storage_engine)
+ && ($tbl_storage_engine == 'MYISAM'
+ || $tbl_storage_engine == 'ARIA'
+ || $tbl_storage_engine == 'MARIA')
+ ) {
+ PMA_buttonOrImage(
+ 'submit_mult', 'mult_submit', 'submit_mult_fulltext',
+ __('Fulltext'), 'b_ftext.png', 'ftext'
+ );
}
}
?>
@@ -697,7 +739,10 @@
* Displays indexes
*/
-if (! $tbl_is_view && ! $db_is_information_schema && 'ARCHIVE' != $tbl_storage_engine) {
+if (! $tbl_is_view
+ && ! $db_is_information_schema
+ && 'ARCHIVE' != $tbl_storage_engine
+) {
PMA_generate_slider_effect('indexes', __('Indexes'));
/**
* Display indexes
@@ -730,12 +775,16 @@
if ($cfg['ShowStats']) {
echo '<div id="tablestatistics">';
if (empty($showtable)) {
- $showtable = PMA_Table::sGetStatusInfo($GLOBALS['db'], $GLOBALS['table'], null, true);
+ $showtable = PMA_Table::sGetStatusInfo(
+ $GLOBALS['db'], $GLOBALS['table'], null, true
+ );
}
$nonisam = false;
$is_innodb = (isset($showtable['Type']) && $showtable['Type'] == 'InnoDB');
- if (isset($showtable['Type']) && !preg_match('@ISAM|HEAP@i', $showtable['Type'])) {
+ if (isset($showtable['Type'])
+ && ! preg_match('@ISAM|HEAP@i', $showtable['Type'])
+ ) {
$nonisam = true;
}
@@ -746,20 +795,40 @@
// this is to display for example 261.2 MiB instead of 268k KiB
$max_digits = 3;
$decimals = 1;
- list($data_size, $data_unit) = PMA_formatByteDown($showtable['Data_length'], $max_digits, $decimals);
+ list($data_size, $data_unit) = PMA_formatByteDown(
+ $showtable['Data_length'], $max_digits, $decimals
+ );
if ($mergetable == false) {
- list($index_size, $index_unit) = PMA_formatByteDown($showtable['Index_length'], $max_digits, $decimals);
+ list($index_size, $index_unit) = PMA_formatByteDown(
+ $showtable['Index_length'], $max_digits, $decimals
+ );
}
// InnoDB returns a huge value in Data_free, do not use it
- if (! $is_innodb && isset($showtable['Data_free']) && $showtable['Data_free'] > 0) {
- list($free_size, $free_unit) = PMA_formatByteDown($showtable['Data_free'], $max_digits, $decimals);
- list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free'], $max_digits, $decimals);
+ if (! $is_innodb
+ && isset($showtable['Data_free'])
+ && $showtable['Data_free'] > 0
+ ) {
+ list($free_size, $free_unit) = PMA_formatByteDown(
+ $showtable['Data_free'], $max_digits, $decimals
+ );
+ list($effect_size, $effect_unit) = PMA_formatByteDown(
+ $showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free'],
+ $max_digits, $decimals
+ );
} else {
- list($effect_size, $effect_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'], $max_digits, $decimals);
+ list($effect_size, $effect_unit) = PMA_formatByteDown(
+ $showtable['Data_length'] + $showtable['Index_length'],
+ $max_digits, $decimals
+ );
}
- list($tot_size, $tot_unit) = PMA_formatByteDown($showtable['Data_length'] + $showtable['Index_length'], $max_digits, $decimals);
+ list($tot_size, $tot_unit) = PMA_formatByteDown(
+ $showtable['Data_length'] + $showtable['Index_length'],
+ $max_digits, $decimals
+ );
if ($table_info_num_rows > 0) {
- list($avg_size, $avg_unit) = PMA_formatByteDown(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1);
+ list($avg_size, $avg_unit) = PMA_formatByteDown(
+ ($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1
+ );
}
// Displays them
Oops, something went wrong.

0 comments on commit 8243eac

Please sign in to comment.