mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Merge remote-tracking branch 'VarunAgw/ticket/12250' into develop
# By Varun Agrawal # Via Varun Agrawal * VarunAgw/ticket/12250: [ticket/12250] Remove deprecated phpbb_clean_path function [ticket/12250] Remove deprecated phpbb_clean_path function
This commit is contained in:
commit
9100f4ebbf
2 changed files with 40 additions and 40 deletions
|
@ -850,46 +850,6 @@ else
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Eliminates useless . and .. components from specified path.
|
|
||||||
*
|
|
||||||
* Deprecated, use filesystem class instead
|
|
||||||
*
|
|
||||||
* @param string $path Path to clean
|
|
||||||
* @return string Cleaned path
|
|
||||||
*
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
function phpbb_clean_path($path)
|
|
||||||
{
|
|
||||||
global $phpbb_path_helper, $phpbb_container;
|
|
||||||
|
|
||||||
if (!$phpbb_path_helper && $phpbb_container)
|
|
||||||
{
|
|
||||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
|
||||||
}
|
|
||||||
else if (!$phpbb_path_helper)
|
|
||||||
{
|
|
||||||
// The container is not yet loaded, use a new instance
|
|
||||||
if (!class_exists('\phpbb\path_helper'))
|
|
||||||
{
|
|
||||||
global $phpbb_root_path, $phpEx;
|
|
||||||
require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
|
|
||||||
}
|
|
||||||
|
|
||||||
$phpbb_path_helper = new phpbb\path_helper(
|
|
||||||
new phpbb\symfony_request(
|
|
||||||
new phpbb\request\request()
|
|
||||||
),
|
|
||||||
new phpbb\filesystem(),
|
|
||||||
$phpbb_root_path,
|
|
||||||
$phpEx
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $phpbb_path_helper->clean_path($path);
|
|
||||||
}
|
|
||||||
|
|
||||||
// functions used for building option fields
|
// functions used for building option fields
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -83,3 +83,43 @@ function phpbb_check_hash($password, $hash)
|
||||||
$passwords_manager = $phpbb_container->get('passwords.manager');
|
$passwords_manager = $phpbb_container->get('passwords.manager');
|
||||||
return $passwords_manager->check($password, $hash);
|
return $passwords_manager->check($password, $hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Eliminates useless . and .. components from specified path.
|
||||||
|
*
|
||||||
|
* Deprecated, use filesystem class instead
|
||||||
|
*
|
||||||
|
* @param string $path Path to clean
|
||||||
|
* @return string Cleaned path
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
|
function phpbb_clean_path($path)
|
||||||
|
{
|
||||||
|
global $phpbb_path_helper, $phpbb_container;
|
||||||
|
|
||||||
|
if (!$phpbb_path_helper && $phpbb_container)
|
||||||
|
{
|
||||||
|
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||||
|
}
|
||||||
|
else if (!$phpbb_path_helper)
|
||||||
|
{
|
||||||
|
// The container is not yet loaded, use a new instance
|
||||||
|
if (!class_exists('\phpbb\path_helper'))
|
||||||
|
{
|
||||||
|
global $phpbb_root_path, $phpEx;
|
||||||
|
require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpbb_path_helper = new phpbb\path_helper(
|
||||||
|
new phpbb\symfony_request(
|
||||||
|
new phpbb\request\request()
|
||||||
|
),
|
||||||
|
new phpbb\filesystem(),
|
||||||
|
$phpbb_root_path,
|
||||||
|
$phpEx
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $phpbb_path_helper->clean_path($path);
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue