Added comments

This commit is contained in:
lorilee
2010-08-14 15:14:45 -07:00
parent c424dbee38
commit 8fa03264e4
4 changed files with 18 additions and 7 deletions

View File

@@ -52,6 +52,7 @@ if (!empty($selected_tbl) && empty($table_select)) {
$table_select = $selected_tbl; $table_select = $selected_tbl;
} }
// Check if the selected tables are defined in $_GET (from clicking Back button on export.php)
if(isset($_GET['table_select'])) { if(isset($_GET['table_select'])) {
$_GET['table_select'] = urldecode($_GET['table_select']); $_GET['table_select'] = urldecode($_GET['table_select']);
$_GET['table_select'] = explode(",", $_GET['table_select']); $_GET['table_select'] = explode(",", $_GET['table_select']);

View File

@@ -1,6 +1,14 @@
<?php <?php
require_once './libraries/common.inc.php';
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Displays a form for editing ENUM and SET values with more space (as an alternative to doing it in tbl_alter.php)
* This form is only for users with JavaScript disabled -- users with JavaScript enabled will see a different form
* defined in tbl_properties.inc.php
* @package phpMyAdmin
*/
require_once './libraries/common.inc.php';
require_once './libraries/header_http.inc.php'; require_once './libraries/header_http.inc.php';
require_once './libraries/header_meta_style.inc.php'; require_once './libraries/header_meta_style.inc.php';
?> ?>
@@ -15,16 +23,16 @@ require_once './libraries/header_meta_style.inc.php';
<div id="values"> <div id="values">
<?php <?php
$values = ''; $values = '';
if (isset($_GET['values'])) { if (isset($_GET['values'])) { // This page was displayed when the "add a new value" link or the link in tbl_alter.php was clicked
$values = urldecode($_GET['values']); $values = urldecode($_GET['values']);
} elseif (isset($_GET['num_fields'])) { } elseif (isset($_GET['num_fields'])) { // This page was displayed from submitting this form
for($field_num = 1; $field_num <= $_GET['num_fields']; $field_num++) { for($field_num = 1; $field_num <= $_GET['num_fields']; $field_num++) {
$values .= $_GET['field' . $field_num] . ","; $values .= $_GET['field' . $field_num] . ",";
} }
} }
// Display the values in text fields, excluding empty strings
$field_counter = 0; $field_counter = 0;
$stripped_values = array(); $stripped_values = array(); // The values to display in the output
foreach(split(",", $values) as $value) { foreach(split(",", $values) as $value) {
if(trim($value) != "") { if(trim($value) != "") {
$field_counter++; $field_counter++;
@@ -34,7 +42,7 @@ require_once './libraries/header_meta_style.inc.php';
} }
$total_fields = $field_counter; $total_fields = $field_counter;
// If extra fields are added, display them // If extra empty fields are added, display them
if(isset($_GET['extra_fields'])) { if(isset($_GET['extra_fields'])) {
$total_fields += $_GET['extra_fields']; $total_fields += $_GET['extra_fields'];
for($i = $field_counter+1; $i <= $total_fields; $i++) { for($i = $field_counter+1; $i <= $total_fields; $i++) {

View File

@@ -36,6 +36,7 @@ if (empty($export_list)) {
require './libraries/footer.inc.php'; require './libraries/footer.inc.php';
} }
// If the form data is being loaded from GET data, decode it
foreach($_GET as $name => $value) { foreach($_GET as $name => $value) {
if(is_string($value)) { if(is_string($value)) {
$_GET[urldecode($name)] = urldecode($value); $_GET[urldecode($name)] = urldecode($value);

View File

@@ -30,6 +30,7 @@ $multi_values .= '<a href="' . $checkall_url . '&amp;selectall=1" onclick="setSe
$multi_values .= '<select name="db_select[]" id="db_select" size="10" multiple="multiple">'; $multi_values .= '<select name="db_select[]" id="db_select" size="10" multiple="multiple">';
$multi_values .= "\n"; $multi_values .= "\n";
// Check if the selected databases are defined in $_GET (from clicking Back button on export.php)
if(isset($_GET['db_select'])) { if(isset($_GET['db_select'])) {
$_GET['db_select'] = urldecode($_GET['db_select']); $_GET['db_select'] = urldecode($_GET['db_select']);
$_GET['db_select'] = explode(",", $_GET['db_select']); $_GET['db_select'] = explode(",", $_GET['db_select']);