Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Sort search results in admin interface in created order (fixes #23).

  • Loading branch information...
commit e4629202b50e0e2f15c716fe7ab4d8f5c33904c7 1 parent 53a3846
@dracos dracos authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 perllib/FYR/Queue.pm
  2. +2 −2 phplib/admin-fyrqueue.php
View
4 perllib/FYR/Queue.pm
@@ -2210,11 +2210,11 @@ sub admin_get_queue ($$) {
$where = "where id = ?";
push @params, $token_found_id;
} elsif (mySociety::EmailUtil::is_valid_email($params->{query})) {
- $where = "where lower(sender_email) = lower(?) or lower(recipient_email) = lower(?)";
+ $where = "where lower(sender_email) = lower(?) or lower(recipient_email) = lower(?) ORDER BY created DESC";
push @params, $params->{query};
push @params, $params->{query};
} elsif ($params->{query} =~ /^(ready) (CED|COP|DIW|EUR|HOC|LAC|LAE|LBW|LGE|MTW|NIE|SPC|SPE|UTE|UTW|WAC|WAE|WMC)$/) {
- $where = "where state = ? and recipient_type = ?";
+ $where = "where state = ? and recipient_type = ? ORDER BY created DESC";
push @params, $1;
push @params, $2;
} else {
View
4 phplib/admin-fyrqueue.php
@@ -145,7 +145,7 @@ function print_messages($messages, $msgid = null) {
</tr>
<form action="<?=htmlspecialchars(url_new("", false, 'view', get_http_var('view'), 'simto', get_http_var('simto'), 'page', get_http_var('page'))) ?>" method="post">
<?
- $c = 1;
+ $c = 1;
foreach ($messages as $message) {
print '<tr' . ($c==1 ? ' class="v"' : '') . '>';
print "<td>" . strftime('%Y-%m-%d %H:%M:%S', $message['created']) . "</td>";
@@ -531,7 +531,7 @@ function display($self_link) {
$actiongroup[] = &HTML_QuickForm::createElement('submit', 'no_questionnaire', 'No Questionnaire');
if ($message['state'] == 'pending')
$actiongroup[] = &HTML_QuickForm::createElement('submit', 'ready', 'Confirm');
- elseif ($message['state'] == 'failed' || $message['state'] == 'failed_closed')
+ elseif ($message['state'] == 'failed' || $message['state'] == 'failed_closed')
$actiongroup[] = &HTML_QuickForm::createElement('submit', 'ready', 'Retry');
if (!get_http_var('body'))
Please sign in to comment.
Something went wrong with that request. Please try again.