##// END OF EJS Templates
Merged r3246 and r3247 from trunk....
Jean-Philippe Lang -
r3134:718cd596e061
parent child
Show More
@@ -132,7 +132,6 class MailHandler < ActionMailer::Base
132 132 issue.status = status
133 133 end
134 134 issue.subject = email.subject.chomp
135 issue.subject = issue.subject.toutf8 if issue.subject.respond_to?(:toutf8)
136 135 if issue.subject.blank?
137 136 issue.subject = '(no subject)'
138 137 end
@@ -233,11 +233,16 sub is_public_project {
233 233
234 234 my $dbh = connect_database($r);
235 235 my $sth = $dbh->prepare(
236 "SELECT * FROM projects WHERE projects.identifier=? and projects.is_public=true;"
236 "SELECT is_public FROM projects WHERE projects.identifier = ?;"
237 237 );
238 238
239 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 246 $sth->finish();
242 247 $dbh->disconnect();
243 248
@@ -295,7 +300,7 sub is_member {
295 300 $sthldap->execute($auth_source_id);
296 301 while (my @rowldap = $sthldap->fetchrow_array) {
297 302 my $ldap = Authen::Simple::LDAP->new(
298 host => ($rowldap[2] == 1 || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]" : $rowldap[0],
303 host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]" : $rowldap[0],
299 304 port => $rowldap[1],
300 305 basedn => $rowldap[5],
301 306 binddn => $rowldap[3] ? $rowldap[3] : "",
General Comments 0
You need to be logged in to leave comments. Login now