From cb7dabbffc7ea5e2acffaa6fed96ea682f93581d Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 28 Mar 2012 16:13:59 -0400 Subject: [ticket/10586] Change the interface to an abstract class This allows the common phpBB objects to be automatically accessible to extensions without the author having to globalize and assign each one himself. This is better because it also gives purpose to the phpbb_extension_controller class; instead of just being the way to ensure a handle() method is present, it also does this work for us. PHPBB3-10586 --- phpBB/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/index.php') diff --git a/phpBB/index.php b/phpBB/index.php index d71878a885..8b73f0008f 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -47,7 +47,7 @@ if ($ext = $request->variable('ext', '')) $controller = new $class; - if (!($controller instanceof phpbb_extension_controller_interface)) + if (!($controller instanceof phpbb_extension_controller)) { send_status_line(500, 'Internal Server Error'); trigger_error($user->lang('EXTENSION_CLASS_WRONG_TYPE', $class)); -- cgit v1.2.1 From 7b091f18a83f4bc31fc00ef067b55db48137ef47 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 28 Mar 2012 16:37:42 -0400 Subject: [ticket/10586] Remove handle() from abstract class, undo change in index.php PHPBB3-10586 --- phpBB/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/index.php') diff --git a/phpBB/index.php b/phpBB/index.php index 8b73f0008f..d71878a885 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -47,7 +47,7 @@ if ($ext = $request->variable('ext', '')) $controller = new $class; - if (!($controller instanceof phpbb_extension_controller)) + if (!($controller instanceof phpbb_extension_controller_interface)) { send_status_line(500, 'Internal Server Error'); trigger_error($user->lang('EXTENSION_CLASS_WRONG_TYPE', $class)); -- cgit v1.2.1 From 35805a27408f4d25987c3f8df5c9bf54b15a19f3 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 28 Mar 2012 16:48:16 -0400 Subject: [ticket/10586] Moved some loading stuff below extension controller, updated tests PHPBB3-10586 --- phpBB/index.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'phpBB/index.php') diff --git a/phpBB/index.php b/phpBB/index.php index d71878a885..9a57105d57 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -17,12 +17,11 @@ define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); -include($phpbb_root_path . 'includes/functions_display.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); -$user->setup('viewforum'); +$user->setup(); // Handle the display of extension front pages if ($ext = $request->variable('ext', '')) @@ -57,6 +56,10 @@ if ($ext = $request->variable('ext', '')) exit_handler(); } +include($phpbb_root_path . 'includes/functions_display.' . $phpEx); + +$user->add_lang('viewforum'); + display_forums('', $config['load_moderators']); $order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend'; -- cgit v1.2.1