Document some require/includes as phpdoc otherwise takes random block before to document it.

This commit is contained in:
Michal Čihař
2008-11-24 10:02:56 +00:00
parent 9561f56875
commit 37315b0c79
6 changed files with 55 additions and 25 deletions

View File

@@ -43,27 +43,27 @@ if (isset($_REQUEST['do_save_data'])) {
$field_cnt = count($_REQUEST['field_orig']);
$key_fields = array();
$changes = array();
for ($i = 0; $i < $field_cnt; $i++) {
$changes[] = 'CHANGE ' . PMA_Table::generateAlter(
$_REQUEST['field_orig'][$i],
$_REQUEST['field_orig'][$i],
$_REQUEST['field_name'][$i],
$_REQUEST['field_type'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_type'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_attribute'][$i],
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
: '',
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
: 'NOT NULL',
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_value'][$i],
isset($_REQUEST['field_extra'][$i])
? $_REQUEST['field_extra'][$i]
: false,
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
: '',
$key_fields,
$i,
@@ -75,7 +75,7 @@ if (isset($_REQUEST['do_save_data'])) {
$key_query = '';
/**
* this is a little bit more complex
*
*
* @todo if someone selects A_I when altering a column we need to check:
* - no other column with A_I
* - the column has an index, if not create one
@@ -90,7 +90,7 @@ if (isset($_REQUEST['do_save_data'])) {
$key_query = ', ADD KEY (' . implode(', ', $fields) . ') ';
}
*/
// To allow replication, we first select the db to use and then run queries
// on this db.
PMA_DBI_select_db($db) or PMA_mysqlDie(PMA_DBI_getError(), 'USE ' . PMA_backquote($db) . ';', '', $err_url);
@@ -103,7 +103,9 @@ if (isset($_REQUEST['do_save_data'])) {
$message->addParam($table);
$btnDrop = 'Fake';
// garvin: If comments were sent, enable relation stuff
/**
* If comments were sent, enable relation stuff
*/
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
@@ -111,7 +113,7 @@ if (isset($_REQUEST['do_save_data'])) {
if (isset($_REQUEST['field_orig']) && is_array($_REQUEST['field_orig'])) {
foreach ($_REQUEST['field_orig'] as $fieldindex => $fieldcontent) {
if ($_REQUEST['field_name'][$fieldindex] != $fieldcontent) {
PMA_REL_renameField($db, $table, $fieldcontent,
PMA_REL_renameField($db, $table, $fieldcontent,
$_REQUEST['field_name'][$fieldindex]);
}
}
@@ -119,14 +121,14 @@ if (isset($_REQUEST['do_save_data'])) {
// update mime types
if (isset($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& is_array($_REQUEST['field_mimetype'])
&& $cfg['BrowseMIME']) {
foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) {
if (isset($_REQUEST['field_name'][$fieldindex])
&& strlen($_REQUEST['field_name'][$fieldindex])) {
PMA_setMIME($db, $table, $_REQUEST['field_name'][$fieldindex],
$mimetype,
$_REQUEST['field_transformation'][$fieldindex],
PMA_setMIME($db, $table, $_REQUEST['field_name'][$fieldindex],
$mimetype,
$_REQUEST['field_transformation'][$fieldindex],
$_REQUEST['field_transformation_options'][$fieldindex]);
}
}
@@ -149,7 +151,7 @@ if (isset($_REQUEST['do_save_data'])) {
/**
* No modifications yet required -> displays the table fields
*
*
* $selected comes from multi_submits.inc.php
*/
if ($abort == false) {
@@ -194,6 +196,9 @@ if ($abort == false) {
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
}
/**
* Form for changing properties.
*/
require './libraries/tbl_properties.inc.php';
}