~ubuntu-branches/ubuntu/lucid/phpmyadmin/lucid

« back to all changes in this revision

Viewing changes to libraries/tbl_properties.inc.php

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2009-06-30 14:05:13 UTC
  • mfrom: (1.2.1 upstream) (36.1.2 karmic)
  • Revision ID: james.westby@ubuntu.com-20090630140513-hz71do3sij2jhm4s
* New upstream version fixing XSS (PMASA-2009-5).
* Document no empty password in README.Debian and the shipped sample
  configuration file (LP: #388703).
* Install service file for avahi (if web service enabled and if avahi is
  installed) (LP: #369244).
* Mention protecting of setup if not using provided configuration snippets
  for webservers.
* Call ucf with --debconf-ok in postrm (Closes: #534894).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Display form for changing/adding table fields/columns
5
5
 *
6
6
 * included by tbl_addfield.php, -_alter.php, -_create.php
7
 
 * @version $Id: tbl_properties.inc.php 12212 2009-01-24 17:32:16Z lem9 $
 
7
 * @version $Id: tbl_properties.inc.php 12284 2009-03-03 16:41:41Z nijel $
 
8
 * @package phpMyAdmin
8
9
 */
9
10
if (! defined('PHPMYADMIN')) {
10
11
    exit;
95
96
 
96
97
$header_cells[] = $strField;
97
98
$header_cells[] = $strType
98
 
     . ($GLOBALS['cfg']['ReplaceHelpImg'] 
99
 
        ? PMA_showMySQLDocu('SQL-Syntax', 'data-types') 
 
99
     . ($GLOBALS['cfg']['ReplaceHelpImg']
 
100
        ? PMA_showMySQLDocu('SQL-Syntax', 'data-types')
100
101
        : '<br /><span style="font-weight: normal">' . PMA_showMySQLDocu('SQL-Syntax', 'data-types')
101
102
     . '</span>');
102
103
$header_cells[] = $strLengthSet . PMA_showHint($strSetEnumVal);
139
140
 
140
141
    $header_cells[] = $strMIME_MIMEtype;
141
142
    $header_cells[] = $strMIME_transformation;
142
 
    $header_cells[] = $strMIME_transformation_options 
 
143
    $header_cells[] = $strMIME_transformation_options
143
144
        . PMA_showHint($strMIME_transformation_options_note . $hint);
144
145
}
145
146
 
174
175
            $row['Key'] = '';
175
176
        }
176
177
 
177
 
        // put None in the drop-down for Default, when someone adds a field 
 
178
        // put None in the drop-down for Default, when someone adds a field
178
179
        $row['DefaultType']  = (isset($_REQUEST['field_default_type'][$i]) ? $_REQUEST['field_default_type'][$i] : 'NONE');
179
180
        $row['DefaultValue'] = (isset($_REQUEST['field_default_value'][$i]) ? $_REQUEST['field_default_value'][$i] : '');
180
181
 
190
191
                $row['Default'] = $row['DefaultType'];
191
192
                break;
192
193
        }
193
 
        
 
194
 
194
195
        $row['Extra']     = (isset($_REQUEST['field_extra'][$i]) ? $_REQUEST['field_extra'][$i] : false);
195
196
        $row['Comment']   = (isset($submit_fulltext[$i]) && ($submit_fulltext[$i] == $i) ? 'FULLTEXT' : false);
196
197
 
268
269
        . ' value="' . (isset($row['Field']) ? htmlspecialchars($row['Field']) : '') . '"'
269
270
        . ' />';
270
271
    $ci++;
271
 
    
 
272
 
272
273
    // column type
273
274
    $content_cells[$i][$ci] = '<select name="field_type[' . $i . ']"'
274
275
        .' id="field_' . $i . '_' . ($ci - $ci_offset) . '" >';
374
375
 
375
376
    // old column default
376
377
    if ($is_backup) {
377
 
        $_form_params['field_default_orig[' . $i . ']'] = 
378
 
            (isset($row['Default']) ? $row['Default'] : ''); 
 
378
        $_form_params['field_default_orig[' . $i . ']'] =
 
379
            (isset($row['Default']) ? $row['Default'] : '');
379
380
    }
380
 
    
 
381
 
381
382
    // here we put 'NONE' as the default value of drop-down; otherwise
382
383
    // users would have problems if they forget to enter the default
383
384
    // value (example, for an INT)
384
385
    $default_options = array(
385
 
        'NONE'              =>  $strNone,
 
386
        'NONE'              =>  $strNoneDefault,
386
387
        'USER_DEFINED'      =>  $strAsDefined,
387
388
        'NULL'              => 'NULL',
388
389
        'CURRENT_TIMESTAMP' => 'CURRENT_TIMESTAMP',
415
416
    // column collation
416
417
    $tmp_collation          = empty($row['Collation']) ? null : $row['Collation'];
417
418
    $content_cells[$i][$ci] = PMA_generateCharsetDropdownBox(
418
 
        PMA_CSDROPDOWN_COLLATION, 'field_collation[' . $i . ']', 
 
419
        PMA_CSDROPDOWN_COLLATION, 'field_collation[' . $i . ']',
419
420
        'field_' . $i . '_' . ($ci - $ci_offset), $tmp_collation, false);
420
421
    unset($tmp_collation);
421
422
    $ci++;
730
731
    </tr>
731
732
    <tr>
732
733
        <td>
733
 
            <textarea name="partition_definition" id="partitiondefinition" 
734
 
                cols="<?php echo $GLOBALS['cfg']['TextareaCols'];?>" 
735
 
                rows="<?php echo $GLOBALS['cfg']['TextareaRows'];?>" 
 
734
            <textarea name="partition_definition" id="partitiondefinition"
 
735
                cols="<?php echo $GLOBALS['cfg']['TextareaCols'];?>"
 
736
                rows="<?php echo $GLOBALS['cfg']['TextareaRows'];?>"
736
737
                dir="<?php echo $GLOBALS['text_dir'];?>"><?php echo (isset($_REQUEST['partition_definition']) ? htmlspecialchars($_REQUEST['partition_definition']) : ''); ?></textarea>
737
738
        </td>
738
739
    </tr>
746
747
?>
747
748
 
748
749
<fieldset class="tblFooters">
749
 
    <input type="submit" name="do_save_data" value="<?php echo $strSave; ?>" 
 
750
    <input type="submit" name="do_save_data" value="<?php echo $strSave; ?>"
750
751
        onclick="return checkTableEditForm(this.form, <?php echo $num_fields; ?>)" />
751
752
<?php if ($action == 'tbl_create.php' || $action == 'tbl_addfield.php') { ?>
752
753
    <?php echo $GLOBALS['strOr']; ?>