Unverified Commit 3ff0bc15 authored by IKEDA Soji's avatar IKEDA Soji Committed by GitHub
Browse files

Merge pull request #1014 from ikedas/issue-1013 by ikedas

Oracle: ORA-00904: "EMAIL": invalid identifier (#1013)
parents 3f44b653 d8b053d3
......@@ -2228,19 +2228,16 @@ sub get_first_list_member {
($selection || '');
## SORT BY
if ($sortby eq 'email') {
## Default SORT
$statement .= ' ORDER BY email';
} elsif ($sortby eq 'date') {
$statement .= ' ORDER BY date DESC';
} elsif ($sortby eq 'sources') {
$statement .= " ORDER BY subscribed DESC,id";
} elsif ($sortby eq 'name') {
$statement .= ' ORDER BY gecos';
}
$statement .= ' ORDER BY '
. (
{ email => 'user_subscriber',
date => 'date_epoch_subscriber DESC',
sources =>
'subscribed_subscriber DESC, inclusion_label_subscriber ASC',
name => 'comment_subscriber',
}->{$sortby}
|| 'user_subscriber'
);
push @sth_stack, $sth;
unless ($sdm and $sth = $sdm->do_query($statement)) {
......@@ -2668,12 +2665,13 @@ sub get_members {
if ($order) {
$order_by = 'ORDER BY '
. (
{ email => 'email',
date => 'date DESC',
sources => 'subscribed DESC, inclusion_label ASC',
name => 'gecos',
{ email => 'user_subscriber',
date => 'date_epoch_subscriber DESC',
sources =>
'subscribed_subscriber DESC, inclusion_label_subscriber ASC',
name => 'comment_subscriber',
}->{$order}
|| 'email'
|| 'user_subscriber'
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment