Fix this.
authorJan Schneider <jan@horde.org>
Wed, 28 Jul 2010 16:12:44 +0000 (18:12 +0200)
committerJan Schneider <jan@horde.org>
Wed, 28 Jul 2010 16:12:44 +0000 (18:12 +0200)
horde/login.php

index bbcb028..3554487 100644 (file)
@@ -260,12 +260,14 @@ if (!empty($conf['auth']['alternate_login'])) {
         $url_in = Horde::selfUrl(true, true, true);
     }
     $anchor = _addAnchor($url_in, 'param', $vars, $url_anchor);
+    $found = false;
     foreach ($url->parameters as $key => $value) {
         if (strpos($value, '%u')) {
             $url->parameters[$key] = str_replace('%u', rawurlencode($anchor), $value);
+            $found = true;
         }
-
-    } else {
+    }
+    if (!$found) {
         $url->add('url', $anchor);
     }
     header('Location: ' . _addAnchor($url, 'url', $vars, $url_anchor));