@@ -132,7 +132,6 class MailHandler < ActionMailer::Base | |||||
132 | issue.status = status |
|
132 | issue.status = status | |
133 | end |
|
133 | end | |
134 | issue.subject = email.subject.chomp |
|
134 | issue.subject = email.subject.chomp | |
135 | issue.subject = issue.subject.toutf8 if issue.subject.respond_to?(:toutf8) |
|
|||
136 | if issue.subject.blank? |
|
135 | if issue.subject.blank? | |
137 | issue.subject = '(no subject)' |
|
136 | issue.subject = '(no subject)' | |
138 | end |
|
137 | end |
@@ -233,11 +233,16 sub is_public_project { | |||||
233 |
|
233 | |||
234 | my $dbh = connect_database($r); |
|
234 | my $dbh = connect_database($r); | |
235 | my $sth = $dbh->prepare( |
|
235 | my $sth = $dbh->prepare( | |
236 |
"SELECT |
|
236 | "SELECT is_public FROM projects WHERE projects.identifier = ?;" | |
237 | ); |
|
237 | ); | |
238 |
|
238 | |||
239 | $sth->execute($project_id); |
|
239 | $sth->execute($project_id); | |
240 | my $ret = $sth->fetchrow_array ? 1 : 0; |
|
240 | my $ret = 0; | |
|
241 | if (my @row = $sth->fetchrow_array) { | |||
|
242 | if ($row[0] eq "1" || $row[0] eq "t") { | |||
|
243 | $ret = 1; | |||
|
244 | } | |||
|
245 | } | |||
241 | $sth->finish(); |
|
246 | $sth->finish(); | |
242 | $dbh->disconnect(); |
|
247 | $dbh->disconnect(); | |
243 |
|
248 | |||
@@ -295,7 +300,7 sub is_member { | |||||
295 | $sthldap->execute($auth_source_id); |
|
300 | $sthldap->execute($auth_source_id); | |
296 | while (my @rowldap = $sthldap->fetchrow_array) { |
|
301 | while (my @rowldap = $sthldap->fetchrow_array) { | |
297 | my $ldap = Authen::Simple::LDAP->new( |
|
302 | my $ldap = Authen::Simple::LDAP->new( | |
298 |
host => ($rowldap[2] |
|
303 | host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]" : $rowldap[0], | |
299 | port => $rowldap[1], |
|
304 | port => $rowldap[1], | |
300 | basedn => $rowldap[5], |
|
305 | basedn => $rowldap[5], | |
301 | binddn => $rowldap[3] ? $rowldap[3] : "", |
|
306 | binddn => $rowldap[3] ? $rowldap[3] : "", |
General Comments 0
You need to be logged in to leave comments.
Login now