]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
fix for 65396:
authorcyeh%bluemartini.com <>
Fri, 16 Feb 2001 09:22:38 +0000 (09:22 +0000)
committercyeh%bluemartini.com <>
Fri, 16 Feb 2001 09:22:38 +0000 (09:22 +0000)
Remember This Query should give option to add to page footer
patch submitted by st.n@gmx.net (Stephan Niemz)

buglist.cgi
query.cgi

index 375296466511762a481b1cd070b47695a7310e6c..00a8040e00db1f7a3b5b6b5be1a40d9d5586428d 100755 (executable)
@@ -730,13 +730,15 @@ individual query.
         }
         $::buffer =~ s/[\&\?]cmdtype=[a-z]+//;
         my $qname = SqlQuote($name);
+       my $tofooter= ( $::FORM{'tofooter'} ? 1 : 0 );
         SendSQL("SELECT query FROM namedqueries " .
                 "WHERE userid = $userid AND name = $qname");
         if (!FetchOneColumn()) {
-            SendSQL("REPLACE INTO namedqueries (userid, name, query) " .
-                    "VALUES ($userid, $qname, " . SqlQuote($::buffer) . ")");
+            SendSQL("REPLACE INTO namedqueries (userid, name, query, linkinfooter) " .
+                    "VALUES ($userid, $qname, ". SqlQuote($::buffer) .", ". $tofooter .")");
         } else {
-            SendSQL("UPDATE namedqueries SET query = " . SqlQuote($::buffer) .
+            SendSQL("UPDATE namedqueries SET query = " . SqlQuote($::buffer) . "," .
+                   " linkinfooter = " . $tofooter .
                     " WHERE userid = $userid AND name = $qname");
         }
         PutHeader("OK, query saved.");
@@ -838,7 +840,7 @@ if ($dotweak) {
     confirm_login();
     if (!UserInGroup("editbugs")) {
         print qq{
-Sorry; you do not have sufficient priviledges to edit a bunch of bugs
+Sorry; you do not have sufficient privileges to edit a bunch of bugs
 at once.
 };
         PutFooter();
index 65a4cb29a808aa5b7ddaffd628031b6de1ab11b8..032739d6d21ed8064e6a3f9354d45cf794b613bd 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -887,19 +887,21 @@ if (!$userid) {
 </tr></table>};
     }
 
-    print "
+    print qq{
 <INPUT TYPE=radio NAME=cmdtype VALUE=asdefault> Remember this as the default query
 <BR>
 <INPUT TYPE=radio NAME=cmdtype VALUE=asnamed> Remember this query, and name it:
 <INPUT TYPE=text NAME=newqueryname>
+<br>&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE="checkbox" NAME="tofooter" VALUE="1">
+    and put it in my page footer.
 <BR>
-"
+    };
 }
 
-print "
+print qq{
 <NOBR><B>Sort By:</B>
 <SELECT NAME=\"order\">
-";
+};
 
 my $deforder = "'Importance'";
 my @orders = ('Bug Number', $deforder, 'Assignee');