help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: Prevent 'number' from appearing twice in Gnatsweb Query Results


From: Yngve Svendsen
Subject: PATCH: Prevent 'number' from appearing twice in Gnatsweb Query Results
Date: Thu, 05 Apr 2001 02:32:22 +0200

The following patch provides a workaround for the problem which causes the Number column to appear twice in the Query Results table.

Yngve Svendsen
IS Engineer
Clustra AS, Trondheim, Norway
address@hidden


2001-04-05  Yngve Svendsen  <address@hidden>

        * gnatsweb.pl (query_page): Shift 'number' out of the array of
          selectable column names (@fieldnames) to prevent user from
          selecting it. That would cause the 'number' column to be
          repeated twice, since NUMBER_FIELD is explicitly added to the
          search format in submitquery. The best solution would be to
          remove the explicit addition, but that messes up column sorting.
          However, since the only drawback of the current fix is that we
          force the inclusion of PR numbers in the query results listing,
          this doesn't seem to matter much.



Index: gnatsweb.pl
===================================================================
RCS file: /cvs/gnats/gnats/contrib/gnatsweb/gnatsweb.pl,v
retrieving revision 2.32
diff -u -p -r2.32 gnatsweb.pl
--- gnatsweb.pl 2001/04/04 23:06:09     2.32
+++ gnatsweb.pl 2001/04/05 00:16:51
@@ -1378,6 +1378,13 @@ sub query_page
         "</td>\n</tr>\n",
        "<tr valign=top>\n<td>Column Display:</td>\n<td>";

+  # 30/Mar/2001 yngves
+  # The 'number' field is always first in the @fieldnames array.
+  # If users were allowed to select it in this list, the PR number
+  # would appear twice in the Query Results table. We prevent this
+  # by shifting 'number' out of the array.
+  shift(@fieldnames);
+
   my @lcfields;
   foreach (@fieldnames)
   {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]