Skip to content

Commit

Permalink
BUGID: 702
Browse files Browse the repository at this point in the history
ADD Searchfield
ADD $s_search (to be translated!)

Descript: Added Searchfield in the filter form, you can now search the entire bug db. (inkl. bugid  and description)

Credits: Code from Alan Knowles, modified by Ludwig Ruderstaller (global table names, search the bugid field too)


git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@304 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
rufinus committed Jul 17, 2001
1 parent 21ceae6 commit c2e447b
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 8 deletions.
1 change: 1 addition & 0 deletions strings_chinese_traditional.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "�w��s";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_dutch.txt
Expand Up @@ -579,6 +579,7 @@
$s_updated = "Ge-updated";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_english.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "Updated";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_french.txt
Expand Up @@ -579,6 +579,7 @@
$s_updated = "Mis � jour";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_french2.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "Mis à jour";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_german.txt
Expand Up @@ -579,6 +579,7 @@
$s_updated = "aktualisiert";

# view_all_inc.php
$s_search ="Suche";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_italian.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "Aggiornato";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_korean.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "���� ����";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_norwegian.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "Oppdatert";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_portuguese.txt
Expand Up @@ -578,6 +578,7 @@
$s_updated = "Atualizado";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
3 changes: 2 additions & 1 deletion strings_spanish.txt
Expand Up @@ -578,8 +578,9 @@
$s_updated = "Actualizado";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3
# view_user_reported_bug_page.php3

# view_all_unassign_bug_page.php3

Expand Down
1 change: 1 addition & 0 deletions strings_turkish.txt
Expand Up @@ -577,6 +577,7 @@
$s_updated = "Son G�ncelleme";

# view_all_inc.php
$s_search ="Search";

# view_user_reported_bug_page.php3

Expand Down
19 changes: 17 additions & 2 deletions view_all_assign_bug_page.php3
Expand Up @@ -9,7 +9,11 @@
<?
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !isset( $f_hide_closed ) ) {
if(!isset($f_search_text)){
$f_search_text=false;
}

if ( !isset( $f_hide_closed ) ) {
$f_hide_closed = "";
}

Expand Down Expand Up @@ -99,7 +103,18 @@
$t_where_clause = $t_where_clause." AND status='$f_show_status'";
}

$query = $query.$t_where_clause;
### Simple Text Search - Thx to Alan Knowles
if ($f_search_text) {
$t_where_clause .= " AND ((summary LIKE '%".addslashes($f_search_text)."%')
OR (description LIKE '%".addslashes($f_search_text)."%')
OR (steps_to_reproduce LIKE '%".addslashes($f_search_text)."%')
OR (additional_information LIKE '%".addslashes($f_search_text)."%')
OR ($g_mantis_bug_table.id LIKE '%".addslashes($f_search_text)."%'))
AND $g_mantis_bug_text_table.id = $g_mantis_bug_table.id";
$query .= ", $g_mantis_bug_text_table " . $t_where_clause;
} else {
$query = $query.$t_where_clause;
}

if ( !isset( $f_sort ) ) {
$f_sort="last_updated";
Expand Down
22 changes: 20 additions & 2 deletions view_all_bug_page.php3
Expand Up @@ -9,7 +9,11 @@
<?
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !isset( $f_hide_closed ) ) {
if(!isset($f_search_text)){
$f_search_text=false;
}

if ( !isset( $f_hide_closed ) ) {
$f_hide_closed = "";
}

Expand Down Expand Up @@ -93,7 +97,21 @@
$t_where_clause = $t_where_clause." AND status='$f_show_status'";
}

$query = $query.$t_where_clause;
### Simple Text Search - Thx to Alan Knowles
if ($f_search_text) {
$t_where_clause .= " AND ((summary LIKE '%".addslashes($f_search_text)."%')
OR (description LIKE '%".addslashes($f_search_text)."%')
OR (steps_to_reproduce LIKE '%".addslashes($f_search_text)."%')
OR (additional_information LIKE '%".addslashes($f_search_text)."%')
OR ($g_mantis_bug_table.id LIKE '%".addslashes($f_search_text)."%'))
AND $g_mantis_bug_text_table.id = $g_mantis_bug_table.id";
$query .= ", $g_mantis_bug_text_table " . $t_where_clause;
} else {
$query = $query.$t_where_clause;
}




if ( !isset( $f_sort ) ) {
$f_sort="last_updated";
Expand Down
6 changes: 6 additions & 0 deletions view_all_inc.php
Expand Up @@ -4,6 +4,9 @@
<td bgcolor="<? echo $g_white_color ?>">
<table width="100%">
<tr align="center">
<td>
<span class="smallcaption"><? echo $s_search; ?></span>
</td>
<? if ( $page_type=="reported" ) { ?>
<td>
<span class="smallcaption"><? echo $s_reporter ?></span>
Expand Down Expand Up @@ -39,6 +42,9 @@
<form method="post" action="<? echo $link_page ?>">
<input type="hidden" name="f_offset" value="0">
<input type="hidden" name="f_save" value="1">
<td>
<input type="text" name="f_search_text" value="<? echo $f_search_text; ?>">
</td>
<? ### view mode specific options ?>
<? if ( $page_type=="all" ) { ?>
<? ### do nothing ?>
Expand Down
17 changes: 16 additions & 1 deletion view_all_report_bug_page.php3
Expand Up @@ -9,6 +9,10 @@
<?
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if(!isset($f_search_text)){
$f_search_text=false;
}

if ( !isset( $f_hide_closed ) ) {
$f_hide_closed = "";
}
Expand Down Expand Up @@ -99,7 +103,18 @@
$t_where_clause = $t_where_clause." AND status='$f_show_status'";
}

$query = $query.$t_where_clause;
### Simple Text Search - Thx to Alan Knowles
if ($f_search_text) {
$t_where_clause .= " AND ((summary LIKE '%".addslashes($f_search_text)."%')
OR (description LIKE '%".addslashes($f_search_text)."%')
OR (steps_to_reproduce LIKE '%".addslashes($f_search_text)."%')
OR (additional_information LIKE '%".addslashes($f_search_text)."%')
OR ($g_mantis_bug_table.id LIKE '%".addslashes($f_search_text)."%'))
AND $g_mantis_bug_text_table.id = $g_mantis_bug_table.id";
$query .= ", $g_mantis_bug_text_table " . $t_where_clause;
} else {
$query = $query.$t_where_clause;
}

if ( !isset( $f_sort ) ) {
$f_sort="last_updated";
Expand Down
19 changes: 17 additions & 2 deletions view_all_unassign_bug_pg.php3
Expand Up @@ -9,7 +9,11 @@
<?
db_connect( $g_hostname, $g_db_username, $g_db_password, $g_database_name );

if ( !isset( $f_hide_closed ) ) {
if(!isset($f_search_text)){
$f_search_text=false;
}

if ( !isset( $f_hide_closed ) ) {
$f_hide_closed = "";
}

Expand Down Expand Up @@ -92,7 +96,18 @@
$t_where_clause = $t_where_clause." AND status='$f_show_status'";
}

$query = $query.$t_where_clause;
### Simple Text Search - Thx to Alan Knowles
if ($f_search_text) {
$t_where_clause .= " AND ((summary LIKE '%".addslashes($f_search_text)."%')
OR (description LIKE '%".addslashes($f_search_text)."%')
OR (steps_to_reproduce LIKE '%".addslashes($f_search_text)."%')
OR (additional_information LIKE '%".addslashes($f_search_text)."%')
OR ($g_mantis_bug_table.id LIKE '%".addslashes($f_search_text)."%'))
AND $g_mantis_bug_text_table.id = $g_mantis_bug_table.id";
$query .= ", $g_mantis_bug_text_table " . $t_where_clause;
} else {
$query = $query.$t_where_clause;
}

if ( !isset( $f_sort ) ) {
$f_sort="last_updated";
Expand Down

0 comments on commit c2e447b

Please sign in to comment.