diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 8d82192cc9..0584f3d64d 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -3717,6 +3717,13 @@ function PMA_getFunctionsForField($field, $insert_mode)
$dropdown_built[$each_dropdown] = true;
$op_spacing_needed = true;
}
+
+ // Create separator before all functions list
+ if ($op_spacing_needed) {
+ $retval .= ' ';
+ $retval .= '' . "\n";
+ }
+
// For compatibility's sake, do not let out all other functions. Instead
// print a separator (blank) and then show ALL functions which weren't
// shown yet.
@@ -3729,11 +3736,6 @@ function PMA_getFunctionsForField($field, $insert_mode)
|| (! $field['first_timestamp'] && $functions[$j] == $default_function)
? ' selected="selected"'
: '';
- if ($op_spacing_needed == true) {
- $retval .= ' ';
- $retval .= '' . "\n";
- $op_spacing_needed = false;
- }
$retval .= ' ';
$retval .= '