Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@suse.cz>2012-04-26 12:14:25 +0400
committerMichal Čihař <mcihar@suse.cz>2012-04-26 12:14:25 +0400
commit13bd089c62daf27596098576e08ee845723f52be (patch)
tree4a753ab02679f9aade8f14d5888b8d40028aa680 /tbl_select.php
parent454493992efa3aaf69836c07cf6835dd2d6785d7 (diff)
Centralize generating of operators list
Diffstat (limited to 'tbl_select.php')
-rw-r--r--tbl_select.php30
1 files changed, 4 insertions, 26 deletions
diff --git a/tbl_select.php b/tbl_select.php
index 5940fb117a..e395c83933 100644
--- a/tbl_select.php
+++ b/tbl_select.php
@@ -141,32 +141,10 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2');
<td><?php echo $fields_collation[$i]; ?></td>
<td><select name="func[]">
<?php
- if (strncasecmp($fields_type[$i], 'enum', 4) == 0) {
- foreach ($GLOBALS['PMA_Types']->getEnumOperators() as $fc) {
- echo "\n" . ' '
- . '<option value="' . htmlspecialchars($fc) . '">'
- . htmlspecialchars($fc) . '</option>';
- }
- } elseif (preg_match('@char|blob|text|set@i', $fields_type[$i])) {
- foreach ($GLOBALS['PMA_Types']->getTextOperators() as $fc) {
- echo "\n" . ' '
- . '<option value="' . htmlspecialchars($fc) . '">'
- . htmlspecialchars($fc) . '</option>';
- }
- } else {
- foreach ($GLOBALS['PMA_Types']->getNumberOperators() as $fc) {
- echo "\n" . ' '
- . '<option value="' . htmlspecialchars($fc) . '">'
- . htmlspecialchars($fc) . '</option>';
- }
- } // end if... else...
- if ($fields_null[$i]) {
- foreach ($GLOBALS['PMA_Types']->getNullOperators() as $fc) {
- echo "\n" . ' '
- . '<option value="' . htmlspecialchars($fc) . '">'
- . htmlspecialchars($fc) . '</option>';
- }
- }
+ echo $GLOBALS['PMA_Types']->getTypeOperatorsHtml(
+ $fields_type[$i],
+ $fields_null[$i]
+ );
?>
</select>