Move NumOperators to PMA_Types

This commit is contained in:
Michal Čihař 2012-04-26 10:02:30 +02:00
parent 89d1733200
commit 454493992e
4 changed files with 23 additions and 22 deletions

View File

@ -87,4 +87,25 @@ class PMA_Types
);
}
/**
* Number search operators
*
* @return array
*/
public function getNumberOperators() {
return array(
'=',
'>',
'>=',
'<',
'<=',
'!=',
'LIKE',
'NOT LIKE',
'IN (...)',
'NOT IN (...)',
'BETWEEN',
'NOT BETWEEN',
);
}
}

View File

@ -2859,26 +2859,6 @@ if ($cfg['ShowFunctionFields']) {
);
} // end if
/**
* Search operators
*
* @global array $cfg['NumOperators']
*/
$cfg['NumOperators'] = array(
'=',
'>',
'>=',
'<',
'<=',
'!=',
'LIKE',
'NOT LIKE',
'IN (...)',
'NOT IN (...)',
'BETWEEN',
'NOT BETWEEN',
);
/**
* Max rows retreived for zoom search
*/

View File

@ -154,7 +154,7 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2');
. htmlspecialchars($fc) . '</option>';
}
} else {
foreach ($GLOBALS['cfg']['NumOperators'] as $fc) {
foreach ($GLOBALS['PMA_Types']->getNumberOperators() as $fc) {
echo "\n" . ' '
. '<option value="' . htmlspecialchars($fc) . '">'
. htmlspecialchars($fc) . '</option>';

View File

@ -115,7 +115,7 @@ if (isset($_REQUEST['change_tbl_info']) && $_REQUEST['change_tbl_info'] == true)
. htmlspecialchars($fc) . '</option>';
}
} else {
foreach ($GLOBALS['cfg']['NumOperators'] as $fc) {
foreach ($GLOBALS['PMA_Types']->getNumberOperators() as $fc) {
$html .= "\n" . ' '
. '<option value="' . htmlspecialchars($fc) . '">'
. htmlspecialchars($fc) . '</option>';