summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-26 13:54:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-26 13:54:57 +0000
commit718cd596e061dffa5b61c9d6e3a61c3beb33a941 (patch)
tree98eb4699acf2c9a066a078462e124018bab28ac8 /extra
parentc5ccfede6d9862d4284d4b83ddf1e703af6fece8 (diff)
downloadredmine-718cd596e061dffa5b61c9d6e3a61c3beb33a941.tar.gz
redmine-718cd596e061dffa5b61c9d6e3a61c3beb33a941.zip
Merged r3246 and r3247 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3248 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'extra')
-rw-r--r--extra/svn/Redmine.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/extra/svn/Redmine.pm b/extra/svn/Redmine.pm
index 66dc6c03f..1829d2b0b 100644
--- a/extra/svn/Redmine.pm
+++ b/extra/svn/Redmine.pm
@@ -233,11 +233,16 @@ sub is_public_project {
my $dbh = connect_database($r);
my $sth = $dbh->prepare(
- "SELECT * FROM projects WHERE projects.identifier=? and projects.is_public=true;"
+ "SELECT is_public FROM projects WHERE projects.identifier = ?;"
);
$sth->execute($project_id);
- my $ret = $sth->fetchrow_array ? 1 : 0;
+ my $ret = 0;
+ if (my @row = $sth->fetchrow_array) {
+ if ($row[0] eq "1" || $row[0] eq "t") {
+ $ret = 1;
+ }
+ }
$sth->finish();
$dbh->disconnect();
@@ -295,7 +300,7 @@ sub is_member {
$sthldap->execute($auth_source_id);
while (my @rowldap = $sthldap->fetchrow_array) {
my $ldap = Authen::Simple::LDAP->new(
- host => ($rowldap[2] == 1 || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]" : $rowldap[0],
+ host => ($rowldap[2] eq "1" || $rowldap[2] eq "t") ? "ldaps://$rowldap[0]" : $rowldap[0],
port => $rowldap[1],
basedn => $rowldap[5],
binddn => $rowldap[3] ? $rowldap[3] : "",