Unverified Commit 6f8c0ee4 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(core) Remove double underscore from autoload function name

This fixes a warning from PHPCompatiblity about a possible future
 conflict with PHP internal functions.

issue #6167
Showing with 6 additions and 6 deletions
+6 -6
......@@ -119,8 +119,8 @@ if (isset($_REQUEST['signout']) && $_REQUEST['signout']) {
if ($config->get_cfg_value('casActivated') == 'TRUE') {
require_once('CAS.php');
/* Move FD autoload after CAS autoload */
spl_autoload_unregister('__fusiondirectory_autoload');
spl_autoload_register('__fusiondirectory_autoload');
spl_autoload_unregister('fusiondirectory_autoload');
spl_autoload_register('fusiondirectory_autoload');
phpCAS::client(
CAS_VERSION_2_0,
$config->get_cfg_value('casHost', 'localhost'),
......@@ -580,8 +580,8 @@ if ($config->get_cfg_value('httpAuthActivated') == 'TRUE') {
} elseif ($config->get_cfg_value('casActivated') == 'TRUE') {
require_once('CAS.php');
/* Move FD autoload after CAS autoload */
spl_autoload_unregister('__fusiondirectory_autoload');
spl_autoload_register('__fusiondirectory_autoload');
spl_autoload_unregister('fusiondirectory_autoload');
spl_autoload_register('fusiondirectory_autoload');
Index::casLoginProcess();
} elseif ($config->get_cfg_value('httpHeaderAuthActivated') == 'TRUE') {
Index::headerAuthLoginProcess();
......
......@@ -83,7 +83,7 @@ $REWRITE = array( "ä" => "ae",
* \param array $class_name list of class name
*/
function __fusiondirectory_autoload($class_name)
function fusiondirectory_autoload ($class_name)
{
global $class_mapping, $BASE_DIR, $config;
......@@ -117,7 +117,7 @@ function __fusiondirectory_autoload($class_name)
exit;
}
}
spl_autoload_register('__fusiondirectory_autoload');
spl_autoload_register('fusiondirectory_autoload');
/*!
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment