From e2c03a95905a10aa76ed0d53681e4655c403ea1f Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Sun, 16 Nov 2008 15:11:29 -0700 Subject: [PATCH] Fixes. --- framework/Crypt/lib/Horde/Crypt.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/framework/Crypt/lib/Horde/Crypt.php b/framework/Crypt/lib/Horde/Crypt.php index 3428e735f..5785a9a28 100644 --- a/framework/Crypt/lib/Horde/Crypt.php +++ b/framework/Crypt/lib/Horde/Crypt.php @@ -18,7 +18,7 @@ class Horde_Crypt * * @var string */ - protected var $_tempdir; + protected $_tempdir; /** * Attempts to return a concrete Horde_Crypt instance based on $driver. @@ -46,17 +46,21 @@ class Horde_Crypt } $class = 'Horde_Crypt_' . $driver; + if (!empty($app)) { + $class = $app . '_' . $class; + } + if (!class_exists($class)) { - if (!empty($app)) { - include_once $GLOBALS['registry']->get('fileroot', $app) . '/lib/Crypt/' . $driver . '.php'; - } else { + if (empty($app)) { include_once dirname(__FILE__) . '/Crypt/' . $driver . '.php'; + } else { + include_once $GLOBALS['registry']->get('fileroot', $app) . '/lib/Crypt/' . $driver . '.php'; } } return class_exists($class) - ? new $class($params); - PEAR::raiseError('Class definition of ' . $class . ' not found.'); + ? new $class($params) + : PEAR::raiseError('Class definition of ' . $class . ' not found.'); } /** -- 2.11.0