Skip to content

Commit

Permalink
Adjust code to changes in #12372
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Nov 10, 2016
1 parent 32a381d commit 0884055
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libraries/Util.php
Expand Up @@ -4064,7 +4064,7 @@ public static function getFunctionsForField($field, $insert_mode, $foreignData)
$functions = $GLOBALS['PMA_Types']->getFunctions($field['True_Type']);
foreach ($functions as $function) {
$retval .= '<option';
if ($foreignData['foreign_link'] !== false && $default_function === $function) {
if (isset($foreignData['foreign_link']) && $foreignData['foreign_link'] !== false && $default_function === $function) {
$retval .= ' selected="selected"';
}
$retval .= '>' . $function . '</option>' . "\n";
Expand Down
2 changes: 1 addition & 1 deletion libraries/rte/rte_routines.lib.php
Expand Up @@ -1650,7 +1650,7 @@ function PMA_RTN_getExecuteForm($routine)
);
$retval .= "<select name='funcs["
. $routine['item_param_name'][$i] . "]'>";
$retval .= PMA\libraries\Util::getFunctionsForField($field, false);
$retval .= PMA\libraries\Util::getFunctionsForField($field, false, array());
$retval .= "</select>";
}
$retval .= "</td>\n";
Expand Down
14 changes: 7 additions & 7 deletions test/libraries/PMA_insert_edit_test.php
Expand Up @@ -562,7 +562,7 @@ public function testGetFunctionColumn()
$this->assertContains(
'<td class="center">Binary</td>',
PMA_getFunctionColumn(
$column, false, '', '', array(), 0, 0, 0, false, false
$column, false, '', '', array(), 0, 0, 0, false, false, array()
)
);

Expand All @@ -571,7 +571,7 @@ public function testGetFunctionColumn()
$this->assertContains(
'<td class="center">Binary</td>',
PMA_getFunctionColumn(
$column, true, '', '', array(), 0, 0, 0, false, false
$column, true, '', '', array(), 0, 0, 0, false, false, array()
)
);

Expand All @@ -580,7 +580,7 @@ public function testGetFunctionColumn()
$this->assertContains(
'<td class="center">Binary</td>',
PMA_getFunctionColumn(
$column, true, '', '', array(), 0, 0, 0, false, false
$column, true, '', '', array(), 0, 0, 0, false, false, array()
)
);

Expand All @@ -589,15 +589,15 @@ public function testGetFunctionColumn()
$this->assertContains(
'<td class="center">--</td>',
PMA_getFunctionColumn(
$column, true, '', '', array(), 0, 0, 0, false, false
$column, true, '', '', array(), 0, 0, 0, false, false, array()
)
);

$column['True_Type'] = 'set';
$this->assertContains(
'<td class="center">--</td>',
PMA_getFunctionColumn(
$column, true, '', '', array(), 0, 0, 0, false, false
$column, true, '', '', array(), 0, 0, 0, false, false, array()
)
);

Expand All @@ -606,7 +606,7 @@ public function testGetFunctionColumn()
$this->assertContains(
'<td class="center">--</td>',
PMA_getFunctionColumn(
$column, true, '', '', array('int'), 0, 0, 0, false, false
$column, true, '', '', array('int'), 0, 0, 0, false, false, array()
)
);

Expand All @@ -615,7 +615,7 @@ public function testGetFunctionColumn()
$this->assertContains(
'<select name="funcsa" b tabindex="5" id="field_3_1"',
PMA_getFunctionColumn(
$column, true, 'a', 'b', array(), 2, 3, 3, false, false
$column, true, 'a', 'b', array(), 2, 3, 3, false, false, array()
)
);
}
Expand Down

0 comments on commit 0884055

Please sign in to comment.