diff options
author | David King <imkingdavid@gmail.com> | 2012-03-27 19:57:32 -0400 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2012-03-27 19:57:32 -0400 |
commit | 56f75dbf93b0476f88c866abcae129fa3b61fc2c (patch) | |
tree | f5cf7a3fc19247b44d15672da79ab19aaf84f4c8 | |
parent | 6a0bad8c0b7bdb261c0ee72b850bc727de6d019b (diff) | |
download | forums-56f75dbf93b0476f88c866abcae129fa3b61fc2c.tar forums-56f75dbf93b0476f88c866abcae129fa3b61fc2c.tar.gz forums-56f75dbf93b0476f88c866abcae129fa3b61fc2c.tar.bz2 forums-56f75dbf93b0476f88c866abcae129fa3b61fc2c.tar.xz forums-56f75dbf93b0476f88c866abcae129fa3b61fc2c.zip |
[ticket/10586] Tidy up comments
PHPBB3-10586
-rw-r--r-- | phpBB/includes/extension/manager.php | 2 | ||||
-rw-r--r-- | phpBB/index.php | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/phpBB/includes/extension/manager.php b/phpBB/includes/extension/manager.php index 6f1c885ea9..f103983fcd 100644 --- a/phpBB/includes/extension/manager.php +++ b/phpBB/includes/extension/manager.php @@ -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) diff --git a/phpBB/index.php b/phpBB/index.php index 2500774f67..d71878a885 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -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(); } |