From ddf4372ae05c3a22d92cd91fb5bde171f166b490 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 10 Apr 2010 17:12:01 -0700 Subject: [PATCH] Greater / less than table data search operators --- mysql/CHANGELOG | 2 ++ mysql/lang/en | 2 ++ mysql/view-lib.pl | 5 ++++- mysql/view_table.cgi | 2 +- postgresql/CHANGELOG | 2 ++ postgresql/lang/en | 2 ++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mysql/CHANGELOG b/mysql/CHANGELOG index e5ec3adf4..e79d337e2 100644 --- a/mysql/CHANGELOG +++ b/mysql/CHANGELOG @@ -92,3 +92,5 @@ The information_schema database is no longer included when backing up all databa Added a collation order field to the database creation form. Added an option to the backup form to do backup in a single transaction, for InnoDB tables. The default MySQL table type can now be set on the MySQL Server Configuration page. +---- Changes since 1.510 ---- +Added greater than / less than selectors to the table data search form. diff --git a/mysql/lang/en b/mysql/lang/en index de78ae41f..033f9fee4 100644 --- a/mysql/lang/en +++ b/mysql/lang/en @@ -194,6 +194,8 @@ view_match0=contains view_match1=matches view_match2=doesn't contain view_match3=doesn't match +view_match4=greater than +view_match5=less than view_searchok=Search view_searchhead=Search results for $1 in field $2 .. view_searchhead2=Advanced search results on $1 fields .. diff --git a/mysql/view-lib.pl b/mysql/view-lib.pl index 6fd6fa792..6b2c623b4 100755 --- a/mysql/view-lib.pl +++ b/mysql/view-lib.pl @@ -86,7 +86,10 @@ local $qu = $module_name eq "mysql" ? '"' : "'"; return $match == 0 ? "like $qu%$for%$qu" : $match == 1 ? "like $qu$for$qu" : $match == 2 ? "not like $qu%$for%$qu" : - $match == 3 ? "not like $qu$for$qu" : " = \"\""; + $match == 3 ? "not like $qu$for$qu" : + $match == 4 ? "> $for" : + $match == 5 ? "< $for" : + " = \"\""; } 1; diff --git a/mysql/view_table.cgi b/mysql/view_table.cgi index b09f8878e..4f9ea3acf 100755 --- a/mysql/view_table.cgi +++ b/mysql/view_table.cgi @@ -437,7 +437,7 @@ if (!$in{'field'} && $total > $displayconfig{'perpage'}) { $sel = &ui_select("field", undef, [ map { [ $_->{'field'}, $_->{'field'} ] } @str ]); $match = &ui_select("match", 0, - [ map { [ $_, $text{'view_match'.$_} ] } (0.. 3) ]); + [ map { [ $_, $text{'view_match'.$_} ] } (0.. 5) ]); print "",&text('view_search2', "", $sel, $match); print "  ", diff --git a/postgresql/CHANGELOG b/postgresql/CHANGELOG index 1b635af39..ce13a7557 100644 --- a/postgresql/CHANGELOG +++ b/postgresql/CHANGELOG @@ -69,3 +69,5 @@ Improve support for PostgreSQL 8.3 on Ubuntu 8.04. ---- Changes since 1.440 ---- Re-wrote the entire user interface to use Webmin's new UI library, for a more consistent and themable look. Added a history of previous commands to the Execute SQL page. +---- Changes since 1.510 ---- +Added greater than / less than selectors to the table data search form. diff --git a/postgresql/lang/en b/postgresql/lang/en index cabd8a62d..8ecf1bbf1 100644 --- a/postgresql/lang/en +++ b/postgresql/lang/en @@ -185,6 +185,8 @@ view_match0=contains view_match1=matches view_match2=doesn't contain view_match3=doesn't match +view_match4=greater than +view_match5=less than view_searchok=Search view_searchhead=Search results for $1 in field $2 .. view_searchhead2=Advanced search results on $1 fields ..