Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
88d99924
Commit
88d99924
authored
Feb 05, 2000
by
terry%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The "put this named query in the footer" feature was choking if the
name of the query had a space in it.
parent
8b725463
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
userprefs.cgi
userprefs.cgi
+24
-8
No files found.
userprefs.cgi
View file @
88d99924
...
@@ -20,7 +20,12 @@ use strict;
...
@@ -20,7 +20,12 @@ use strict;
require
"CGI.pl"
;
require
"CGI.pl"
;
# Shut up misguided -w warnings about "used only once". "use vars" just
# doesn't work for me.
sub
sillyness
{
my
$zz
;
$zz
=
$::defaultqueryname
;
}
my
$userid
;
my
$userid
;
...
@@ -154,21 +159,24 @@ sub ShowFooter {
...
@@ -154,21 +159,24 @@ sub ShowFooter {
EmitEntry
(
"The 'My bugs' link at the footer of each page"
,
$entry
);
EmitEntry
(
"The 'My bugs' link at the footer of each page"
,
$entry
);
SendSQL
(
"SELECT name, linkinfooter FROM namedqueries "
.
SendSQL
(
"SELECT name, linkinfooter FROM namedqueries "
.
"WHERE userid = $userid"
);
"WHERE userid = $userid"
);
my
$
found
=
0
;
my
$
count
=
0
;
while
(
MoreSQLData
())
{
while
(
MoreSQLData
())
{
my
(
$name
,
$linkinfooter
)
=
(
FetchSQLData
());
my
(
$name
,
$linkinfooter
)
=
(
FetchSQLData
());
if
(
$name
eq
$::defaultqueryname
)
{
if
(
$name
eq
$::defaultqueryname
)
{
next
;
next
;
}
}
$found
=
1
;
my
$entry
=
my
$entry
=
BuildPulldown
(
"query-
"
.
value_quote
(
$name
)
,
BuildPulldown
(
"query-
$count"
,
[[
"0"
,
"should only appear in the query page"
],
[[
"0"
,
"should only appear in the query page"
],
[
"1"
,
"should appear on the footer of every page"
]],
[
"1"
,
"should appear on the footer of every page"
]],
$linkinfooter
);
$linkinfooter
);
EmitEntry
(
"Your query named '$name'"
,
$entry
);
EmitEntry
(
"Your query named '$name'"
,
$entry
);
my
$q
=
value_quote
(
$name
);
print
qq{<INPUT TYPE=HIDDEN NAME="name-$count" VALUE="$q">\n}
;
$count
++
;
}
}
if
(
!
$found
)
{
print
qq{<INPUT TYPE=HIDDEN NAME="numqueries" VALUE="$count">\n}
;
if
(
!
$count
)
{
print
qq{
print
qq{
<TR><TD COLSPAN="2">
<TR><TD COLSPAN="2">
If you go create remembered queries in the <A HREF="query.cgi">query page</A>,
If you go create remembered queries in the <A HREF="query.cgi">query page</A>,
...
@@ -187,14 +195,18 @@ sub SaveFooter {
...
@@ -187,14 +195,18 @@ sub SaveFooter {
my
(
$name
,
$linkinfooter
)
=
(
FetchSQLData
());
my
(
$name
,
$linkinfooter
)
=
(
FetchSQLData
());
$old
{
$name
}
=
$linkinfooter
;
$old
{
$name
}
=
$linkinfooter
;
}
}
foreach
my
$name
(
keys
%
old
)
{
if
(
exists
$::FORM
{
"query-$name"
})
{
for
(
my
$c
=
0
;
$c
<
$::FORM
{
'numqueries'
}
;
$c
++
)
{
my
$new
=
$::FORM
{
"query-$name"
};
my
$name
=
$::FORM
{
"name-$c"
};
if
(
exists
$old
{
$name
})
{
my
$new
=
$::FORM
{
"query-$c"
};
if
(
$new
ne
$old
{
$name
})
{
if
(
$new
ne
$old
{
$name
})
{
SendSQL
(
"UPDATE namedqueries SET linkinfooter = $new "
.
SendSQL
(
"UPDATE namedqueries SET linkinfooter = $new "
.
"WHERE userid = $userid "
.
"WHERE userid = $userid "
.
"AND name = "
.
SqlQuote
(
$name
));
"AND name = "
.
SqlQuote
(
$name
));
}
}
}
else
{
Error
(
"Hmm, the $name query seems to have gone away."
);
}
}
}
}
SendSQL
(
"UPDATE profiles SET mybugslink = '"
.
$::FORM
{
'mybugslink'
}
.
SendSQL
(
"UPDATE profiles SET mybugslink = '"
.
$::FORM
{
'mybugslink'
}
.
...
@@ -215,6 +227,10 @@ GetVersionTable();
...
@@ -215,6 +227,10 @@ GetVersionTable();
PutHeader
(
"Preferences"
,
"Preferences"
,
$::COOKIE
{
'Bugzilla_login'
});
PutHeader
(
"Preferences"
,
"Preferences"
,
$::COOKIE
{
'Bugzilla_login'
});
# foreach my $k (sort(keys(%::FORM))) {
# print "<pre>" . value_quote($k) . ": " . value_quote($::FORM{$k}) . "\n</pre>";
# }
my
$bank
=
$::FORM
{
'bank'
}
||
"account"
;
my
$bank
=
$::FORM
{
'bank'
}
||
"account"
;
my
@banklist
=
(
my
@banklist
=
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment