Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #5 from wilke/master

bug fix in Job.pm preventing empty browse page
  • Loading branch information...
commit 8bf280fa8530942b8aac74c2067194048febeeb7 2 parents 47f1ce0 + 509c175
@jaredwilkening jaredwilkening authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/MGRAST/JobDB/Job.pm
View
5 src/MGRAST/JobDB/Job.pm
@@ -994,9 +994,12 @@ sub fetch_browsepage_viewable {
my $userjobs = $user->has_right_to(undef, 'view', 'metagenome');
if ($userjobs->[0] eq '*') {
$jobselopt = "viewable=1";
- } else {
+ } elsif ( @$userjobs > 0 ) {
$jobselopt = "viewable=1 and (public=1 or metagenome_id in (".join(",", map {"'$_'"} @$userjobs)."))";
}
+ else{
+ $jobselopt = "viewable=1 and public=1";
+ }
}
} else {
$jobselopt = "viewable=1 and public=1";
Please sign in to comment.
Something went wrong with that request. Please try again.