1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

[ticket/10586] Tidy up comments

PHPBB3-10586
This commit is contained in:
David King 2012-03-27 19:57:32 -04:00
parent 6a0bad8c0b
commit 56f75dbf93
2 changed files with 2 additions and 8 deletions

View File

@ -432,7 +432,7 @@ class phpbb_extension_manager
/**
* Check to see if a given extension is available on the filesystem
*
* @param string $name Extension name to check
* @param string $name Extension name to check NOTE: Can be user input
* @return bool Depending on whether or not the extension is available
*/
public function available($name)

View File

@ -24,14 +24,11 @@ $user->session_begin();
$auth->acl($user->data);
$user->setup('viewforum');
// If given an extension, look for a front controller
// Handle the display of extension front pages
if ($ext = $request->variable('ext', ''))
{
// The class to load
$class = 'phpbb_ext_' . str_replace('/', '_', $ext) . '_controller';
// Make sure the specified extension is enabled
// and that it has a controller class
if (!$phpbb_extension_manager->available($ext))
{
send_status_line(404, 'Not Found');
@ -48,17 +45,14 @@ if ($ext = $request->variable('ext', ''))
trigger_error($user->lang('EXTENSION_CONTROLLER_MISSING', $ext));
}
// Instantiate the extension controller
$controller = new $class;
// But let's make sure it's actually a proper controller
if (!($controller instanceof phpbb_extension_controller_interface))
{
send_status_line(500, 'Internal Server Error');
trigger_error($user->lang('EXTENSION_CLASS_WRONG_TYPE', $class));
}
// Let's get it started...
$controller->handle();
exit_handler();
}