Permalink
Browse files

Merge branch 'master' of github.com:phpmyadmin/phpmyadmin

  • Loading branch information...
2 parents 2282e02 + 2187d7d commit 85edd5e841e2328d2cd384282d54c4c2100f2b2c @lem9 lem9 committed Apr 30, 2012
Showing with 311 additions and 161 deletions.
  1. +92 −89 tbl_row_action.php
  2. +10 −3 tbl_select.php
  3. +4 −1 tbl_sql.php
  4. +95 −26 tbl_structure.php
  5. +64 −25 tbl_tracking.php
  6. +16 −7 tbl_zoom_select.php
  7. +27 −9 transformation_wrapper.php
  8. +3 −1 url.php
View
@@ -26,7 +26,7 @@
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 @@
}
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;
}
}
?>
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
Oops, something went wrong.

0 comments on commit 85edd5e

Please sign in to comment.