Commit d8b053d3 authored by IKEDA Soji's avatar IKEDA Soji
Browse files

Oracle: ORA-00904: "EMAIL": invalid identifier (#1013)

parent 0fa53762
......@@ -2706,19 +2706,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)) {
......@@ -3259,12 +3256,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