Skip to content

Commit

Permalink
Remove dead code
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information
lem9 committed Dec 23, 2014
1 parent e3d11ad commit 371780a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
5 changes: 2 additions & 3 deletions libraries/Table.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ static public function sGetStatusInfo($db, $table, $info = null,
*
* @param string $name name
* @param string $type type ('INT', 'VARCHAR', 'BIT', ...)
* @param string $index index
* @param string $length length ('2', '5,2', '', ...)
* @param string $attribute attribute
* @param string $collation collation
Expand All @@ -429,7 +428,7 @@ static public function sGetStatusInfo($db, $table, $info = null,
*
* @return string field specification
*/
static function generateFieldSpec($name, $type, $index, $length = '',
static function generateFieldSpec($name, $type, $length = '',
$attribute = '', $collation = '', $null = false,
$default_type = 'USER_DEFINED', $default_value = '', $extra = '',
$comment = '', &$field_primary = null, $move_to = ''
Expand Down Expand Up @@ -645,7 +644,7 @@ static public function generateAlter($oldcol, $newcol, $type, $length,
) {
return PMA_Util::backquote($oldcol) . ' '
. PMA_Table::generateFieldSpec(
$newcol, $type, $index, $length, $attribute,
$newcol, $type, $length, $attribute,
$collation, $null, $default_type, $default_value, $extra,
$comment, $field_primary, $move_to
);
Expand Down
2 changes: 1 addition & 1 deletion libraries/Tracker.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ static public function handleQuery($query)
. PMA_Util::sqlAddSlashes($result['tablename']) . "' " .
" AND `version` = '" . PMA_Util::sqlAddSlashes($version) . "' ";

$result = PMA_queryAsControlUser($sql_query);
PMA_queryAsControlUser($sql_query);
}
}
}
Expand Down
1 change: 0 additions & 1 deletion libraries/create_addfield.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function PMA_buildColumnCreationStatement(
PMA_Table::generateFieldSpec(
trim($_REQUEST['field_name'][$i]),
$_REQUEST['field_type'][$i],
$i,
$_REQUEST['field_length'][$i],
$_REQUEST['field_attribute'][$i],
isset($_REQUEST['field_collation'][$i])
Expand Down
1 change: 0 additions & 1 deletion libraries/url_generating.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ function PMA_URL_getArgSeparator($encode = 'none')
switch ($encode) {
case 'html':
return $html_separator;
break;
case 'text' :
case 'none' :
default :
Expand Down
13 changes: 6 additions & 7 deletions test/classes/PMA_Table_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,6 @@ public function testGenerateFieldSpec()
//type is BIT
$name = "PMA_name";
$type = "BIT";
$index = "PMA_index";
$length = '12';
$attribute = 'PMA_attribute';
$collation = 'PMA_collation';
Expand All @@ -483,7 +482,7 @@ public function testGenerateFieldSpec()
$move_to = '-first';

$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand All @@ -496,7 +495,7 @@ public function testGenerateFieldSpec()
//type is DOUBLE
$type = "DOUBLE";
$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand All @@ -509,7 +508,7 @@ public function testGenerateFieldSpec()
//type is BOOLEAN
$type = "BOOLEAN";
$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand All @@ -522,7 +521,7 @@ public function testGenerateFieldSpec()
//$default_type is NULL
$default_type = 'NULL';
$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand All @@ -535,7 +534,7 @@ public function testGenerateFieldSpec()
//$default_type is CURRENT_TIMESTAMP
$default_type = 'CURRENT_TIMESTAMP';
$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand All @@ -550,7 +549,7 @@ public function testGenerateFieldSpec()
$extra = 'INCREMENT';
$move_to = '-first';
$query = PMA_Table::generateFieldSpec(
$name, $type, $index, $length, $attribute, $collation,
$name, $type, $length, $attribute, $collation,
$null, $default_type, $default_value, $extra, $comment,
$field_primary, $move_to
);
Expand Down

0 comments on commit 371780a

Please sign in to comment.