diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2012-04-30 21:56:09 +0400 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2012-04-30 21:56:09 +0400 |
commit | 90885321594e3a6b0bc563b13c18033af4387bf8 (patch) | |
tree | 2fba1586b269f156fa324718045dae13b408b554 /tbl_row_action.php | |
parent | 8243eace0f1bf6b22756ecada0f618b1c27a089f (diff) |
Fix indentation
Diffstat (limited to 'tbl_row_action.php')
-rw-r--r-- | tbl_row_action.php | 181 |
1 files changed, 92 insertions, 89 deletions
diff --git a/tbl_row_action.php b/tbl_row_action.php index 708009a83f..f4414a1a85 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -26,7 +26,7 @@ if (! PMA_isValid($_REQUEST['rows_to_delete'], 'array') if (isset($_REQUEST['submit_mult'])) { $submit_mult = $_REQUEST['submit_mult']; -// workaround for IE problem: + // workaround for IE problem: } elseif (isset($_REQUEST['submit_mult_delete_x'])) { $submit_mult = 'row_delete'; } elseif (isset($_REQUEST['submit_mult_change_x'])) { @@ -42,104 +42,107 @@ if (isset($_REQUEST['mult_btn'])) { } switch($submit_mult) { - case 'row_delete': - case 'row_edit': - case 'row_export': - // leave as is - break; +case 'row_delete': +case 'row_edit': +case 'row_export': + // leave as is + break; - case 'export': - $submit_mult = 'row_export'; - break; +case 'export': + $submit_mult = 'row_export'; + break; - case 'delete': - $submit_mult = 'row_delete'; - break; +case 'delete': + $submit_mult = 'row_delete'; + break; - default: - case 'edit': - $submit_mult = 'row_edit'; - break; +default: +case 'edit': + $submit_mult = 'row_edit'; + break; } if (!empty($submit_mult)) { switch($submit_mult) { - case 'row_edit': - // As we got the rows to be edited from the - // 'rows_to_delete' checkbox, we use the index of it as the - // indicating WHERE clause. Then we build the array which is used - // for the tbl_change.php script. - $where_clause = array(); - foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) { - $where_clause[] = urldecode($i_where_clause); - } - - $active_page = 'tbl_change.php'; - include 'tbl_change.php'; - break; - - case 'row_export': - // Needed to allow SQL export - $single_table = true; - - // As we got the rows to be exported from the - // 'rows_to_delete' checkbox, we use the index of it as the - // indicating WHERE clause. Then we build the array which is used - // for the tbl_change.php script. - $where_clause = array(); - foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) { - $where_clause[] = urldecode($i_where_clause); - } - - $active_page = 'tbl_export.php'; - include 'tbl_export.php'; - break; - - case 'row_delete': - default: - $action = 'tbl_row_action.php'; - $err_url = 'tbl_row_action.php' . PMA_generate_common_url($GLOBALS['url_params']); - if (! isset($_REQUEST['mult_btn'])) { - $original_sql_query = $sql_query; - if (! empty($url_query)) { - $original_url_query = $url_query; - } - } - include 'libraries/mult_submits.inc.php'; - $_url_params = $GLOBALS['url_params']; - $_url_params['goto'] = 'tbl_sql.php'; - $url_query = PMA_generate_common_url($_url_params); - - - /** - * Show result of multi submit operation - */ - // sql_query is not set when user does not confirm multi-delete - if ((!empty($submit_mult) || isset($_REQUEST['mult_btn'])) && ! empty($sql_query)) { - $disp_message = __('Your SQL query has been executed successfully'); - $disp_query = $sql_query; - } + case 'row_edit': + // As we got the rows to be edited from the + // 'rows_to_delete' checkbox, we use the index of it as the + // indicating WHERE clause. Then we build the array which is used + // for the tbl_change.php script. + $where_clause = array(); + foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) { + $where_clause[] = urldecode($i_where_clause); + } + + $active_page = 'tbl_change.php'; + include 'tbl_change.php'; + break; - if (isset($original_sql_query)) { - $sql_query = $original_sql_query; - } + case 'row_export': + // Needed to allow SQL export + $single_table = true; + + // As we got the rows to be exported from the + // 'rows_to_delete' checkbox, we use the index of it as the + // indicating WHERE clause. Then we build the array which is used + // for the tbl_change.php script. + $where_clause = array(); + foreach ($_REQUEST['rows_to_delete'] as $i => $i_where_clause) { + $where_clause[] = urldecode($i_where_clause); + } + + $active_page = 'tbl_export.php'; + include 'tbl_export.php'; + break; - if (isset($original_url_query)) { - $url_query = $original_url_query; + case 'row_delete': + default: + $action = 'tbl_row_action.php'; + $err_url = 'tbl_row_action.php' + . PMA_generate_common_url($GLOBALS['url_params']); + if (! isset($_REQUEST['mult_btn'])) { + $original_sql_query = $sql_query; + if (! empty($url_query)) { + $original_url_query = $url_query; } - - // this is because sql.php could call tbl_structure - // which would think it needs to call mult_submits.inc.php: - unset($submit_mult, $_REQUEST['mult_btn']); - - $active_page = 'sql.php'; - include 'sql.php'; - - /** - * Displays the footer - */ - include 'libraries/footer.inc.php'; - break; + } + include 'libraries/mult_submits.inc.php'; + $_url_params = $GLOBALS['url_params']; + $_url_params['goto'] = 'tbl_sql.php'; + $url_query = PMA_generate_common_url($_url_params); + + + /** + * Show result of multi submit operation + */ + // sql_query is not set when user does not confirm multi-delete + if ((! empty($submit_mult) || isset($_REQUEST['mult_btn'])) + && ! empty($sql_query) + ) { + $disp_message = __('Your SQL query has been executed successfully'); + $disp_query = $sql_query; + } + + if (isset($original_sql_query)) { + $sql_query = $original_sql_query; + } + + if (isset($original_url_query)) { + $url_query = $original_url_query; + } + + // this is because sql.php could call tbl_structure + // which would think it needs to call mult_submits.inc.php: + unset($submit_mult, $_REQUEST['mult_btn']); + + $active_page = 'sql.php'; + include 'sql.php'; + + /** + * Displays the footer + */ + include 'libraries/footer.inc.php'; + break; } } ?> |