Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added checks for filter and limit to getSubmissionForUser

  • Loading branch information...
commit e9187fd13d788746eb323a3114a57de4575df152 1 parent 977425d
Jon 'CowboyNeal' Pater authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 Slash/DB/MySQL/MySQL.pm
View
8 Slash/DB/MySQL/MySQL.pm
@@ -7750,11 +7750,17 @@ sub getSubmissionForUser {
push @where, "primaryskid = $skin->{skid}";
}
+ if ($form->{filter}) {
+ push @where, "subj LIKE '%" . $form->{filter}. "%'";
+ }
+
+ my $limit = ($form->{limit} =~ /\d+/) ? 'LIMIT ' . $form->{limit} : '';
+
my $submissions = $self->sqlSelectAllHashrefArray(
'submissions.*, karma',
'submissions,users_info',
join(' AND ', @where),
- 'ORDER BY time'
+ "ORDER BY time $limit"
);
for my $sub (@$submissions) {
Please sign in to comment.
Something went wrong with that request. Please try again.