Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Ann + J.M <phpMyAdmin@ZweiSteinSoft.de>
  • Loading branch information
ZweiSteinSoft committed Jun 4, 2014
1 parent 1ca50ed commit fea0fe0
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 20 deletions.
15 changes: 10 additions & 5 deletions libraries/TableSearch.class.php
Expand Up @@ -923,8 +923,10 @@ public function getColumnProperties($search_index, $column_index)
? $_POST['criteriaColumnOperators'][$search_index] : '');
$entered_value = (isset($_POST['criteriaValues'])
? $_POST['criteriaValues'] : '');
$titles['Browse'] = PMA_Util::getIcon(
'b_browse.png', __('Browse foreign values')
$titles = array(
'Browse' => PMA_Util::getIcon(
'b_browse.png', __('Browse foreign values')
)
);
//Gets column's type and collation
$type = $this->_columnTypes[$column_index];
Expand Down Expand Up @@ -1015,6 +1017,7 @@ private function _getRowsZoom()
{
$odd_row = true;
$html_output = '';
$type = $collation = $func = $value = array();
/**
* Get already set search criteria (if any)
*/
Expand Down Expand Up @@ -1243,9 +1246,11 @@ public function getSelectionForm($goto, $dataLabel = null)
public function getZoomResultsForm($goto, $data)
{
$html_output = '';
$titles['Browse'] = PMA_Util::getIcon(
'b_browse.png',
__('Browse foreign values')
$titles = array(
'Browse' => PMA_Util::getIcon(
'b_browse.png',
__('Browse foreign values')
)
);
$html_output .= '<form method="post" action="tbl_zoom_select.php"'
. ' name="displayResultForm" id="zoom_display_form"'
Expand Down
1 change: 1 addition & 0 deletions libraries/replication_gui.lib.php
Expand Up @@ -943,6 +943,7 @@ function PMA_handleControlRequest()
*/
function PMA_handleRequestForSlaveChangeMaster()
{
$sr = array();
$_SESSION['replication']['m_username'] = $sr['username']
= PMA_Util::sqlAddSlashes($_REQUEST['username']);
$_SESSION['replication']['m_password'] = $sr['pma_pw']
Expand Down
1 change: 1 addition & 0 deletions libraries/schema/Pdf_Relation_Schema.class.php
Expand Up @@ -1427,6 +1427,7 @@ public function dataDictionaryDoc($alltables)
? str_replace('_', '/', $mime_map[$field_name]['mimetype'])
: '')
);
$links = array();
$links[0] = $pdf->PMA_links['RT'][$table][$field_name];
if (isset($res_rel[$field_name]['foreign_table'])
&& isset($res_rel[$field_name]['foreign_field'])
Expand Down
4 changes: 3 additions & 1 deletion libraries/server_status.lib.php
Expand Up @@ -511,7 +511,9 @@ function PMA_getHtmlForServerProcessItem($process, $odd_row, $show_full_sql)
}
}

$url_params['kill'] = $process['Id'];
$url_params = array(
'kill' => $process['Id']
);
$kill_process = 'server_status.php' . PMA_URL_getCommon($url_params);

$retval = '<tr class="' . ($odd_row ? 'odd' : 'even') . '">';
Expand Down
12 changes: 12 additions & 0 deletions libraries/sqlparser.lib.php
Expand Up @@ -1313,6 +1313,9 @@ function PMA_SQP_analyze($arr)
// setting the alias)
$alias_for_select_expr = $identifier;
} else {
if (! isset($chain)) {
$chain = array();
}
$chain[] = $identifier;
$previous_was_identifier = true;

Expand All @@ -1325,6 +1328,9 @@ function PMA_SQP_analyze($arr)
// save it for later
$alias_for_table_ref = $identifier;
} else {
if (! isset($chain)) {
$chain = array();
}
$chain[] = $identifier;
$previous_was_identifier = true;

Expand Down Expand Up @@ -2053,6 +2059,9 @@ function PMA_SQP_analyze($arr)
$upper_data = strtoupper($arr[$i]['data']);

if ($upper_data == 'NOT' && $in_timestamp_options) {
if (! isset($create_table_fields)) {
$create_table_fields = array();
}
$create_table_fields[$current_identifier]['timestamp_not_null']
= true;

Expand Down Expand Up @@ -2150,6 +2159,9 @@ function PMA_SQP_analyze($arr)
$value = '';
}
if (!empty($value)) {
if (! isset($foreign)) {
$foreign = array();
}
$foreign[$foreign_key_number][$clause] = $value;
}
unset($clause);
Expand Down
21 changes: 13 additions & 8 deletions libraries/structure.lib.php
Expand Up @@ -180,10 +180,12 @@ function PMA_getHtmlBodyForTableSummary($num_tables, $server_slave_status,
$row_count_sum = PMA_Util::formatNumber($sum_entries, 0);
// If a table shows approximate rows count, display update-all-real-count anchor.
if (isset($approx_rows)) {
$row_sum_url['ajax_request'] = true;
$row_sum_url['db'] = $GLOBALS['db'];
$row_sum_url['real_row_count'] = 'true';
$row_sum_url['real_row_count_all'] = 'true';
$row_sum_url = array(
'ajax_request' => true,
'db' => $GLOBALS['db'],
'real_row_count' => 'true',
'real_row_count_all' => 'true'
);
}
$cell_text = ($approx_rows)
? '<a href="db_structure.php' . PMA_URL_getCommon($row_sum_url)
Expand Down Expand Up @@ -702,10 +704,12 @@ function PMA_getHtmlForNotNullEngineViewTable($table_is_view, $current_table,
$row_count = $row_count_pre
. PMA_Util::formatNumber($current_table['TABLE_ROWS'], 0);
// URL parameters to fetch the real row count.
$real_count_url['ajax_request'] = true;
$real_count_url['db'] = $GLOBALS['db'];
$real_count_url['table'] = $current_table['TABLE_NAME'];
$real_count_url['real_row_count'] = 'true';
$real_count_url = array(
'ajax_request' => true,
'db' => $GLOBALS['db'],
'table' => $current_table['TABLE_NAME'],
'real_row_count' => 'true'
);
// Content to be appended into 'tbl_rows' cell.
// If row count is approximate, display it as an anchor to get real count.
$cell_text = (! empty($row_count_pre))
Expand Down Expand Up @@ -2344,6 +2348,7 @@ function PMA_displayHtmlForColumnChange($db, $table, $selected, $action)
/**
* @todo optimize in case of multiple fields to modify
*/
$fields_meta = array();
for ($i = 0; $i < $selected_cnt; $i++) {
$fields_meta[] = $GLOBALS['dbi']->getColumns(
$db, $table, $selected[$i], true
Expand Down
1 change: 1 addition & 0 deletions libraries/sysinfo.lib.php
Expand Up @@ -351,6 +351,7 @@ public function supported()
public function memory()
{
$pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
$mem = array();
$mem['MemTotal']
= $this->_kstat('unix:0:system_pages:pagestotal') * $pagesize;
$mem['MemUsed']
Expand Down
5 changes: 3 additions & 2 deletions libraries/tbl_columns_definition_form.lib.php
Expand Up @@ -366,6 +366,7 @@ function PMA_getMoveColumns($db, $table)
*/
function PMA_getRowDataForRegeneration($columnNumber, $submit_fulltext)
{
$columnMeta = array();
$columnMeta['Field'] = isset($_REQUEST['field_name'][$columnNumber])
? $_REQUEST['field_name'][$columnNumber]
: false;
Expand Down Expand Up @@ -512,7 +513,7 @@ function PMA_handleRegeneration($columnNumber, $submit_fulltext, $comments_map,
}

/**
* Function to update default value info in $columnMeta and get this array
* Function to update default value info in $columnMeta and get this array
*
* @param array $columnMeta column meta
* @param bool $isDefault whether the row value is default
Expand Down Expand Up @@ -1296,7 +1297,7 @@ function PMA_getHtmlForColumnAttributes($columnNumber, $columnMeta, $type_upper,
* @param array $form_params form parameters
* @param int $columnNumber column/field number
* @param string $type type in lowercase without the length
* @param array $extracted_columnspec details about the column spec
* @param array $extracted_columnspec details about the column spec
*
* @return array
*/
Expand Down
5 changes: 1 addition & 4 deletions libraries/tbl_relation.lib.php
Expand Up @@ -204,10 +204,7 @@ function PMA_getHtmlForCommonForm($db, $table, $columns, $cfgRelation,
function PMA_getHtmlForCommonFormRows($columns, $cfgRelation, $tbl_storage_engine,
$existrel, $existrel_foreign, $options_array, $db, $table
) {
foreach ($columns as $row) {
$save_row[] = $row;
}

$save_row = array_values($columns);
$saved_row_cnt = count($save_row);

$html_output = '<fieldset>'
Expand Down

0 comments on commit fea0fe0

Please sign in to comment.