summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xeditusers.cgi10
-rw-r--r--template/en/default/admin/users/confirm-delete.html.tmpl12
2 files changed, 11 insertions, 11 deletions
diff --git a/editusers.cgi b/editusers.cgi
index e9e40eb4c..e53341c61 100755
--- a/editusers.cgi
+++ b/editusers.cgi
@@ -468,14 +468,14 @@ if ($action eq 'search') {
$vars->{'longdescs'} = $dbh->selectrow_array(
'SELECT COUNT(*) FROM longdescs WHERE who = ?',
undef, $otherUserID);
- $vars->{'namedqueries'} = $dbh->selectcol_arrayref(
+ my $namedquery_ids = $dbh->selectcol_arrayref(
'SELECT id FROM namedqueries WHERE userid = ?',
- undef,
- $otherUserID);
- if (@{$vars->{'namedqueries'}}) {
+ undef, $otherUserID);
+ $vars->{'namedqueries'} = scalar(@$namedquery_ids);
+ if (scalar(@$namedquery_ids)) {
$vars->{'namedquery_group_map'} = $dbh->selectrow_array(
'SELECT COUNT(*) FROM namedquery_group_map WHERE namedquery_id IN' .
- ' (' . join(', ', @{$vars->{'namedqueries'}}) . ')');
+ ' (' . join(', ', @$namedquery_ids) . ')');
}
else {
$vars->{'namedquery_group_map'} = 0;
diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl
index e5f3a392b..5a4032795 100644
--- a/template/en/default/admin/users/confirm-delete.html.tmpl
+++ b/template/en/default/admin/users/confirm-delete.html.tmpl
@@ -31,9 +31,9 @@
# flags.requestee: number of flags the viewed user is being asked for
# flags.setter: number of flags the viewed user has set
# longdescs: number of bug comments the viewed user has written
- # namedqueries: array of IDs of named queries the user has created
+ # namedqueries: number of named queries the user has created
# namedquery_group_map: number of named queries the user has shared
- # profiles_activity: number of named queries the user has created
+ # profiles_activity: number of changes made to other users' profiles
# series: number of series the viewed user has created
# votes: number of bugs the viewed user has voted on
# watch.watched: number of users the viewed user is being watched
@@ -302,19 +302,19 @@
[% IF namedqueries %]
<li>
[% otheruser.login FILTER html %] has
- [% IF namedqueries.size == 1 %]
+ [% IF namedqueries == 1 %]
a [% 'shared' IF namedquery_group_map %] named search
[% ELSE %]
- [%+ namedqueries.size %] named searches
+ [%+ namedqueries FILTER html %] named searches
[% END %].
- [% IF namedqueries.size == 1 %]
+ [% IF namedqueries == 1 %]
This named search
[% ELSE %]
These named searches
[% END %]
will be deleted along with the user account.
[% IF namedquery_group_map %]
- [% IF namedqueries.size > 1 %]
+ [% IF namedqueries > 1 %]
Of these,
[% IF namedquery_group_map > 1 %]
[%+ namedquery_group_map FILTER html %] are