mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10586] Sanitize periods from class names, use manager to get path.
PHPBB3-10586
This commit is contained in:
parent
969c6d42e3
commit
e45452d1b3
2 changed files with 2 additions and 2 deletions
|
@ -437,7 +437,7 @@ class phpbb_extension_manager
|
||||||
*/
|
*/
|
||||||
public function available($name)
|
public function available($name)
|
||||||
{
|
{
|
||||||
return file_exists($this->phpbb_root_path . "ext/$name/");
|
return file_exists($this->get_extension_path($name, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,7 +28,7 @@ $user->setup('viewforum');
|
||||||
if ($ext = $request->variable('ext', ''))
|
if ($ext = $request->variable('ext', ''))
|
||||||
{
|
{
|
||||||
// The class to load
|
// The class to load
|
||||||
$class = "phpbb_ext_{$ext}_controller";
|
$class = 'phpbb_ext_' . str_replace('/', '_', $name) . '_controller';
|
||||||
|
|
||||||
// Make sure the specified extension is enabled
|
// Make sure the specified extension is enabled
|
||||||
// and that it has a controller class
|
// and that it has a controller class
|
||||||
|
|
Loading…
Add table
Reference in a new issue