From 2c5f033a0d3c02840ab99c15bacf4a7d4a1b7e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 13 Jan 2010 13:31:33 +0000 Subject: [PATCH] rfe #2816943 [interface] Add REGEXP ^...$ to select dialog. --- ChangeLog | 1 + libraries/config.default.php | 1 + tbl_select.php | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 478493a42..d82953076 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + rfe #2890226 [view] Enable VIEW rename + rfe #838637 [privileges] Export a user's privileges - [core] Updated mootools to fix some glitches with Safari. ++ rfe #2816943 [interface] Add REGEXP ^...$ to select dialog. 3.3.0.0 (not yet released) + rfe #2308632 [edit] Use hex for (var)binary fields, diff --git a/libraries/config.default.php b/libraries/config.default.php index f6d6f1b9c..da9ac99c4 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -2973,6 +2973,7 @@ $cfg['TextOperators'] = array( '=', '!=', 'REGEXP', + 'REGEXP ^...$', 'NOT REGEXP', "= ''", "!= ''" diff --git a/tbl_select.php b/tbl_select.php index f37d1a7e7..c49826b42 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -403,6 +403,10 @@ else { $func_type = 'LIKE'; $fields[$i] = '%' . $fields[$i] . '%'; } + if ($func_type == 'REGEXP ^...$') { + $func_type = 'REGEXP'; + $fields[$i] = '^' . $fields[$i] . '$'; + } $w[] = PMA_backquote($names[$i]) . ' ' . $func_type . ' ' . $quot . PMA_sqlAddslashes($fields[$i]) . $quot; } // end if