mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10586] Moved some loading stuff below extension controller, updated tests
PHPBB3-10586
This commit is contained in:
parent
c44d77b031
commit
35805a2740
5 changed files with 17 additions and 18 deletions
|
@ -17,12 +17,11 @@ define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
include($phpbb_root_path . 'common.' . $phpEx);
|
include($phpbb_root_path . 'common.' . $phpEx);
|
||||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
|
||||||
|
|
||||||
// Start session management
|
// Start session management
|
||||||
$user->session_begin();
|
$user->session_begin();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup('viewforum');
|
$user->setup();
|
||||||
|
|
||||||
// Handle the display of extension front pages
|
// Handle the display of extension front pages
|
||||||
if ($ext = $request->variable('ext', ''))
|
if ($ext = $request->variable('ext', ''))
|
||||||
|
@ -57,6 +56,10 @@ if ($ext = $request->variable('ext', ''))
|
||||||
exit_handler();
|
exit_handler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
|
|
||||||
|
$user->add_lang('viewforum');
|
||||||
|
|
||||||
display_forums('', $config['load_moderators']);
|
display_forums('', $config['load_moderators']);
|
||||||
|
|
||||||
$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
|
$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class phpbb_ext_foobar_controller implements phpbb_extension_controller_interface
|
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||||
{
|
{
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
global $template;
|
$this->template->set_ext_dir_prefix($this->phpbb_root_path . 'ext/error/class/');
|
||||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/error/class/');
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$this->template->set_filenames(array(
|
||||||
'body' => 'index_body.html'
|
'body' => 'index_body.html'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class phpbb_ext_error_disabled_controller implements phpbb_extension_controller_interface
|
class phpbb_ext_error_disabled_controller extends phpbb_extension_controller
|
||||||
{
|
{
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
global $template;
|
$this->template->set_ext_dir_prefix($this->phpbb_root_path . 'ext/error/disabled/');
|
||||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/error/disabled/');
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$this->template->set_filenames(array(
|
||||||
'body' => 'index_body.html'
|
'body' => 'index_body.html'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class phpbb_ext_foo_bar_controller implements phpbb_extension_controller_interface
|
class phpbb_ext_foo_bar_controller extends phpbb_extension_controller
|
||||||
{
|
{
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
global $template;
|
$this->template->set_ext_dir_prefix($this->phpbb_root_path . 'ext/foo/bar/');
|
||||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/foo/bar/');
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$this->template->set_filenames(array(
|
||||||
'body' => 'foobar_body.html'
|
'body' => 'foobar_body.html'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class phpbb_ext_foobar_controller implements phpbb_extension_controller_interface
|
class phpbb_ext_foobar_controller extends phpbb_extension_controller
|
||||||
{
|
{
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
global $template;
|
$this->template->set_ext_dir_prefix($this->phpbb_root_path . 'ext/foobar/');
|
||||||
$template->set_ext_dir_prefix($phpbb_root_path . 'ext/foobar/');
|
|
||||||
|
|
||||||
$template->set_filenames(array(
|
$this->template->set_filenames(array(
|
||||||
'body' => 'foobar_body.html'
|
'body' => 'foobar_body.html'
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue