Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Feryanto <aris_feryanto@yahoo.com>2011-08-10 18:49:23 +0400
committerAris Feryanto <aris_feryanto@yahoo.com>2011-08-10 18:49:23 +0400
commite65fc63e71496e338e549e14b1c3a958566c1277 (patch)
tree7234d1c4d56997c62157f65e200d5fe9b35ce7f0 /sql.php
parenta9cd487f0f48ab9b070823545860f384cfb8a4e0 (diff)
Incomplete inline edit feature removal
Diffstat (limited to 'sql.php')
-rw-r--r--sql.php113
1 files changed, 0 insertions, 113 deletions
diff --git a/sql.php b/sql.php
index 9b733ccce4..a379e6e1f2 100644
--- a/sql.php
+++ b/sql.php
@@ -694,119 +694,6 @@ if (0 == $num_rows || $is_affected) {
}
if ($GLOBALS['is_ajax_request'] == true) {
-
- /**
- * If we are in grid editing, we need to process the relational and
- * transformed fields, if they were edited. After that, output the correct
- * link/transformed value and exit
- *
- * Logic taken from libraries/display_tbl.lib.php
- */
-
- if (isset($_REQUEST['rel_fields_list']) && $_REQUEST['rel_fields_list'] != '') {
- //handle relations work here for updated row.
- require_once './libraries/relation.lib.php';
-
- $map = PMA_getForeigners($db, $table, '', 'both');
-
- $rel_fields = array();
- parse_str($_REQUEST['rel_fields_list'], $rel_fields);
-
- foreach ( $rel_fields as $rel_field => $rel_field_value) {
-
- $where_comparison = "='" . $rel_field_value . "'";
- $display_field = PMA_getDisplayField($map[$rel_field]['foreign_db'], $map[$rel_field]['foreign_table']);
-
- // Field to display from the foreign table?
- if (isset($display_field) && strlen($display_field)) {
- $dispsql = 'SELECT ' . PMA_backquote($display_field)
- . ' FROM ' . PMA_backquote($map[$rel_field]['foreign_db'])
- . '.' . PMA_backquote($map[$rel_field]['foreign_table'])
- . ' WHERE ' . PMA_backquote($map[$rel_field]['foreign_field'])
- . $where_comparison;
- $dispresult = PMA_DBI_try_query($dispsql, null, PMA_DBI_QUERY_STORE);
- if ($dispresult && PMA_DBI_num_rows($dispresult) > 0) {
- list($dispval) = PMA_DBI_fetch_row($dispresult, 0);
- } else {
- //$dispval = __('Link not found');
- }
- @PMA_DBI_free_result($dispresult);
- } else {
- $dispval = '';
- } // end if... else...
-
- if ('K' == $_SESSION['tmp_user_values']['relational_display']) {
- // user chose "relational key" in the display options, so
- // the title contains the display field
- $title = (! empty($dispval))? ' title="' . htmlspecialchars($dispval) . '"' : '';
- } else {
- $title = ' title="' . htmlspecialchars($rel_field_value) . '"';
- }
-
- $_url_params = array(
- 'db' => $map[$rel_field]['foreign_db'],
- 'table' => $map[$rel_field]['foreign_table'],
- 'pos' => '0',
- 'sql_query' => 'SELECT * FROM '
- . PMA_backquote($map[$rel_field]['foreign_db']) . '.' . PMA_backquote($map[$rel_field]['foreign_table'])
- . ' WHERE ' . PMA_backquote($map[$rel_field]['foreign_field'])
- . $where_comparison
- );
- $output = '<a href="sql.php' . PMA_generate_common_url($_url_params) . '"' . $title . '>';
-
- if ('D' == $_SESSION['tmp_user_values']['relational_display']) {
- // user chose "relational display field" in the
- // display options, so show display field in the cell
- $output .= (!empty($dispval)) ? htmlspecialchars($dispval) : '';
- } else {
- // otherwise display data in the cell
- $output .= htmlspecialchars($rel_field_value);
- }
- $output .= '</a>';
- $extra_data['relations'][$rel_field] = $output;
- }
- }
-
- if (isset($_REQUEST['do_transformations']) && $_REQUEST['do_transformations'] == true ) {
- require_once './libraries/transformations.lib.php';
- //if some posted fields need to be transformed, generate them here.
- $mime_map = PMA_getMIME($db, $table);
-
- if ($mime_map === false) {
- $mime_map = array();
- }
-
- $edited_values = array();
- parse_str($_REQUEST['transform_fields_list'], $edited_values);
-
- foreach($mime_map as $transformation) {
- $include_file = PMA_securePath($transformation['transformation']);
- $column_name = $transformation['column_name'];
- $column_data = $edited_values[$column_name];
-
- $_url_params = array(
- 'db' => $db,
- 'table' => $table,
- 'where_clause' => $_REQUEST['where_clause'],
- 'transform_key' => $column_name,
- );
-
- if (file_exists('./libraries/transformations/' . $include_file)) {
- $transformfunction_name = str_replace('.inc.php', '', $transformation['transformation']);
-
- require_once './libraries/transformations/' . $include_file;
-
- if (function_exists('PMA_transformation_' . $transformfunction_name)) {
- $transform_function = 'PMA_transformation_' . $transformfunction_name;
- $transform_options = PMA_transformation_getOptions((isset($transformation['transformation_options']) ? $transformation['transformation_options'] : ''));
- $transform_options['wrapper_link'] = PMA_generate_common_url($_url_params);
- }
- }
-
- $extra_data['transformations'][$column_name] = $transform_function($column_data, $transform_options);
- }
- }
-
if ($cfg['ShowSQL']) {
$extra_data['sql_query'] = PMA_showMessage($message, $GLOBALS['sql_query'], 'success');
}