From 5a2752cf34f655cbcb6c30df756e705e5fac7c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rouven=20We=C3=9Fling?= Date: Mon, 9 Apr 2012 22:33:10 +0200 Subject: [PATCH] Move Simplecrypt to legacy and make it autoloadable. --- libraries/import.legacy.php | 1 + libraries/legacy/application/application.php | 2 -- .../utilities => legacy/simplecrypt}/simplecrypt.php | 8 ++++---- .../simplecrypt}/JSimpleCryptTest.php | 10 ++++++---- 4 files changed, 11 insertions(+), 10 deletions(-) rename libraries/{joomla/utilities => legacy/simplecrypt}/simplecrypt.php (93%) rename tests/suites/{unit/joomla/utilities => legacy/simplecrypt}/JSimpleCryptTest.php (94%) diff --git a/libraries/import.legacy.php b/libraries/import.legacy.php index b8db2cb167..5be8c7ab5c 100644 --- a/libraries/import.legacy.php +++ b/libraries/import.legacy.php @@ -61,5 +61,6 @@ class_exists('JLoader') or die; JLoader::register('JDatabaseQuerySQLAzure', JPATH_PLATFORM . '/joomla/database/query/sqlazure.php'); JLoader::register('JDatabaseQuerySQLSrv', JPATH_PLATFORM . '/joomla/database/query/sqlsrv.php'); JLoader::register('JToolBar', JPATH_PLATFORM . '/legacy/toolbar/toolbar.php'); +JLoader::register('JSimpleCrypt', JPATH_PLATFORM . '/legacy/simplecrypt/simplecrypt.php'); JLoader::register('JTree', JPATH_PLATFORM . '/legacy/base/tree.php'); JLoader::register('JNode', JPATH_PLATFORM . '/legacy/base/node.php'); diff --git a/libraries/legacy/application/application.php b/libraries/legacy/application/application.php index a827a74373..dce5aa93df 100644 --- a/libraries/legacy/application/application.php +++ b/libraries/legacy/application/application.php @@ -668,8 +668,6 @@ public function login($credentials, $options = array()) // Set the remember me cookie if enabled. if (isset($options['remember']) && $options['remember']) { - jimport('joomla.utilities.simplecrypt'); - // Create the encryption key, apply extra hardening using the user agent string. $key = self::getHash(@$_SERVER['HTTP_USER_AGENT']); diff --git a/libraries/joomla/utilities/simplecrypt.php b/libraries/legacy/simplecrypt/simplecrypt.php similarity index 93% rename from libraries/joomla/utilities/simplecrypt.php rename to libraries/legacy/simplecrypt/simplecrypt.php index cadbf64425..9ddc6191ae 100644 --- a/libraries/joomla/utilities/simplecrypt.php +++ b/libraries/legacy/simplecrypt/simplecrypt.php @@ -1,7 +1,7 @@