Use correct passwords for banana (Closes #1247)
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 27 Sep 2010 21:21:12 +0000 (23:21 +0200)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Mon, 27 Sep 2010 21:21:12 +0000 (23:21 +0200)
Commit ad59fc86 removed the distinction between banana->web_pass (used
for user 'web') and banana->password (used for real users accessing the
site)

Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
include/banana/forum.inc.php

index 6a6a869..26d1fe5 100644 (file)
@@ -59,9 +59,12 @@ class ForumsBanana extends Banana
         $user = $globals->banana->web_user;
         if ($login != null) {
             $user .= '_' . $login;
+            $pass = $globals->banana->password;
+        } else {
+            $pass = $globals->banana->web_pass;
         }
         return $scheme . '://' . $user
-                       . ":{$globals->banana->password}@{$globals->banana->server}:{$globals->banana->port}/";
+                       . ":{$pass}@{$globals->banana->server}:{$globals->banana->port}/";
 
     }