From: Michael M Slusarz Date: Wed, 15 Jul 2009 05:12:33 +0000 (-0600) Subject: Remove getLoginScreen(). X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=67d983d0edbf674ecd7f763ae386bbef399ad5b1;p=horde.git Remove getLoginScreen(). --- diff --git a/framework/Auth/lib/Horde/Auth/Application.php b/framework/Auth/lib/Horde/Auth/Application.php index 391401ec5..f3e853435 100644 --- a/framework/Auth/lib/Horde/Auth/Application.php +++ b/framework/Auth/lib/Horde/Auth/Application.php @@ -118,19 +118,6 @@ class Horde_Auth_Application extends Horde_Auth_Base } /** - * Return the URI of the login screen for this authentication method. - * - * @param string $app The application to use. - * @param string $url The URL to redirect to after login. - * - * @return string The login screen URI. - */ - public function getLoginScreen($app = 'horde', $url = '') - { - return parent::getLoginScreen($this->_params['app'], $url); - } - - /** * List all users in the system. * * @return array The array of userIds. diff --git a/framework/Auth/lib/Horde/Auth/Base.php b/framework/Auth/lib/Horde/Auth/Base.php index bb08e0a2e..603db2eb1 100644 --- a/framework/Auth/lib/Horde/Auth/Base.php +++ b/framework/Auth/lib/Horde/Auth/Base.php @@ -78,7 +78,7 @@ abstract class Horde_Auth_Base if (Horde_Auth::getAuthError() != Horde_Auth::REASON_MESSAGE) { Horde_Auth::setAuthError(Horde_Auth::REASON_FAILED); } - return false; + return $auth; } } @@ -111,8 +111,11 @@ abstract class Horde_Auth_Base } } } catch (Horde_Auth_Exception $e) { - Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_DEBUG); - Horde_Auth::setAuthError($e->getCode() || Horde_Auth::REASON_MESSAGE, $e->getMessage()); + if ($e->getCode()) { + Horde_Auth::setAuthError($e->getCode()); + } else { + Horde_Auth::setAuthError(Horde_Auth::REASON_MESSAGE, $e->getMessage()); + } } return $auth; @@ -260,24 +263,6 @@ abstract class Horde_Auth_Base } /** - * Returns the URI of the login screen for the current authentication - * method. - * - * @param string $app The application to use. - * @param string $url The URL to redirect to after login. - * - * @return string The login screen URI. - */ - public function getLoginScreen($app = 'horde', $url = '') - { - $login = Horde::url($GLOBALS['registry']->get('webroot', $app) . '/login.php', true); - if (!empty($url)) { - $login = Horde_Util::addParameter($login, 'url', $url); - } - return $login; - } - - /** * Returns the named parameter for the current auth driver. * * @param string $param The parameter to fetch. diff --git a/framework/Auth/lib/Horde/Auth/Composite.php b/framework/Auth/lib/Horde/Auth/Composite.php index dbb1306f2..ddb011342 100644 --- a/framework/Auth/lib/Horde/Auth/Composite.php +++ b/framework/Auth/lib/Horde/Auth/Composite.php @@ -116,24 +116,6 @@ class Horde_Auth_Composite extends Horde_Auth_Base } /** - * Return the URI of the login screen for this authentication object. - * - * @param string $app The application to use. - * @param string $url The URL to redirect to after login. - * - * @return string The login screen URI. - */ - public function getLoginScreen($app = 'horde', $url = '') - { - if (($login_driver = Horde_Auth::getDriverByParam('loginscreen_switch', $this->_params)) && - $this->_loadDriver($login_driver)) { - return $this->_drivers[$login_driver]->getLoginScreen($app, $url); - } - - return parent::getLoginScreen($app, $url); - } - - /** * Add a set of authentication credentials. * * @param string $userId The userId to add. diff --git a/framework/Auth/lib/Horde/Auth/Cyrus.php b/framework/Auth/lib/Horde/Auth/Cyrus.php index acac535c9..b5141c18e 100644 --- a/framework/Auth/lib/Horde/Auth/Cyrus.php +++ b/framework/Auth/lib/Horde/Auth/Cyrus.php @@ -34,7 +34,6 @@ * Example Usage: *
  * $conf['auth']['driver'] = 'composite';
- * $conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
  * $conf['auth']['params']['admin_driver'] = 'cyrus';
  * $conf['auth']['params']['drivers']['imp'] = array(
  *     'driver' => 'application',
@@ -268,19 +267,6 @@ class Horde_Auth_Cyrus extends Horde_Auth_Base
     }
 
     /**
-     * Return the URI of the login screen for this authentication method.
-     *
-     * @param string $app  The application to use.
-     * @param string $url  The URL to redirect to after login.
-     *
-     * @return string  The login screen URI.
-     */
-    public function getLoginScreen($app = 'horde', $url = '')
-    {
-        return $this->_backend->getLoginScreen($app, $url);
-    }
-
-    /**
      * Checks if a userId exists in the system.
      *
      * @return boolean  Whether or not the userId already exists.
diff --git a/framework/Auth/lib/Horde/Auth/Http.php b/framework/Auth/lib/Horde/Auth/Http.php
index cbe7b1d1c..62dbe7fde 100644
--- a/framework/Auth/lib/Horde/Auth/Http.php
+++ b/framework/Auth/lib/Horde/Auth/Http.php
@@ -92,25 +92,6 @@ class Horde_Auth_Http extends Horde_Auth_Base
     }
 
     /**
-     * Return the URI of the login screen for this authentication object.
-     *
-     * @param string $app  The application to use.
-     * @param string $url  The URL to redirect to after login.
-     *
-     * @return string  The login screen URI.
-     */
-    public function getLoginScreen($app = 'horde', $url = '')
-    {
-        if (!empty($this->_params['loginScreen'])) {
-            return $url
-                ? Horde_Util::addParameter($this->_params['loginScreen'], 'url', $url)
-                : $this->_params['loginScreen'];
-        }
-
-        return parent::getLoginScreen($app, $url);
-    }
-
-    /**
      * List all users in the system.
      *
      * @return array  The array of userIds.