Fix parameter generation for app name.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Jul 2009 22:08:15 +0000 (16:08 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 22 Jul 2009 22:08:15 +0000 (16:08 -0600)
framework/Auth/lib/Horde/Auth.php

index 8c5b41d..f9c9b4a 100644 (file)
@@ -500,12 +500,8 @@ class Horde_Auth
             $options['reason'] = self::getAuthError();
         }
 
-        if (isset($options['app'])) {
-            $params['app'] = $options['app'];
-        }
-
-        if (empty($params['app']) ||
-            ($params['app'] == 'horde') ||
+        if (empty($options['app']) ||
+            ($options['app'] == 'horde') ||
             ($options['reason'] == self::REASON_LOGOUT)) {
             $params = array(
                 'horde_logout_token' => Horde::getRequestToken('horde.logout'),
@@ -517,6 +513,10 @@ class Horde_Auth
             );
         }
 
+        if (isset($options['app'])) {
+            $params['app'] = $options['app'];
+        }
+
         if ($options['reason']) {
             $params[self::REASON_PARAM] = $options['reason'];
             if ($options['reason'] == self::REASON_MESSAGE) {