Move NullOperators to PMA_Types
This commit is contained in:
parent
d5fba335e1
commit
1ad90fde1c
@ -38,4 +38,16 @@ class PMA_Types
|
||||
public function isUnaryOperator($op) {
|
||||
return in_array($op, $this->getUnaryOperators());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns list of operators checking for NULL.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getNullOperators() {
|
||||
return array(
|
||||
'IS NULL',
|
||||
'IS NOT NULL',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2921,16 +2921,6 @@ $cfg['SetOperators'] = array(
|
||||
'NOT IN',
|
||||
);
|
||||
|
||||
/**
|
||||
* Search operators
|
||||
*
|
||||
* @global array $cfg['NullOperators']
|
||||
*/
|
||||
$cfg['NullOperators'] = array(
|
||||
'IS NULL',
|
||||
'IS NOT NULL',
|
||||
);
|
||||
|
||||
/**
|
||||
* Max rows retreived for zoom search
|
||||
*/
|
||||
|
||||
@ -161,7 +161,7 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2');
|
||||
}
|
||||
} // end if... else...
|
||||
if ($fields_null[$i]) {
|
||||
foreach ($GLOBALS['cfg']['NullOperators'] as $fc) {
|
||||
foreach ($GLOBALS['PMA_Types']->getNullOperators() as $fc) {
|
||||
echo "\n" . ' '
|
||||
. '<option value="' . htmlspecialchars($fc) . '">'
|
||||
. htmlspecialchars($fc) . '</option>';
|
||||
|
||||
@ -123,7 +123,7 @@ if (isset($_REQUEST['change_tbl_info']) && $_REQUEST['change_tbl_info'] == true)
|
||||
} // end if... else...
|
||||
|
||||
if ($fields_null[$key]) {
|
||||
foreach ($GLOBALS['cfg']['NullOperators'] as $fc) {
|
||||
foreach ($GLOBALS['PMA_Types']->getNullOperators() as $fc) {
|
||||
$html .= "\n" . ' '
|
||||
. '<option value="' . htmlspecialchars($fc) . '">'
|
||||
. htmlspecialchars($fc) . '</option>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user