throw new Horde_Exception(sprintf(_('%s is not authorized for %s.'), Horde_Auth::getAuth() ? 'User ' . Horde_Auth::getAuth() : 'Guest user', $this->applications[$app]['name']), self::PERMISSION_DENIED);
}
+ /* Push application on the stack. */
+ $this->_appStack[] = $app;
+
/* Set up autoload paths for the current application. This needs to
* be done here because it is possible to try to load app-specific
* libraries from other applications. */
}
}
- /* Once we know everything succeeded and is in a consistent state
- * again, push the new application onto the stack. */
- $this->_appStack[] = $app;
-
/* Call post-push hook. */
try {
Horde::callHook('pushapp', array(), $app);