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

« back to all changes in this revision

Viewing changes to tbl_create.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:
31
31
 * @uses    strlen()
32
32
 * @uses    sprintf()
33
33
 * @uses    htmlspecialchars()
34
 
 * @version $Id: tbl_create.php 12094 2008-12-07 13:33:26Z lem9 $
 
34
 * @version $Id: tbl_create.php 12157 2008-12-25 14:33:16Z lem9 $
 
35
 * @package phpMyAdmin
35
36
 */
36
37
 
37
38
/**
99
100
            }
100
101
        } // end if
101
102
    } // end for
102
 
    
 
103
 
103
104
    // Builds the fields creation statements
104
105
    for ($i = 0; $i < $field_cnt; $i++) {
105
106
        // '0' is also empty for php :-(
108
109
        }
109
110
 
110
111
        $query = PMA_Table::generateFieldSpec(
111
 
            $_REQUEST['field_name'][$i], 
 
112
            $_REQUEST['field_name'][$i],
112
113
            $_REQUEST['field_type'][$i],
113
 
            $_REQUEST['field_length'][$i], 
 
114
            $_REQUEST['field_length'][$i],
114
115
            $_REQUEST['field_attribute'][$i],
115
 
            isset($_REQUEST['field_collation'][$i]) 
116
 
                ? $_REQUEST['field_collation'][$i] 
 
116
            isset($_REQUEST['field_collation'][$i])
 
117
                ? $_REQUEST['field_collation'][$i]
117
118
                : '',
118
 
            isset($_REQUEST['field_null'][$i]) 
119
 
                ? $_REQUEST['field_null'][$i] 
 
119
            isset($_REQUEST['field_null'][$i])
 
120
                ? $_REQUEST['field_null'][$i]
120
121
                : 'NOT NULL',
121
 
            $_REQUEST['field_default_type'][$i], 
 
122
            $_REQUEST['field_default_type'][$i],
122
123
            $_REQUEST['field_default_value'][$i],
123
124
            isset($_REQUEST['field_extra'][$i])
124
125
                ? $_REQUEST['field_extra'][$i]
125
126
                : false,
126
 
            isset($_REQUEST['field_comments'][$i]) 
127
 
                ? $_REQUEST['field_comments'][$i] 
 
127
            isset($_REQUEST['field_comments'][$i])
 
128
                ? $_REQUEST['field_comments'][$i]
128
129
                : '',
129
 
            $field_primary, 
 
130
            $field_primary,
130
131
            $i);
131
132
 
132
133
        $query .= ', ';
247
248
        $display_query = $sql_query;
248
249
        $sql_query = '';
249
250
 
 
251
        // read table info on this newly created table, in case
 
252
        // the next page is Structure
 
253
        $reread_info = true;
 
254
        require './libraries/tbl_info.inc.php';
 
255
 
250
256
        // do not switch to sql.php - as there is no row to be displayed on a new table
251
257
        if ($cfg['DefaultTabTable'] === 'sql.php') {
252
258
            require './tbl_structure.php';