Temporary workaround to avoid the hard redirect exit during testing.
authorGunnar Wrobel <p@rdus.de>
Wed, 3 Mar 2010 00:43:53 +0000 (01:43 +0100)
committerGunnar Wrobel <p@rdus.de>
Wed, 3 Mar 2010 00:43:53 +0000 (01:43 +0100)
Will be immediately removed once the Backend has been extracted.

framework/LoginTasks/lib/Horde/LoginTasks.php

index 18bd473..e00bc78 100644 (file)
@@ -222,7 +222,7 @@ class Horde_LoginTasks
      *                            have been confirmed by the user.
      * @param string $url         The URL to redirect to when finished.
      */
-    public function runTasks($confirmed = false, $url = null)
+    public function runTasks($confirmed = false, $url = null, $no_redirect = false)
     {
         if (!isset($this->_tasklist) ||
             ($this->_tasklist === true)) {
@@ -262,9 +262,11 @@ class Horde_LoginTasks
 
         if (!$processed && $need_display) {
             $this->_tasklist->target = $url;
+            if ($no_redirect) return $this->getLoginTasksUrl();
             header('Location: ' . $this->getLoginTasksUrl());
             exit;
         } elseif ($processed && !$need_display) {
+            if ($no_redirect) return $tasklist_target;
             header('Location: ' . $tasklist_target);
             exit;
         }